Add terraform lsp, fix eslint lsp
This commit is contained in:
parent
2d7a465268
commit
7ec0fd9f43
@ -34,7 +34,7 @@ require('lspconfig')['jsonls'].setup({
|
|||||||
require('lspconfig')['eslint'].setup({
|
require('lspconfig')['eslint'].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
root_dir = require('lspconfig').util.find_git_ancestor,
|
-- root_dir = require('lspconfig').util.find_git_ancestor,
|
||||||
})
|
})
|
||||||
require('lspconfig')['html'].setup({
|
require('lspconfig')['html'].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
@ -99,3 +99,13 @@ require('lspconfig')['zls'].setup({
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
})
|
})
|
||||||
|
require('lspconfig')['terraformls'].setup({
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
||||||
|
pattern = {"*.tf", "*.tfvars"},
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user