Neovim setup

Can it be this easy to make nvim stuff just work? Do I really just need
to pull the files in with Home Manager? It seems so, so long as nvim
knows about gcc :)

There is also a related side of tmux here because it all ties together.
This commit is contained in:
Gene Liverman 2023-12-19 16:32:37 -05:00
parent 5b7bb14cd6
commit dfc94f8c69
27 changed files with 369 additions and 3 deletions

View file

@ -0,0 +1,26 @@
return {
"neovim/nvim-lspconfig",
config = function ()
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
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {
on_attach = on_attach,
settings = { Lua = { diagnostics = { globals = {'vim'} } } },
}
lspconfig.nil_ls.setup { on_attach = on_attach }
local puppet_languageserver = vim.fn.expand("$HOME/.local/share/nvim/mason/packages/puppet-editor-services/libexec/puppet-languageserver")
lspconfig.puppet.setup {
on_attach = on_attach,
cmd = { puppet_languageserver }
}
lspconfig.ruff_lsp.setup { on_attach = on_attach }
end
}