Setup nvim for elm-development

This commit is contained in:
2026-08-25 01:56:19 +02:00
parent 1e953f8611
commit ed9c890688
4 changed files with 284 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ return {
"terraformls",
"ts_ls",
"vue_ls",
"elmls",
},
})
local vue_language_server_path = vim.fn.expand '$MASON/packages' ..
@@ -122,7 +123,20 @@ return {
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
})
vim.lsp.config('vue_ls', opts)
vim.lsp.config('elmls', {
capabilities = capabilities,
on_attach = function(client, bufnr)
on_attach(client, bufnr)
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function ()
vim.lsp.buf.format({ async = false })
end,
})
end,
})
vim.lsp.enable({
"elmls",
"cssls",
"eslint",
"html",