Skip to content

Commit

Permalink
home-manager/editor/neovim: add enableLsp/enableTreeSitter
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 29, 2023
1 parent 0303a8e commit 668c72f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions home-manager/editor/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ in
enableIcons = lib.mkEnableOption "icons" // {
default = config.home-manager.desktop.enable || config.home-manager.darwin.enable;
};
enableLsp = lib.mkEnableOption "LSP" // {
default = config.home-manager.dev.enable;
};
enableTreeSitter = lib.mkEnableOption "TreeSitter" // {
default = config.home-manager.dev.enable;
};
};

config = lib.mkIf cfg.enable {
Expand Down Expand Up @@ -429,7 +435,7 @@ in
vim-sleuth
vim-surround
]
++ lib.optionals (devCfg.enable) [
++ lib.optionals cfg.enableLsp [
{
plugin = nvim-lspconfig;
config =
Expand Down Expand Up @@ -502,6 +508,8 @@ in
EOF
'';
}
]
++ lib.optionals cfg.enableTreeSitter [
{
plugin = nvim-treesitter.withAllGrammars;
config = ''
Expand Down Expand Up @@ -544,7 +552,7 @@ in
}
nvim-ts-autotag
]
++ lib.optionals (cfg.enableIcons) [
++ lib.optionals cfg.enableIcons [
nvim-web-devicons
];
};
Expand Down

0 comments on commit 668c72f

Please sign in to comment.