You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
955 B

require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "sumneko_lua" }
})
local on_attach = function(_,_)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, {})
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {})
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, {})
vim.keymap.set('n', 'gr', require('telescope.builtin').lsp_references, {})
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
end
require("lspconfig").sumneko_lua.setup({
on_attach = on_attach,
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = {'vim'},
},
telemetry = {
enable = false,
},
},
},
})
require("lspconfig").elixirls.setup({
on_attach = on_attach,
cmd = {"C:/users/sleek/AppData/Roaming/elixir-ls/language_server.bat"},
})