mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: move nixvim out
This commit is contained in:
parent
4477a98282
commit
57815057f6
11 changed files with 329 additions and 109 deletions
63
nixvim/plugins/lsp.nix
Normal file
63
nixvim/plugins/lsp.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
lib,
|
||||
std,
|
||||
...
|
||||
}: let
|
||||
inherit (std) set;
|
||||
inherit (lib.attrsets) genAttrs;
|
||||
in {
|
||||
lsp.servers = let
|
||||
baseServer = {
|
||||
enable = true;
|
||||
activate = true;
|
||||
};
|
||||
disablePackage = {
|
||||
package = null;
|
||||
};
|
||||
serversToGen = [
|
||||
"rust_analyzer"
|
||||
"nixd"
|
||||
"zk"
|
||||
"gleam"
|
||||
"luau_lsp"
|
||||
"stylua"
|
||||
];
|
||||
disabledPackageServers = [
|
||||
"rust_analyzer"
|
||||
"luau_lsp"
|
||||
"stylua"
|
||||
];
|
||||
in
|
||||
set.merge [
|
||||
(genAttrs serversToGen (_: baseServer))
|
||||
(genAttrs disabledPackageServers (_: disablePackage))
|
||||
{
|
||||
}
|
||||
];
|
||||
plugins = let
|
||||
pluginsToGen = [
|
||||
"lspconfig"
|
||||
"cmp"
|
||||
"cmp-clippy"
|
||||
"cmp-cmdline"
|
||||
"cmp-emoji"
|
||||
"cmp-nvim-lsp"
|
||||
"cmp-path"
|
||||
"cmp-rg"
|
||||
"cmp-spell"
|
||||
"cmp-tmux"
|
||||
"cmp-treesitter"
|
||||
"cmp-zsh"
|
||||
];
|
||||
basePlugin = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
};
|
||||
in
|
||||
genAttrs pluginsToGen (_: basePlugin);
|
||||
diagnostic.settings = {
|
||||
virtual_text = true;
|
||||
virtual_lines = true;
|
||||
underlines = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue