mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
Restructure Darwin configuration
So far, this is just based on mightymac. The other devices will be updated soon.
This commit is contained in:
parent
ce3a1b5e20
commit
f95cc09e13
45 changed files with 14 additions and 18 deletions
|
|
@ -1,65 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lemminx", -- xml
|
||||
"lua_ls", -- lua
|
||||
"nil_ls", -- nix
|
||||
"puppet", -- puppet
|
||||
"ruff", -- 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.lemminx.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
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, "--feature-flags=puppetstrings" },
|
||||
settings = { puppet = { editorServices = { formatOnType = { enable = true } } } },
|
||||
})
|
||||
lspconfig.ruff.setup({ on_attach = on_attach })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue