editor: setting up neovim again
been using helix for a few years now, but wanted to test the neovim waters again. mostly just ripped off "neovim for newbs" https://www.youtube.com/watch?v=zHTeCSVAFNY&list=PLsz00TDipIffreIaUNk64KxTIkQaGguqn
This commit is contained in:
parent
25e22570c8
commit
4db7bcac3b
19 changed files with 333 additions and 33 deletions
home/private_dot_config/nvim/lua/plugins
33
home/private_dot_config/nvim/lua/plugins/lsp-config.lua
Normal file
33
home/private_dot_config/nvim/lua/plugins/lsp-config.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- lua
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({ "n", "v" }, "<leader>c", "", { desc = "+code" })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, { desc = "action" })
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue