mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
rearrange some stuff, switch themes
This commit is contained in:
parent
2af59c0072
commit
0f11ababe4
23 changed files with 183 additions and 155 deletions
58
modules/home-manager/files/nvim/lua/plugins/lsp-config.lua
Normal file
58
modules/home-manager/files/nvim/lua/plugins/lsp-config.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls", -- lua
|
||||
"nil_ls", -- nix
|
||||
"puppet", -- puppet
|
||||
"ruff_lsp", -- python
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"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")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = { Lua = { diagnostics = { globals = { "vim" } } } },
|
||||
})
|
||||
|
||||
lspconfig.nil_ls.setup({
|
||||
capabilities = capabilities,
|
||||
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({
|
||||
capabilities = capabilities,
|
||||
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