move lsp to autostart and fix neotest startup
This commit is contained in:
parent
04fefbeb83
commit
157010c499
5 changed files with 9 additions and 9 deletions
7
.gitmodules
vendored
7
.gitmodules
vendored
|
|
@ -7,7 +7,7 @@
|
||||||
url = https://github.com/rktjmp/lush.nvim
|
url = https://github.com/rktjmp/lush.nvim
|
||||||
branch = main
|
branch = main
|
||||||
[submodule "pack/general/start/nvim-lspconfig"]
|
[submodule "pack/general/start/nvim-lspconfig"]
|
||||||
path = pack/general/opt/nvim-lspconfig
|
path = pack/general/start/nvim-lspconfig
|
||||||
url = https://github.com/neovim/nvim-lspconfig
|
url = https://github.com/neovim/nvim-lspconfig
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "pack/general/start/nvim-treesitter"]
|
[submodule "pack/general/start/nvim-treesitter"]
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
url = https://github.com/chrisgrieser/nvim-spider
|
url = https://github.com/chrisgrieser/nvim-spider
|
||||||
branch = main
|
branch = main
|
||||||
[submodule "pack/general/opt/lsp_lines.nvim"]
|
[submodule "pack/general/opt/lsp_lines.nvim"]
|
||||||
path = pack/general/opt/lsp_lines.nvim
|
path = pack/general/start/lsp_lines.nvim
|
||||||
url = https://git.sr.ht/~whynothugo/lsp_lines.nvim
|
url = https://git.sr.ht/~whynothugo/lsp_lines.nvim
|
||||||
[submodule "pack/general/opt/lsp-timeout.nvim"]
|
[submodule "pack/general/opt/lsp-timeout.nvim"]
|
||||||
path = pack/general/opt/lsp-timeout.nvim
|
path = pack/general/opt/lsp-timeout.nvim
|
||||||
|
|
@ -152,3 +152,6 @@
|
||||||
[submodule "pack/general/start/conform.nvim"]
|
[submodule "pack/general/start/conform.nvim"]
|
||||||
path = pack/general/start/conform.nvim
|
path = pack/general/start/conform.nvim
|
||||||
url = https://github.com/stevearc/conform.nvim
|
url = https://github.com/stevearc/conform.nvim
|
||||||
|
[submodule "pack/general/opt/nvim-nio"]
|
||||||
|
path = pack/general/opt/nvim-nio
|
||||||
|
url = https://github.com/nvim-neotest/nvim-nio
|
||||||
|
|
|
||||||
10
init.lua
10
init.lua
|
|
@ -176,7 +176,7 @@ require("nvim-treesitter.configs").setup({
|
||||||
},
|
},
|
||||||
highlight = { enable = true, indent = true },
|
highlight = { enable = true, indent = true },
|
||||||
playground = {
|
playground = {
|
||||||
enable = true,
|
enable = false,
|
||||||
disable = {},
|
disable = {},
|
||||||
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
|
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
|
||||||
persist_queries = false, -- Whether the query persists across vim sessions
|
persist_queries = false, -- Whether the query persists across vim sessions
|
||||||
|
|
@ -282,10 +282,6 @@ cmp.setup({
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
---- LSP ----
|
---- LSP ----
|
||||||
vim.cmd("packadd nvim-lspconfig")
|
|
||||||
vim.cmd("packadd lsp_lines.nvim")
|
|
||||||
-- vim.cmd("packadd lsp-timeout.nvim")
|
|
||||||
|
|
||||||
local lsp = require("lspconfig")
|
local lsp = require("lspconfig")
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
|
|
@ -303,7 +299,7 @@ local on_lsp_attach = function(_client, _bufnr)
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
|
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
|
||||||
vim.keymap.set("n", "<Leader>q", vim.diagnostic.setloclist)
|
vim.keymap.set("n", "<Leader>q", vim.diagnostic.setloclist)
|
||||||
-- vim.keymap.segcjk("n", "<F3>", function()
|
-- vim.keymap.set("n", "<F3>", function()
|
||||||
-- vim.lsp.buf.format({ async = true })
|
-- vim.lsp.buf.format({ async = true })
|
||||||
-- end)
|
-- end)
|
||||||
end
|
end
|
||||||
|
|
@ -369,7 +365,6 @@ for server, add_to_config in pairs(servers) do
|
||||||
end
|
end
|
||||||
lsp[server].setup(config)
|
lsp[server].setup(config)
|
||||||
end
|
end
|
||||||
vim.cmd("LspStart")
|
|
||||||
|
|
||||||
---- lsp_lines
|
---- lsp_lines
|
||||||
require("lsp_lines").setup()
|
require("lsp_lines").setup()
|
||||||
|
|
@ -684,6 +679,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
vim.g.neotest_loaded = true
|
vim.g.neotest_loaded = true
|
||||||
|
vim.cmd("packadd nvim-nio")
|
||||||
vim.cmd("packadd neotest")
|
vim.cmd("packadd neotest")
|
||||||
vim.cmd("packadd neotest-rust")
|
vim.cmd("packadd neotest-rust")
|
||||||
|
|
||||||
|
|
|
||||||
1
pack/general/opt/nvim-nio
Submodule
1
pack/general/opt/nvim-nio
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a428f309119086dc78dd4b19306d2d67be884eee
|
||||||
Loading…
Add table
Reference in a new issue