feat: refactor and separate LSP/language configurations

This commit is contained in:
NotAShelf 2023-04-17 23:27:27 +03:00
commit 6b512f132a
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
30 changed files with 1266 additions and 522 deletions

View file

@ -1,16 +1,21 @@
{
pkgs,
lib,
config,
...
}:
with lib;
with builtins; {
with builtins; let
cfg = config.vim.autocomplete;
builtSources =
concatMapStringsSep "\n" (x: "{ name = '${x}'},") cfg.sources;
in {
options.vim = {
autocomplete = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable autocomplete via nvim-cmp";
description = "enable autocomplete";
};
type = mkOption {
@ -18,6 +23,12 @@ with builtins; {
default = "nvim-cmp";
description = "Set the autocomplete plugin. Options: [nvim-cmp]";
};
sources = mkOption {
description = "List of source names for nvim-cmp";
type = with types; listOf str;
default = [];
};
};
};
}