62 lines
1.5 KiB
Lua
62 lines
1.5 KiB
Lua
return {
|
|
{
|
|
"williamboman/mason.nvim",
|
|
config = function()
|
|
require("mason").setup()
|
|
vim.keymap.set('n', '<leader>m', ":Mason<CR>", {})
|
|
end
|
|
},
|
|
{
|
|
"williamboman/mason-lspconfig.nvim",
|
|
config = function()
|
|
require("mason-lspconfig").setup({
|
|
ensure_installed = {
|
|
"lua_ls",
|
|
"rust_analyzer",
|
|
"tsserver",
|
|
"svelte"
|
|
},
|
|
automatic_installation = true
|
|
})
|
|
end
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
config = function()
|
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
|
|
local lspconfig = require("lspconfig")
|
|
|
|
local server_list = require("mason-lspconfig").get_installed_servers()
|
|
|
|
for _, server in pairs(server_list) do
|
|
lspconfig[server].setup({
|
|
capabilities = capabilities
|
|
})
|
|
end
|
|
|
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
|
vim.keymap.set({'n', 'v'}, '<leader>ca', vim.lsp.buf.code_action, {})
|
|
vim.keymap.set('n', 'gb', ":b#<CR>")
|
|
end
|
|
},
|
|
{
|
|
"nvim-telescope/telescope-ui-select.nvim",
|
|
config = function()
|
|
require("telescope").setup {
|
|
extensions = {
|
|
["ui-select"] = {
|
|
require("telescope.themes").get_dropdown {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-- To get ui-select loaded and working with telescope, you need to call
|
|
|
|
-- load_extension, somewhere after setup function:
|
|
require("telescope").load_extension("ui-select")
|
|
end
|
|
}
|
|
}
|