enabled language servers

This commit is contained in:
Joel Lau 2024-03-01 19:20:05 +08:00
parent c5f34d0b62
commit 390e75fc7b
No known key found for this signature in database
GPG Key ID: D513A40A19DC2F69
1 changed files with 11 additions and 1 deletions

View File

@ -639,7 +639,9 @@ require('mason-lspconfig').setup()
local servers = { local servers = {
-- clangd = {}, -- clangd = {},
gopls = {}, gopls = {},
-- pyright = {}, terraformls = {},
sqlls = {},
pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- tsserver = {}, -- tsserver = {},
html = { filetypes = { 'html' } }, html = { filetypes = { 'html' } },
@ -679,6 +681,14 @@ mason_lspconfig.setup_handlers {
end, end,
} }
-- format on save (terraform)
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
pattern = { "*.tf", "*.tfvars" },
callback = function()
vim.lsp.buf.format()
end
})
-- [[ Configure nvim-cmp ]] -- [[ Configure nvim-cmp ]]
-- See `:help cmp` -- See `:help cmp`
local cmp = require 'cmp' local cmp = require 'cmp'