1
0
Fork 0

move lsp to autostart and fix neotest startup

This commit is contained in:
Felipe 2024-07-13 21:35:24 -04:00
parent 04fefbeb83
commit 157010c499
Signed by: pitbuster
SSH key fingerprint: SHA256:HDYu2Pm4/TmSX8GBwV49UvFWr1Ljg8XlHxKeCpjJpOk
5 changed files with 9 additions and 9 deletions

7
.gitmodules vendored
View file

@ -7,7 +7,7 @@
url = https://github.com/rktjmp/lush.nvim
branch = main
[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
branch = master
[submodule "pack/general/start/nvim-treesitter"]
@ -126,7 +126,7 @@
url = https://github.com/chrisgrieser/nvim-spider
branch = main
[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
[submodule "pack/general/opt/lsp-timeout.nvim"]
path = pack/general/opt/lsp-timeout.nvim
@ -152,3 +152,6 @@
[submodule "pack/general/start/conform.nvim"]
path = pack/general/start/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

View file

@ -176,7 +176,7 @@ require("nvim-treesitter.configs").setup({
},
highlight = { enable = true, indent = true },
playground = {
enable = true,
enable = false,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions
@ -282,10 +282,6 @@ cmp.setup({
}),
})
---- LSP ----
vim.cmd("packadd nvim-lspconfig")
vim.cmd("packadd lsp_lines.nvim")
-- vim.cmd("packadd lsp-timeout.nvim")
local lsp = require("lspconfig")
-- Use an on_attach function to only map the following keys
-- 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_next)
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 })
-- end)
end
@ -369,7 +365,6 @@ for server, add_to_config in pairs(servers) do
end
lsp[server].setup(config)
end
vim.cmd("LspStart")
---- lsp_lines
require("lsp_lines").setup()
@ -684,6 +679,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
return
end
vim.g.neotest_loaded = true
vim.cmd("packadd nvim-nio")
vim.cmd("packadd neotest")
vim.cmd("packadd neotest-rust")

@ -0,0 +1 @@
Subproject commit a428f309119086dc78dd4b19306d2d67be884eee