Merge commit 'd69ca1091c4df6ee2cdca4f0c1d0cb7eb7d455e5' as 'etc/nvim'

This commit is contained in:
2025-12-26 11:35:16 +01:00
36 changed files with 1218 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
---@module 'lazy'
---@type LazySpec
return { {
'neovim/nvim-lspconfig',
event = { "BufReadPre", "BufNewFile" },
dependencies = { 'saghen/blink.cmp' },
---@type table<string, boolean|vim.lsp.Config>
opts = {
['clangd'] = true,
['ccls'] = false,
['glsl_analyzer'] = true,
['rust_analyzer'] = true,
['omnisharp'] = false,
['lua_ls'] = true,
['html'] = true,
['cssls'] = true,
['ts_ls'] = true,
['jsonls'] = true,
['yamlls'] = {
settings = {
yaml = {
schemas = {
["https://json.schemastore.org/github-workflow.json"] =
"/.github/workflows/*",
["https://json.schemastore.org/clang-format"] = ".clang-format",
["https://json.schemastore.org/clang-tidy"] = ".clang-tidy",
},
},
},
},
},
---@param opts table<string,boolean|vim.lsp.Config>
config = function(_, opts)
-- store the default capabilities
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- enable the LSP
for server, config in pairs(opts) do
if type(config) == 'boolean' then
vim.lsp.enable(server, config)
else
vim.lsp.enable(server, true)
vim.lsp.config[server] = vim.tbl_deep_extend('force', {}, vim.lsp.config[server],
config or {})
end
vim.lsp.config[server].capabilities = capabilities
end
end
} }