Compare commits

..

53 Commits

Author SHA1 Message Date
ba0cfbccf3 chore(main): release 4.0.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-25 22:40:52 +02:00
47ee48faba build: fixed docs build 2023-05-25 22:37:45 +02:00
7bc979a7c1 feat: added extra for mini.hipatterns with tailwind support 2023-05-25 22:33:58 +02:00
9c7821e681 fix!: remove nvim-colorizer.lua It actually wasn't even enabled and I'll add hipatterns with optional tailwind support soon 2023-05-25 21:55:05 +02:00
95e2a07f16 chore(main): release 3.7.2 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-25 20:29:48 +02:00
d35d982984 chore: remove unused upvalue function () 2023-05-25 20:05:02 +02:00
877e63ca8e fix(telescope): use last-known telescope commit to work on Neovim 0.8.0 when running in Neovim 0.8.0 2023-05-25 18:33:59 +02:00
bc24b68260 chore(main): release 3.7.1 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-25 14:27:09 +02:00
b75ed594a9 fix(mini.comment): removed dirty upvalues hack for mini.comments. no longer needed 2023-05-25 14:24:29 +02:00
4f2bb725be refactor(mason): use new handlers opt 2023-05-25 14:24:29 +02:00
2f0bfbbad8 chore(build): auto-generate vimdoc 2023-05-25 07:08:32 +00:00
01a6085b2b chore(main): release 3.7.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-25 09:07:44 +02:00
2b5ae7b63c feat(go): add workaround to get semantic token highlighting () 2023-05-24 23:22:40 +02:00
dc40f02f35 chore(main): release 3.6.2 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-24 22:14:12 +02:00
4b367952f6 fix(tailwind): nil check on filetypes_exclude. See 2023-05-24 22:02:30 +02:00
7c9abd7463 fix(vscode): only remap keybinds when running in vscode 2023-05-24 21:59:37 +02:00
868ccedff2 chore(main): release 3.6.1 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-24 14:28:48 +02:00
29632c6b29 fix(go): actually set semantic tokens () 2023-05-24 14:07:23 +02:00
5b7ae96c5d chore(main): release 3.6.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-24 11:30:49 +02:00
e9fb81e94d feat(typescript): added dap config for typescript. Will only be enabled when dap is also enabled 2023-05-24 10:47:54 +02:00
b172f47f27 fix(go): extend mason ensure_installed 2023-05-24 10:35:05 +02:00
9cfe88c7ba fix: remove debug notify () 2023-05-24 10:34:27 +02:00
163a4f9275 feat(go): add go lang extras ()
* feat(go): add go lang extras

* fix(go): update plugin

* fix(go): add neotest adapter to adapters

* fix(go): pr changes
2023-05-24 08:55:03 +02:00
076b2e432e chore(build): auto-generate vimdoc 2023-05-24 06:46:02 +00:00
5bf45e3139 feat(vscode): better vscode support 2023-05-24 08:45:20 +02:00
eba510ec69 fix(vscode): properly cleanup disabled deps 2023-05-23 14:33:13 +02:00
39fa63646d feat(vscode): add vscode=true to any plugin spec you want to activate in vscode 2023-05-23 14:33:00 +02:00
e975f021ea fix(vscode): added ts-context-commentstring 2023-05-23 14:32:32 +02:00
bf66e71adc fix(neotest): pass opts to neotest 2023-05-23 14:07:11 +02:00
cd96e3d9e5 refactor(neotest): better way to pass custom options for adapters 2023-05-23 13:00:15 +02:00
5559228300 chore(main): release 3.5.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-23 09:01:26 +02:00
3dcc074693 fix(vscode): support older Neovim versions. Fixes 2023-05-23 08:44:51 +02:00
58c3842faa chore(build): auto-generate vimdoc 2023-05-23 06:43:03 +00:00
89db0157b1 feat(mini.comment): added ts-context-commentstring back and made it work with mini.comment 2023-05-23 08:41:44 +02:00
7443effe26 feat(test): added easy way to configure adapters 2023-05-22 21:31:12 +02:00
78298cb134 chore(main): release 3.4.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-22 21:00:46 +02:00
55bf4d104c build: dont generate docs for the vscode extra 2023-05-22 20:57:49 +02:00
c12835ab86 feat(vscode): added vscode extra with minimal functionality. Will only do something when vim.g.vscode is set 2023-05-22 20:57:33 +02:00
183fd89d76 fix: make some extra deps optional 2023-05-22 20:57:26 +02:00
99785ce36b fix(persistence): dont add rtp to session 2023-05-22 20:57:26 +02:00
bb0d4d4e7d feat(tests): added neotest ()
* feat(tests): adds test management

* refactor(tests): pr changes

* fix(tests): make dap keybind optional based on nvim-dap existence
2023-05-22 20:57:15 +02:00
f8982332be feat(project): add to mini.starter ()
* feat(project): add to mini.starter

* fix(project): make alpha and mini.starter optional
2023-05-22 20:30:18 +02:00
0c517d1f5c chore(build): auto-generate vimdoc 2023-05-22 14:39:48 +00:00
df6a0d3b10 style: removed deprecated option from neodev 2023-05-22 16:39:09 +02:00
7a7c024bf6 chore(build): auto-generate vimdoc 2023-05-21 08:53:25 +00:00
29554455aa feat(tailwind): don't enable tailwind in markdown files 2023-05-21 10:52:46 +02:00
b227d9727a perf(eslint): only run EslintFixAll for the current buffer when there are diagnostics from eslint 2023-05-19 22:49:25 +02:00
b4099a6477 fix(dap): fix the mason-nvim-dap setting name () 2023-05-19 21:34:19 +02:00
5a27e1def0 chore(build): auto-generate vimdoc 2023-05-19 13:07:42 +00:00
06e4ba2fdb style: Fix comments on autocmds and keymaps loading () 2023-05-19 15:06:59 +02:00
23410a4594 chore(main): release 3.3.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-18 16:31:55 +02:00
c737f2b6c2 feat(telescope): added <a-c> mapping for telescope pickers to switch to cwd instead of root 2023-05-18 09:46:46 +02:00
78354a1e5e fix(telescope): keep current prompt when switching to hidden/no_ignore 2023-05-18 09:46:46 +02:00
21 changed files with 832 additions and 36 deletions

@ -1,5 +1,123 @@
# Changelog
## [4.0.0](https://github.com/LazyVim/LazyVim/compare/v3.7.2...v4.0.0) (2023-05-25)
### ⚠ BREAKING CHANGES
* remove nvim-colorizer.lua It actually wasn't even enabled and I'll add hipatterns with optional tailwind support soon
### Features
* added extra for mini.hipatterns with tailwind support ([7bc979a](https://github.com/LazyVim/LazyVim/commit/7bc979a7c1eacba16b60c324ae7bfab57b73a702))
### Bug Fixes
* remove nvim-colorizer.lua It actually wasn't even enabled and I'll add hipatterns with optional tailwind support soon ([9c7821e](https://github.com/LazyVim/LazyVim/commit/9c7821e681e264905d7f764aeddda78162a9d867))
## [3.7.2](https://github.com/LazyVim/LazyVim/compare/v3.7.1...v3.7.2) (2023-05-25)
### Bug Fixes
* **telescope:** use last-known telescope commit to work on Neovim 0.8.0 when running in Neovim 0.8.0 ([877e63c](https://github.com/LazyVim/LazyVim/commit/877e63ca8ee5efe1420744f7a843dd4fd0215764))
## [3.7.1](https://github.com/LazyVim/LazyVim/compare/v3.7.0...v3.7.1) (2023-05-25)
### Bug Fixes
* **mini.comment:** removed dirty upvalues hack for mini.comments. no longer needed ([b75ed59](https://github.com/LazyVim/LazyVim/commit/b75ed594a932e6e01d8c1ee5b23215221164d494))
## [3.7.0](https://github.com/LazyVim/LazyVim/compare/v3.6.2...v3.7.0) (2023-05-24)
### Features
* **go:** add workaround to get semantic token highlighting ([#815](https://github.com/LazyVim/LazyVim/issues/815)) ([2b5ae7b](https://github.com/LazyVim/LazyVim/commit/2b5ae7b63c8233bbb11a922c852b8adeacd94b86))
## [3.6.2](https://github.com/LazyVim/LazyVim/compare/v3.6.1...v3.6.2) (2023-05-24)
### Bug Fixes
* **tailwind:** nil check on filetypes_exclude. See [#816](https://github.com/LazyVim/LazyVim/issues/816) ([4b36795](https://github.com/LazyVim/LazyVim/commit/4b367952f6214e1ae213eba2ae706df691ff57fa))
* **vscode:** only remap keybinds when running in vscode ([7c9abd7](https://github.com/LazyVim/LazyVim/commit/7c9abd7463a27b7a7fd8a0c7e59653a7602613b6))
## [3.6.1](https://github.com/LazyVim/LazyVim/compare/v3.6.0...v3.6.1) (2023-05-24)
### Bug Fixes
* **go:** actually set semantic tokens ([#811](https://github.com/LazyVim/LazyVim/issues/811)) ([29632c6](https://github.com/LazyVim/LazyVim/commit/29632c6b294465e5abc6472fffc866ec1841e37a))
## [3.6.0](https://github.com/LazyVim/LazyVim/compare/v3.5.0...v3.6.0) (2023-05-24)
### Features
* **go:** add go lang extras ([#795](https://github.com/LazyVim/LazyVim/issues/795)) ([163a4f9](https://github.com/LazyVim/LazyVim/commit/163a4f927514ad6ea1aa06db2ad754fb954d87f5))
* **typescript:** added dap config for typescript. Will only be enabled when dap is also enabled ([e9fb81e](https://github.com/LazyVim/LazyVim/commit/e9fb81e94d7f461b63994e3111d5c17fc84dec80))
* **vscode:** add `vscode=true` to any plugin spec you want to activate in vscode ([39fa636](https://github.com/LazyVim/LazyVim/commit/39fa63646d14665861558c4ee7704ef51eb1b7f6))
* **vscode:** better vscode support ([5bf45e3](https://github.com/LazyVim/LazyVim/commit/5bf45e3139aa3a8cf8e1bf9fd2a2d422fe1c6cf7))
### Bug Fixes
* **go:** extend mason ensure_installed ([b172f47](https://github.com/LazyVim/LazyVim/commit/b172f47f278df105bbbf60b5c0e411fda01c1819))
* **neotest:** pass opts to neotest ([bf66e71](https://github.com/LazyVim/LazyVim/commit/bf66e71adcf0346a3d6edd92a14e0fcd350f5b26))
* remove debug notify ([#808](https://github.com/LazyVim/LazyVim/issues/808)) ([9cfe88c](https://github.com/LazyVim/LazyVim/commit/9cfe88c7ba1ff2b36a0cc32e96d5be1d6e5ee833))
* **vscode:** added ts-context-commentstring ([e975f02](https://github.com/LazyVim/LazyVim/commit/e975f021eaf1eb33fb8793c8e922ab11a8b682f2))
* **vscode:** properly cleanup disabled deps ([eba510e](https://github.com/LazyVim/LazyVim/commit/eba510ec6934a22f3654a83ed89216bb96e7374c))
## [3.5.0](https://github.com/LazyVim/LazyVim/compare/v3.4.0...v3.5.0) (2023-05-23)
### Features
* **mini.comment:** added ts-context-commentstring back and made it work with mini.comment ([89db015](https://github.com/LazyVim/LazyVim/commit/89db0157b1621deffc83a4e00cb2be13e2827a5d))
* **test:** added easy way to configure adapters ([7443eff](https://github.com/LazyVim/LazyVim/commit/7443effe269ad3b2d491f43439b48f1d072c9210))
### Bug Fixes
* **vscode:** support older Neovim versions. Fixes [#798](https://github.com/LazyVim/LazyVim/issues/798) ([3dcc074](https://github.com/LazyVim/LazyVim/commit/3dcc074693c3560982d6e500aa073140a9c5c0ed))
## [3.4.0](https://github.com/LazyVim/LazyVim/compare/v3.3.0...v3.4.0) (2023-05-22)
### Features
* **project:** add to mini.starter ([#640](https://github.com/LazyVim/LazyVim/issues/640)) ([f898233](https://github.com/LazyVim/LazyVim/commit/f8982332be70499b74623f6ed44c1c58217eb546))
* **tailwind:** don't enable tailwind in markdown files ([2955445](https://github.com/LazyVim/LazyVim/commit/29554455aa3e7d76377080869f0556389a05e321))
* **tests:** added neotest ([#642](https://github.com/LazyVim/LazyVim/issues/642)) ([bb0d4d4](https://github.com/LazyVim/LazyVim/commit/bb0d4d4e7d2e0914cb2188cab7748d70b2ae5fa8))
* **vscode:** added vscode extra with minimal functionality. Will only do something when vim.g.vscode is set ([c12835a](https://github.com/LazyVim/LazyVim/commit/c12835ab8683c68116503a1aab614e0d6ff68528))
### Bug Fixes
* **dap:** fix the mason-nvim-dap setting name ([#781](https://github.com/LazyVim/LazyVim/issues/781)) ([b4099a6](https://github.com/LazyVim/LazyVim/commit/b4099a64775e3e7722ebaf29612df43c46bf4f03))
* make some extra deps optional ([183fd89](https://github.com/LazyVim/LazyVim/commit/183fd89d76b24c5e293d368a59c5db3a7c7f85d5))
* **persistence:** dont add rtp to session ([99785ce](https://github.com/LazyVim/LazyVim/commit/99785ce36b523cca46c1f2fd6edeaf1189bcd934))
### Performance Improvements
* **eslint:** only run EslintFixAll for the current buffer when there are diagnostics from eslint ([b227d97](https://github.com/LazyVim/LazyVim/commit/b227d9727a7ae1f0ad48504d613fb099dc9c461b))
## [3.3.0](https://github.com/LazyVim/LazyVim/compare/v3.2.0...v3.3.0) (2023-05-18)
### Features
* **telescope:** added `&lt;a-c&gt;` mapping for telescope pickers to switch to cwd instead of root ([c737f2b](https://github.com/LazyVim/LazyVim/commit/c737f2b6c265d2c82cebf9f999425a2bd008e692))
### Bug Fixes
* **telescope:** keep current prompt when switching to hidden/no_ignore ([78354a1](https://github.com/LazyVim/LazyVim/commit/78354a1e5e88c68a9d99b72af5a0844befee419b))
## [3.2.0](https://github.com/LazyVim/LazyVim/compare/v3.1.0...v3.2.0) (2023-05-18)

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 May 18
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 May 25
==============================================================================
Table of Contents *LazyVim-table-of-contents*

@ -1,4 +1,4 @@
-- This file is automatically loaded by plugins.init
-- This file is automatically loaded by lazyvim.config.init
local function augroup(name)
return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true })
@ -52,6 +52,7 @@ vim.api.nvim_create_autocmd("FileType", {
"startuptime",
"tsplayground",
"checkhealth",
"neotest-output",
},
callback = function(event)
vim.bo[event.buf].buflisted = false

@ -161,6 +161,8 @@ function M.load(name)
-- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here
vim.cmd([[do VimResized]])
end
local pattern = "LazyVim" .. name:sub(1, 1):upper() .. name:sub(2)
vim.api.nvim_exec_autocmds("User", { pattern = pattern, modeline = false })
end
M.did_init = false

@ -1,5 +1,4 @@
-- This file is automatically loaded by lazyvim.plugins.config
-- This file is automatically loaded by lazyvim.config.init
local Util = require("lazyvim.util")
local function map(mode, lhs, rhs, opts)
@ -9,6 +8,9 @@ local function map(mode, lhs, rhs, opts)
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
if opts.remap and not vim.g.vscode then
opts.remap = nil
end
vim.keymap.set(mode, lhs, rhs, opts)
end
end
@ -18,10 +20,10 @@ map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
-- Move to window using the <ctrl> hjkl keys
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window" })
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
-- Resize window using <ctrl> arrow keys
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
@ -129,12 +131,12 @@ map("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
-- windows
map("n", "<leader>ww", "<C-W>p", { desc = "Other window" })
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window" })
map("n", "<leader>w-", "<C-W>s", { desc = "Split window below" })
map("n", "<leader>w|", "<C-W>v", { desc = "Split window right" })
map("n", "<leader>-", "<C-W>s", { desc = "Split window below" })
map("n", "<leader>|", "<C-W>v", { desc = "Split window right" })
map("n", "<leader>ww", "<C-W>p", { desc = "Other window", remap = true })
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
map("n", "<leader>w-", "<C-W>s", { desc = "Split window below", remap = true })
map("n", "<leader>w|", "<C-W>v", { desc = "Split window right", remap = true })
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
map("n", "<leader>|", "<C-W>v", { desc = "Split window right", remap = true })
-- tabs
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })

@ -131,10 +131,17 @@ return {
},
-- comments
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
{
"echasnovski/mini.comment",
event = "VeryLazy",
opts = {},
opts = {
options = {
custom_commentstring = function()
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring
end,
},
},
},
-- better text-objects

@ -81,6 +81,7 @@ return {
-- fuzzy finder
{
"nvim-telescope/telescope.nvim",
commit = vim.fn.has("nvim-0.9.0") == 0 and "057ee0f8783" or nil,
cmd = "Telescope",
version = false, -- telescope did only one release, so use HEAD for now
keys = {
@ -166,10 +167,14 @@ return {
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end,
["<a-i>"] = function()
Util.telescope("find_files", { no_ignore = true })()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { no_ignore = true, default_text = line })()
end,
["<a-h>"] = function()
Util.telescope("find_files", { hidden = true })()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { hidden = true, default_text = line })()
end,
["<C-Down>"] = function(...)
return require("telescope.actions").cycle_history_next(...)

@ -12,6 +12,7 @@ return {
},
{
"nvim-lualine/lualine.nvim",
optional = true,
event = "VeryLazy",
opts = function(_, opts)
local Util = require("lazyvim.util")

@ -37,6 +37,7 @@ return {
-- which key integration
{
"folke/which-key.nvim",
optional = true,
opts = {
defaults = {
["<leader>d"] = { name = "+debug" },
@ -53,7 +54,7 @@ return {
opts = {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
automatic_installation = true,
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information

@ -0,0 +1,77 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"go",
"gomod",
"gowork",
"gosum",
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
gopls = {
settings = {
gopls = {
semanticTokens = true,
},
},
},
},
setup = {
gopls = function()
-- workaround for gopls not supporting semantictokensprovider
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
require("lazyvim.util").on_attach(function(client, _)
if client.name == "gopls" then
if not client.server_capabilities.semanticTokensProvider then
local semantic = client.config.capabilities.textDocument.semanticTokens
client.server_capabilities.semanticTokensProvider = {
full = true,
legend = {
tokenTypes = semantic.tokenTypes,
tokenModifiers = semantic.tokenModifiers,
},
range = true,
}
end
end
end)
-- end workaround
end,
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
{
"mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
table.insert(opts.ensure_installed, "delve")
end,
},
},
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"nvim-neotest/neotest-go",
},
opts = {
adapters = {
["neotest-go"] = {
-- Here we can set options for neotest-go, e.g.
-- args = { "-tags=integration" }
},
},
},
},
}

@ -3,15 +3,18 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
tailwindcss = {},
tailwindcss = {
filetypes_exclude = { "markdown" },
},
},
},
},
{
"NvChad/nvim-colorizer.lua",
opts = {
user_default_options = {
tailwind = true,
setup = {
tailwindcss = function(_, opts)
local tw = require("lspconfig.server_configurations.tailwindcss")
--- @param ft string
opts.filetypes = vim.tbl_filter(function(ft)
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
end, tw.default_config.filetypes)
end,
},
},
},

@ -62,4 +62,56 @@ return {
table.insert(opts.sources, require("typescript.extensions.null-ls.code-actions"))
end,
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
table.insert(opts.ensure_installed, "js-debug-adapter")
end,
},
},
opts = function()
local dap = require("dap")
if not dap.adapters["pwa-node"] then
require("dap").adapters["pwa-node"] = {
type = "server",
host = "localhost",
port = "${port}",
executable = {
command = "node",
-- 💀 Make sure to update this path to point to your installation
args = {
require("mason-registry").get_package("js-debug-adapter"):get_install_path()
.. "/js-debug/src/dapDebugServer.js",
"${port}",
},
},
}
end
for _, language in ipairs({ "typescript", "javascript" }) do
if not dap.configurations[language] then
dap.configurations[language] = {
{
type = "pwa-node",
request = "launch",
name = "Launch file",
program = "${file}",
cwd = "${workspaceFolder}",
},
{
type = "pwa-node",
request = "attach",
name = "Attach",
processId = require("dap.utils").pick_process,
cwd = "${workspaceFolder}",
},
}
end
end
end,
},
}

@ -3,6 +3,7 @@ return {
"neovim/nvim-lspconfig",
-- other settings removed for brevity
opts = {
---@type lspconfig.options
servers = {
eslint = {
settings = {
@ -15,8 +16,12 @@ return {
eslint = function()
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function(event)
if require("lspconfig.util").get_active_client_by_name(event.buf, "eslint") then
vim.cmd("EslintFixAll")
local client = vim.lsp.get_active_clients({ bufnr = event.buf, name = "eslint" })[1]
if client then
local diag = vim.diagnostic.get(event.buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
if #diag > 0 then
vim.cmd("EslintFixAll")
end
end
end,
})

@ -0,0 +1,73 @@
return {
{
"folke/which-key.nvim",
optional = true,
opts = {
defaults = {
["<leader>t"] = { name = "+test" },
},
},
},
{
"nvim-neotest/neotest",
opts = {
-- Can be a list of adapters like what neotest expects,
-- or a table of adapter names, mapped to adapter configs.
-- The adapter will then be automatically loaded with the config.
adapters = {},
-- Example for loading neotest-go with a custom config
-- adapters = {
-- ["neotest-go"] = {
-- args = { "-tags=integration" },
-- },
-- },
},
config = function(_, opts)
local neotest_ns = vim.api.nvim_create_namespace("neotest")
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
-- Replace newline and tab characters with space for more compact diagnostics
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
return message
end,
},
}, neotest_ns)
if opts.adapters then
local adapters = {}
for name, config in pairs(opts.adapters or {}) do
if type(name) == "number" then
adapters[#adapters + 1] = config
elseif config ~= false then
local adapter = require(name)
if type(config) == "table" and not vim.tbl_isempty(config) then
adapter = adapter(config)
end
adapters[#adapters + 1] = adapter
end
end
opts.adapters = adapters
end
require("neotest").setup(opts)
end,
-- stylua: ignore
keys = {
{ "<leader>tr", function() require("neotest").run.run() end, desc = "Run Nearest" },
{ "<leader>tR", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" },
{ "<leader>ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" },
{ "<leader>to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" },
{ "<leader>tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" },
{ "<leader>tS", function() require("neotest").run.stop() end, desc = "Stop" },
},
},
{
"mfussenegger/nvim-dap",
optional = true,
-- stylua: ignore
keys = {
{ "<leader>td", function() require("neotest").run.run({strategy = "dap"}) end, desc = "Debug Nearest" },
},
},
}

File diff suppressed because it is too large Load Diff

@ -20,6 +20,7 @@ return {
{
"goolord/alpha-nvim",
optional = true,
opts = function(_, dashboard)
local button = dashboard.button("p", "" .. " Projects", ":Telescope projects <CR>")
button.opts.hl = "AlphaButtons"
@ -27,4 +28,18 @@ return {
table.insert(dashboard.section.buttons.val, 4, button)
end,
},
{
"echasnovski/mini.starter",
optional = true,
opts = function(_, opts)
local items = {
{
name = "Projects",
action = "Telescope projects",
section = string.rep(" ", 22) .. "Telescope",
},
}
vim.list_extend(opts.items, items)
end,
},
}

@ -0,0 +1,67 @@
if not vim.g.vscode then
return {}
end
local enabled = {
"flit.nvim",
"lazy.nvim",
"leap.nvim",
"mini.ai",
"mini.comment",
"mini.pairs",
"mini.surround",
"nvim-treesitter",
"nvim-treesitter-textobjects",
"nvim-ts-context-commentstring",
"vim-repeat",
"LazyVim",
}
local Config = require("lazy.core.config")
local Plugin = require("lazy.core.plugin")
Config.options.checker.enabled = false
Config.options.change_detection.enabled = false
-- HACK: disable all plugins except the ones we want
local fix_disabled = Plugin.Spec.fix_disabled
function Plugin.Spec.fix_disabled(self)
for _, plugin in pairs(self.plugins) do
if not (vim.tbl_contains(enabled, plugin.name) or plugin.vscode) then
plugin.enabled = false
end
end
fix_disabled(self)
end
-- HACK: don't clean plugins in vscode
local update_state = Plugin.update_state
function Plugin.update_state()
update_state()
Config.to_clean = {}
end
-- Add some vscode specific keymaps
vim.api.nvim_create_autocmd("User", {
pattern = "LazyVimKeymaps",
callback = function()
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
vim.keymap.set("n", "<leader>/", [[<cmd>call VSCodeNotify('workbench.action.findInFiles')<cr>]])
vim.keymap.set("n", "<leader>ss", [[<cmd>call VSCodeNotify('workbench.action.gotoSymbol')<cr>]])
end,
})
return {
{
"LazyVim/LazyVim",
config = function(_, opts)
opts = opts or {}
-- disable the colorscheme
opts.colorscheme = function() end
require("lazyvim").setup(opts)
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = { highlight = { enable = false } },
},
}

@ -5,7 +5,7 @@ return {
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
{ "folke/neodev.nvim", opts = {} },
"mason.nvim",
"williamboman/mason-lspconfig.nvim",
{
@ -151,8 +151,7 @@ return {
end
if have_mason then
mlsp.setup({ ensure_installed = ensure_installed })
mlsp.setup_handlers({ setup })
mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } })
end
if Util.lsp_get_config("denols") and Util.lsp_get_config("tsserver") then

@ -13,7 +13,7 @@ return {
{
"folke/persistence.nvim",
event = "BufReadPre",
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals" } },
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } },
-- stylua: ignore
keys = {
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },

@ -43,7 +43,7 @@ function M.keymaps()
group = "Plugins"
local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" })
local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" }, { optional = true })
Util.foreach(core.plugins, function(name, plugin)
group = ("[%s](%s)"):format(plugin.name, plugin.url)
for _, key in ipairs(plugin.keys or {}) do
@ -58,7 +58,7 @@ function M.keymaps()
if t == "file" and name:find("%.lua$") then
local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "")
local extra_doc = "/plugins/extras/" .. modname:gsub("lazyvim%.plugins%.extras%.", "")
local extra = require("lazy.core.plugin").Spec.new({ import = modname })
local extra = require("lazy.core.plugin").Spec.new({ import = modname }, { optional = true })
Util.foreach(extra.plugins, function(name, plugin)
group = ("[%s](%s)\nPart of [%s](%s)"):format(plugin.name, plugin.url, modname, extra_doc)
for _, key in ipairs(plugin.keys or {}) do
@ -249,7 +249,7 @@ end
function M.plugins(path)
local test = root .. "/lua/lazyvim/plugins/" .. path
local spec = require("lazy.core.plugin").Spec.new(dofile(test))
local spec = require("lazy.core.plugin").Spec.new(dofile(test), { optional = true })
local source = Util.read_file(test)
local parser = vim.treesitter.get_string_parser(source, "lua")
@ -276,7 +276,8 @@ function M.plugins(path)
local text = vim.treesitter.get_node_text(node, source):sub(2, -2)
if text:find("/") and #node:parent():field("name") == 0 then
local plugin_node = node:parent():parent()
if plugin_node:named_child(0):field("value")[1]:id() ~= node:id() then
local first_child = plugin_node:named_child(0)
if first_child and first_child:field("value")[1] and first_child:field("value")[1]:id() ~= node:id() then
plugin_node = node
end
local comment_node = plugin_node:parent():prev_named_sibling()
@ -306,11 +307,13 @@ function M.plugins(path)
end
parser:parse()
-- if path ~= "extras/vscode.lua" then
parser:for_each_tree(function(tree)
local node = tree:root()
find_plugins(node)
-- print(vim.treesitter.query.get_node_text(node, str))
end)
-- end
---@type string[]
local lines = {

@ -105,6 +105,20 @@ function M.telescope(builtin, opts)
builtin = "find_files"
end
end
if opts.cwd and opts.cwd ~= vim.loop.cwd() then
opts.attach_mappings = function(_, map)
map("i", "<a-c>", function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
M.telescope(
params.builtin,
vim.tbl_deep_extend("force", {}, params.opts or {}, { cwd = false, default_text = line })
)()
end)
return true
end
end
require("telescope.builtin")[builtin](opts)
end
end