diff --git a/lua/config/lspconfig.lua b/lua/config/lspconfig.lua index 808f6c7..0d10f18 100644 --- a/lua/config/lspconfig.lua +++ b/lua/config/lspconfig.lua @@ -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', 'f', 'lua vim.lsp.buf.format()', opts, "LSP", "formatting", "Format") end + + -- Launch language servers local servers = { 'harepls',