Add elixirls lspconfig

master
blallo 2024-03-10 22:34:02 +01:00
parent 43baab0aaf
commit 307aa67a9c
Signed by: blallo
GPG Key ID: C530464EEDCF489A
1 changed files with 15 additions and 0 deletions

View File

@ -20,6 +20,19 @@ end
require 'lspconfig'.rnix.setup {}
-- elixirls
if not configs.elixirls then
configs.elixirls = {
default_config = {
cmd = { '/usr/bin/elixir-ls' },
filetypes = { 'elixir' },
root_dir = function(fname)
return nvim_lsp.util.root_pattern("mix.exs", ".git")(fname) or vim.loop.os_homedir()
end,
}
}
end
-- keybindings
local on_attach = function(client, bufrn)
@ -62,6 +75,8 @@ local on_attach = function(client, bufrn)
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts, "LSP", "formatting", "Format")
end
-- Launch language servers
local servers = {
'harepls',