Files
dotfiles/nvim/dot-config/nvim/lua/plugins/lsp-config.lua
Wesley Irvin 72fef12c29 LSP Integration
Integrated LSP functionality into neovim configurations. Installed
Mason to manage the installation of language servers. Used
mason-lspconfig for the bridge between Mason and nvim-lspconfig.
Also installed telescope-ui-select plugin to telescope to allow it
to use telescope and it's windows for code actions.
2024-08-04 21:03:03 -04:00

40 lines
815 B
Lua

return {
{
"williamboman/mason.nvim",
config = function ()
require("mason").setup()
end
},
{
"williamboman/mason-lspconfig.nvim",
config = function ()
require("mason-lspconfig").setup({
ensure_installed = {
"clangd",
"cmake",
"lua_ls",
"pyright",
"rust_analyzer",
"taplo",
}
})
end
},
{
"neovim/nvim-lspconfig",
config = function()
local lspconfig = require("lspconfig")
lspconfig.clangd.setup({})
lspconfig.cmake.setup({})
lspconfig.lua_ls.setup({})
lspconfig.pyright.setup({})
lspconfig.rust_analyzer.setup({})
lspconfig.taplo.setup({})
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {})
end
},
}