Dotfiles V.1.2.0

This commit is contained in:
2025-12-14 22:40:50 +01:00
parent af9d88c05f
commit 9d1aa2be86
50 changed files with 582 additions and 1667 deletions

View File

@@ -1,66 +1,22 @@
return {
"neovim/nvim-lspconfig",
"hrsh7th/cmp-nvim-lsp",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"onsails/lspkind.nvim",
{ "folke/neodev.nvim", opts = {} },
{ "folke/lazydev.nvim", ft = "lua", opts = {} },
},
config = function()
local lspconfig = require("lspconfig")
local mason_lspconfig = require("mason-lspconfig")
local cmp_nvim_lsp = require("cmp_nvim_lsp")
local wk = require("which-key")
local capabilities = cmp_nvim_lsp.default_capabilities()
mason_lspconfig.setup({
function(server_name)
lspconfig[server_name].setup({
capabilities = capabilities,
})
end,
})
vim.lsp.config("lua_ls", {
vim.lsp.config("*", {
capabilities = capabilities,
settings = { -- custom settings for lua
Lua = {
-- make the language server recognize "vim" global
diagnostics = {
globals = { "vim" },
},
workspace = {
-- make language server aware of runtime files
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.stdpath("config") .. "/lua"] = true,
},
},
},
},
})
vim.lsp.config("pyright", {
capabilities = capabilities,
filetypes = { "python" },
settings = {
python = {
pythonPath = vim.fn.exepath("python3.12"),
},
},
})
vim.lsp.config("ltex", {
settings = {
ltex = {
language = "de-CH",
checkFrequency = "save",
},
},
})
vim.diagnostic.config({
virtual_text = true,
signs = true,
virtual_lines = true,
})
wk.add({