mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
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:
parent
5b7bb14cd6
commit
dfc94f8c69
27 changed files with 369 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue