feat: add elixirls

This commit is contained in:
fiplox 2023-07-02 22:18:44 +02:00
parent 25b1ad327c
commit 3f02e9db50

View File

@ -7,7 +7,7 @@ local M = {
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'williamboman/mason.nvim' }, dependencies = { 'hrsh7th/cmp-nvim-lsp', 'williamboman/mason.nvim' },
} }
local servers = { 'clangd', 'rust_analyzer', 'lua_ls', 'pyright', 'gopls', 'jdtls', 'asm_lsp', 'texlab' } local servers = { 'clangd', 'rust_analyzer', 'lua_ls', 'pyright', 'gopls', 'jdtls', 'asm_lsp', 'texlab', 'elixirls' }
local function on_attach(client, bufnr) local function on_attach(client, bufnr)
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]] --[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
@ -113,6 +113,12 @@ function M.config()
} }
goto continue goto continue
end end
if server == 'elixirls' then
local elixir_opts = {
cmd = { "/home/user/.local/share/nvim/mason/packages/elixir-ls/language_server.sh" },
}
opts = vim.tbl_deep_extend('force', elixir_opts, opts)
end
lspconfig[server].setup(opts) lspconfig[server].setup(opts)
::continue:: ::continue::
end end