neovim-flake/modules/plugins/languages/tex/lsp/default.nix

25 lines
468 B
Nix
Raw Normal View History

2025-01-23 16:34:57 -07:00
{
config,
lib,
...
}: let
2025-01-23 17:05:25 -07:00
inherit (lib.modules) mkIf;
inherit (builtins) any attrValues;
2025-01-23 16:34:57 -07:00
cfg = config.vim.languages.tex;
in {
2025-01-23 16:54:21 -07:00
imports = [
./texlab.nix
];
2025-01-23 16:34:57 -07:00
config =
mkIf
(
cfg.enable # Check if nvf is enabled.
&& (any (x: x.enable) (attrValues cfg.lsp)) # Check if any of the LSPs have been enabled.
)
{
vim.lsp.lspconfig.enable = lib.mkDefault true; # Enable lspconfig when any of the lsps are enabled
};
2025-01-23 16:34:57 -07:00
}