Add elixirls lspconfig
This commit is contained in:
parent
43baab0aaf
commit
307aa67a9c
|
@ -20,6 +20,19 @@ end
|
||||||
|
|
||||||
require 'lspconfig'.rnix.setup {}
|
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
|
-- keybindings
|
||||||
|
|
||||||
local on_attach = function(client, bufrn)
|
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")
|
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts, "LSP", "formatting", "Format")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Launch language servers
|
-- Launch language servers
|
||||||
local servers = {
|
local servers = {
|
||||||
'harepls',
|
'harepls',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user