lsp: unconditionally load setup
This commit is contained in:
parent
5076180f27
commit
6d72a4c713
1 changed files with 93 additions and 119 deletions
26
init.lua
26
init.lua
|
|
@ -282,30 +282,6 @@ cmp.setup({
|
|||
}),
|
||||
})
|
||||
---- LSP ----
|
||||
vim.g.lsp_loaded = false
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = {
|
||||
"c",
|
||||
"cpp",
|
||||
"dot",
|
||||
"go",
|
||||
"javascript",
|
||||
"json",
|
||||
"latex",
|
||||
"lua",
|
||||
"python",
|
||||
"rust",
|
||||
"terraform",
|
||||
"tex",
|
||||
"toml",
|
||||
"typescript",
|
||||
"typst",
|
||||
},
|
||||
callback = function()
|
||||
if vim.g.lsp_loaded == true then
|
||||
return
|
||||
end
|
||||
vim.g.lsp_loaded = true
|
||||
vim.cmd("packadd nvim-lspconfig")
|
||||
vim.cmd("packadd lsp_lines.nvim")
|
||||
-- vim.cmd("packadd lsp-timeout.nvim")
|
||||
|
|
@ -408,8 +384,6 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
|||
-- startTimeout = 1000 * 2, -- ms, timeout before restart
|
||||
-- silent = false -- true to suppress notifications
|
||||
-- }
|
||||
end,
|
||||
})
|
||||
|
||||
-- -- Auto format on save
|
||||
-- vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue