2024-01-02 17:59:50 +00:00
|
|
|
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")
|
|
|
|
|
2024-01-04 00:46:13 +00:00
|
|
|
local server_list = require("mason-lspconfig").get_installed_servers()
|
|
|
|
|
|
|
|
for _, server in pairs(server_list) do
|
|
|
|
lspconfig[server].setup({
|
|
|
|
capabilities = capabilities
|
|
|
|
})
|
|
|
|
end
|
2024-01-02 17:59:50 +00:00
|
|
|
|
|
|
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
|
|
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
2024-01-04 00:46:51 +00:00
|
|
|
vim.keymap.set({'n', 'v'}, '<leader>ca', vim.lsp.buf.code_action, {})
|
|
|
|
vim.keymap.set('n', 'gb', ":b#<CR>")
|
2024-01-02 17:59:50 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|