mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 17:37:43 -04:00
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.
26 lines
1.1 KiB
Lua
26 lines
1.1 KiB
Lua
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
|
|
}
|