mirror of
https://github.com/fredrikr79/nixos.git
synced 2026-01-08 08:03:46 +01:00
fix lspconfig
This commit is contained in:
24
flake.lock
generated
24
flake.lock
generated
@@ -23,11 +23,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754487366,
|
||||
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||
"lastModified": 1756770412,
|
||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -125,11 +125,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1756285913,
|
||||
"narHash": "sha256-Xkh8k2vLzGMfhIMjr8o/+umqHCUc93uKaT/bPfwiUq4=",
|
||||
"lastModified": 1758929182,
|
||||
"narHash": "sha256-X19cIFQS8fwJy6bWNsmXUxeudGapv9/3Q5yfbEuVgyU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "acd03311d9c1575e7f1fdebfb7d3bd51717d5fa9",
|
||||
"rev": "eeb12bd734acc270f419bd91936ebec41689026a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -148,11 +148,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756261579,
|
||||
"narHash": "sha256-U9U1FPnbPP8D7HRbctDzSDtiPE3Ud91sfOy6TWhLOEw=",
|
||||
"lastModified": 1758928993,
|
||||
"narHash": "sha256-w5bXhw7jLBC/FzfPpj5dtuIXenyDn9TPMLUeyrKs0cU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "6392a2f44f3a54e00c4095e8ba0dea378a52ca89",
|
||||
"rev": "f68f9d145a9bfe2bd56a29744d76d54ea5130595",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -171,11 +171,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755555503,
|
||||
"narHash": "sha256-WiOO7GUOsJ4/DoMy2IC5InnqRDSo2U11la48vCCIjjY=",
|
||||
"lastModified": 1758662783,
|
||||
"narHash": "sha256-igrxT+/MnmcftPOHEb+XDwAMq3Xg1Xy7kVYQaHhPlAg=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "6f3efef888b92e6520f10eae15b86ff537e1d2ea",
|
||||
"rev": "7d4c0fc4ffe3bd64e5630417162e9e04e64b27a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
203
home.nix
203
home.nix
@@ -369,7 +369,103 @@ in
|
||||
foldlevel = 99;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
inlayHints.enable = true;
|
||||
servers = {
|
||||
"*" = {
|
||||
settings = {
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
semanticTokens = {
|
||||
multilineTokenSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
root_markers = [
|
||||
".git"
|
||||
".jj"
|
||||
];
|
||||
};
|
||||
};
|
||||
pyright.enable = true;
|
||||
nil_ls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
hls.enable = true;
|
||||
tinymist = {
|
||||
enable = true;
|
||||
settings = {
|
||||
exportPdf = "onType";
|
||||
fontPaths = [
|
||||
"$dir/"
|
||||
"./"
|
||||
"\${workspaceFolder}/fonts"
|
||||
"\${workspaceFolder}/"
|
||||
];
|
||||
formatterMode = "typstyle";
|
||||
};
|
||||
};
|
||||
clangd.enable = true;
|
||||
vtsls.enable = true;
|
||||
marksman.enable = true;
|
||||
uiua.enable = true;
|
||||
omnisharp.enable = true;
|
||||
ols.enable = true;
|
||||
rust_analyzer.enable = true;
|
||||
superhtml.enable = true;
|
||||
};
|
||||
# keymaps = [
|
||||
# {
|
||||
# "*".options.silent = true;
|
||||
# }
|
||||
# ];
|
||||
# diagnostic = {
|
||||
# "<leader>j" = "goto_next";
|
||||
# "<leader>k" = "goto_prev";
|
||||
# "<leader>e" = "open_float";
|
||||
# };
|
||||
# lspBuf = {
|
||||
# gd = {
|
||||
# action = "definition";
|
||||
# desc = "Goto Definition";
|
||||
# };
|
||||
# gr = {
|
||||
# action = "references";
|
||||
# desc = "Goto References";
|
||||
# };
|
||||
# gD = {
|
||||
# action = "declaration";
|
||||
# desc = "Goto Declaration";
|
||||
# };
|
||||
# gI = {
|
||||
# action = "implementation";
|
||||
# desc = "Goto Implementation";
|
||||
# };
|
||||
# gT = {
|
||||
# action = "type_definition";
|
||||
# desc = "Type Definition";
|
||||
# };
|
||||
# K = {
|
||||
# action = "hover";
|
||||
# desc = "Hover";
|
||||
# };
|
||||
# "<leader>cw" = {
|
||||
# action = "workspace_symbol";
|
||||
# desc = "Workspace Symbol";
|
||||
# };
|
||||
# "<leader>cr" = {
|
||||
# action = "rename";
|
||||
# desc = "Rename";
|
||||
# };
|
||||
# "<leader>ca" = {
|
||||
# action = "code_action";
|
||||
# desc = "code action";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
plugins = {
|
||||
lspconfig.enable = true;
|
||||
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
|
||||
@@ -552,97 +648,6 @@ in
|
||||
|
||||
lsp-format.enable = true;
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
"<leader>j" = "goto_next";
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>e" = "open_float";
|
||||
};
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
K = {
|
||||
action = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
"<leader>ca" = {
|
||||
action = "code_action";
|
||||
desc = "code action";
|
||||
};
|
||||
};
|
||||
};
|
||||
servers = {
|
||||
pyright.enable = true;
|
||||
nil_ls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
hls = {
|
||||
enable = true;
|
||||
installGhc = true;
|
||||
};
|
||||
tinymist = {
|
||||
enable = true;
|
||||
settings = {
|
||||
exportPdf = "onType";
|
||||
fontPaths = [
|
||||
"$dir/"
|
||||
"./"
|
||||
"\${workspaceFolder}/fonts"
|
||||
"\${workspaceFolder}/"
|
||||
];
|
||||
# formatterMode = "typstfmt";
|
||||
formatterMode = "typstyle";
|
||||
};
|
||||
};
|
||||
clangd.enable = true;
|
||||
vtsls.enable = true;
|
||||
marksman.enable = true;
|
||||
uiua.enable = true;
|
||||
omnisharp.enable = true;
|
||||
ols.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
superhtml.enable = true;
|
||||
};
|
||||
|
||||
onAttach = ''
|
||||
if client.server_capabilities.semanticTokensProvider then
|
||||
vim.lsp.semantic_tokens.start(bufnr, client.id)
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
friendly-snippets.enable = true;
|
||||
luasnip.enable = true;
|
||||
|
||||
@@ -925,9 +930,6 @@ in
|
||||
|
||||
nvim-ufo.enable = true; # folds
|
||||
|
||||
lspconfig = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
luasnip = require("luasnip")
|
||||
@@ -960,19 +962,6 @@ in
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
ua = "uiua",
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "uiua",
|
||||
callback = function()
|
||||
vim.bo.commentstring = "# %s"
|
||||
end,
|
||||
})
|
||||
|
||||
-- LSP Semantic Token highlighting for Uiua with Dracula colors
|
||||
vim.api.nvim_set_hl(0, "@lsp.type.stack_function.uiua", { fg = "#f8f8f2" })
|
||||
vim.api.nvim_set_hl(0, "@lsp.type.noadic_function.uiua", { fg = "#ff5555" })
|
||||
|
||||
Reference in New Issue
Block a user