diff --git a/modules/assistant/copilot/copilot.nix b/modules/assistant/copilot/copilot.nix index 9cd8dabc..003308a0 100644 --- a/modules/assistant/copilot/copilot.nix +++ b/modules/assistant/copilot/copilot.nix @@ -9,7 +9,7 @@ with builtins; let cfg = config.vim.assistant.copilot; in { options.vim.assistant.copilot = { - enable = mkEnableOption "Enable GitHub Copilot"; + enable = mkEnableOption "GitHub Copilot AI assistant"; panel = { position = mkOption { diff --git a/modules/assistant/tabnine/tabnine.nix b/modules/assistant/tabnine/tabnine.nix index b977cefb..0682f79f 100644 --- a/modules/assistant/tabnine/tabnine.nix +++ b/modules/assistant/tabnine/tabnine.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.assistant.tabnine = { - enable = mkEnableOption "Enable TabNine assistant"; + enable = mkEnableOption "Tabnine assistant"; disable_auto_comment = mkOption { type = types.bool; diff --git a/modules/autopairs/nvim-autopairs/nvim-autopairs.nix b/modules/autopairs/nvim-autopairs/nvim-autopairs.nix index 1b3f8b78..9dc8c64a 100644 --- a/modules/autopairs/nvim-autopairs/nvim-autopairs.nix +++ b/modules/autopairs/nvim-autopairs/nvim-autopairs.nix @@ -1,17 +1,9 @@ -{ - lib, - config, - ... -}: +{lib, ...}: with lib; with builtins; { options.vim = { autopairs = { - enable = mkOption { - type = types.bool; - default = false; - description = "Enable autopairs"; - }; + enable = mkEnableOption "autopairs" // {default = false;}; type = mkOption { type = types.enum ["nvim-autopairs"]; diff --git a/modules/basic/module.nix b/modules/basic/module.nix index e93c4d43..3db8dfe5 100644 --- a/modules/basic/module.nix +++ b/modules/basic/module.nix @@ -7,7 +7,7 @@ with lib; with builtins; { options.vim = { debugMode = { - enable = mkEnableOption "Enable debug mode"; + enable = mkEnableOption "debug mode"; level = mkOption { type = types.int; default = 20; @@ -151,6 +151,6 @@ with builtins; { description = "Highlight the text line of the cursor with CursorLine hl-CursorLine"; }; - enableLuaLoader = mkEnableOption "Enable the experimental Lua module loader to speed up the start up process"; + enableLuaLoader = mkEnableOption "experimental Lua module loader to speed up the start up process"; }; } diff --git a/modules/comments/comment-nvim/comment-nvim.nix b/modules/comments/comment-nvim/comment-nvim.nix index 6ffbce0f..29646ac6 100644 --- a/modules/comments/comment-nvim/comment-nvim.nix +++ b/modules/comments/comment-nvim/comment-nvim.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.comments.comment-nvim = { - enable = mkEnableOption "Enable comment-nvim"; + enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim"; mappings = { toggleCurrentLine = mkMappingOption "Toggle current line comment" "gcc"; diff --git a/modules/completion/nvim-cmp/nvim-cmp.nix b/modules/completion/nvim-cmp/nvim-cmp.nix index 8011febe..fa7041b7 100644 --- a/modules/completion/nvim-cmp/nvim-cmp.nix +++ b/modules/completion/nvim-cmp/nvim-cmp.nix @@ -3,11 +3,7 @@ with lib; with builtins; { options.vim = { autocomplete = { - enable = mkOption { - type = types.bool; - default = false; - description = "enable autocomplete"; - }; + enable = mkEnableOption "enable autocomplete" // {default = false;}; mappings = { complete = mkMappingOption "Complete [nvim-cmp]" ""; diff --git a/modules/dashboard/alpha/alpha.nix b/modules/dashboard/alpha/alpha.nix index 40edafb0..48b8bfac 100644 --- a/modules/dashboard/alpha/alpha.nix +++ b/modules/dashboard/alpha/alpha.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.dashboard.alpha = { - enable = mkEnableOption "Enable alpha.nvim"; + enable = mkEnableOption "dashboard via alpha.nvim"; }; } diff --git a/modules/dashboard/dashboard-nvim/dashboard-nvim.nix b/modules/dashboard/dashboard-nvim/dashboard-nvim.nix index e74e39ea..6823deb6 100644 --- a/modules/dashboard/dashboard-nvim/dashboard-nvim.nix +++ b/modules/dashboard/dashboard-nvim/dashboard-nvim.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.dashboard.dashboard-nvim = { - enable = mkEnableOption "Enable dashboard.nvim"; + enable = mkEnableOption "dashboard via dashboard.nvim"; }; } diff --git a/modules/dashboard/startify/startify.nix b/modules/dashboard/startify/startify.nix index 5d759646..de208cdd 100644 --- a/modules/dashboard/startify/startify.nix +++ b/modules/dashboard/startify/startify.nix @@ -6,7 +6,7 @@ with builtins; with lib; { options.vim.dashboard.startify = { - enable = mkEnableOption "Enable vim-startify"; + enable = mkEnableOption "dashboard via vim-startify"; bookmarks = mkOption { default = []; diff --git a/modules/filetree/nvimtree-lua/nvimtree-lua.nix b/modules/filetree/nvimtree-lua/nvimtree-lua.nix index d4d167e4..4fe9d6f4 100644 --- a/modules/filetree/nvimtree-lua/nvimtree-lua.nix +++ b/modules/filetree/nvimtree-lua/nvimtree-lua.nix @@ -6,11 +6,7 @@ with lib; with builtins; { options.vim.filetree.nvimTreeLua = { - enable = mkOption { - type = types.bool; - default = false; - description = "Enable nvim-tree-lua"; - }; + enable = mkEnableOption "filetree via nvim-tree-lua" // {default = false;}; mappings = { toggle = mkOption { diff --git a/modules/git/git.nix b/modules/git/git.nix index 51f162fc..c9d059ea 100644 --- a/modules/git/git.nix +++ b/modules/git/git.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.git = { - enable = mkEnableOption "Git support"; + enable = mkEnableOption "git tools via gitsigns"; gitsigns = { enable = mkEnableOption "gitsigns"; diff --git a/modules/languages/clang.nix b/modules/languages/clang.nix index a779dd59..c7f421f8 100644 --- a/modules/languages/clang.nix +++ b/modules/languages/clang.nix @@ -47,31 +47,26 @@ in { }; treesitter = { - enable = mkOption { - description = "Enable C/C++ treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "C/C++ treesitter" // {default = config.vim.languages.enableTreesitter;}; cPackage = nvim.types.mkGrammarOption pkgs "c"; cppPackage = nvim.types.mkGrammarOption pkgs "cpp"; }; lsp = { - enable = mkOption { - description = "Enable clang LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable clang LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "The clang LSP server to use"; type = with types; enum (attrNames servers); default = defaultServer; }; + package = mkOption { description = "clang LSP server package"; type = types.package; default = servers.${cfg.lsp.server}.package; }; + opts = mkOption { description = "Options to pass to clang LSP server"; type = with types; nullOr str; diff --git a/modules/languages/dart/dart.nix b/modules/languages/dart/dart.nix index bc11d2c9..728e64d9 100644 --- a/modules/languages/dart/dart.nix +++ b/modules/languages/dart/dart.nix @@ -26,16 +26,12 @@ in { enable = mkEnableOption "Dart language support"; treesitter = { - enable = mkOption { - description = "Enable Dart treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Dart treesitter" // {default = config.vim.languages.enableTreesitter;}; package = nvim.types.mkGrammarOption pkgs "dart"; }; lsp = { - enable = mkEnableOption "Enable Dart LSP support"; + enable = mkEnableOption "Dart LSP support"; server = mkOption { description = "The Dart LSP server to use"; type = with types; enum (attrNames servers); diff --git a/modules/languages/elixir/elixir-tools.nix b/modules/languages/elixir/elixir-tools.nix index 83da10fc..5232acb5 100644 --- a/modules/languages/elixir/elixir-tools.nix +++ b/modules/languages/elixir/elixir-tools.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.languages.elixir = { - enable = mkEnableOption "elixir support"; + enable = mkEnableOption "Elixir language support"; }; } diff --git a/modules/languages/go.nix b/modules/languages/go.nix index f63a6f46..99440068 100644 --- a/modules/languages/go.nix +++ b/modules/languages/go.nix @@ -26,25 +26,20 @@ in { enable = mkEnableOption "Go language support"; treesitter = { - enable = mkOption { - description = "Enable Go treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Go treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = nvim.types.mkGrammarOption pkgs "go"; }; lsp = { - enable = mkOption { - description = "Enable Go LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable Go LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "Go LSP server to use"; type = with types; enum (attrNames servers); default = defaultServer; }; + package = mkOption { description = "Go LSP server package"; type = types.package; diff --git a/modules/languages/markdown/markdown.nix b/modules/languages/markdown/markdown.nix index d81cb1be..551a6552 100644 --- a/modules/languages/markdown/markdown.nix +++ b/modules/languages/markdown/markdown.nix @@ -9,7 +9,7 @@ with builtins; let cfg = config.vim.languages.markdown; in { options.vim.languages.markdown = { - enable = mkEnableOption "Markdown language support"; + enable = mkEnableOption "Markdown markup language support"; glow.enable = mkOption { type = types.bool; diff --git a/modules/languages/nix.nix b/modules/languages/nix.nix index c6dae73a..4a1c8924 100644 --- a/modules/languages/nix.nix +++ b/modules/languages/nix.nix @@ -96,11 +96,8 @@ in { }; lsp = { - enable = mkOption { - description = "Enable Nix LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable Nix LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "Nix LSP server to use"; type = types.str; @@ -114,11 +111,8 @@ in { }; format = { - enable = mkOption { - description = "Enable Nix formatting"; - type = types.bool; - default = config.vim.languages.enableFormat; - }; + enable = mkEnableOption "Enable Nix formatting" // {default = config.vim.languages.enableFormat;}; + type = mkOption { description = "Nix formatter to use"; type = with types; enum (attrNames formats); diff --git a/modules/languages/python.nix b/modules/languages/python.nix index 367391e5..d25e7c12 100644 --- a/modules/languages/python.nix +++ b/modules/languages/python.nix @@ -41,11 +41,7 @@ in { enable = mkEnableOption "Python language support"; treesitter = { - enable = mkOption { - description = "Enable Python treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Python treesitter" // {default = config.vim.languages.enableTreesitter;}; package = mkOption { description = "Python treesitter grammar to use"; type = types.package; @@ -54,16 +50,14 @@ in { }; lsp = { - enable = mkOption { - description = "Enable Python LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable Python LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "Python LSP server to use"; type = with types; enum (attrNames servers); default = defaultServer; }; + package = mkOption { description = "python LSP server package"; type = types.package; @@ -72,16 +66,14 @@ in { }; format = { - enable = mkOption { - description = "Enable Python formatting"; - type = types.bool; - default = config.vim.languages.enableFormat; - }; + enable = mkEnableOption "Enable Python formatting" // {default = config.vim.languages.enableFormat;}; + type = mkOption { description = "Python formatter to use"; type = with types; enum (attrNames formats); default = defaultFormat; }; + package = mkOption { description = "Python formatter package"; type = types.package; diff --git a/modules/languages/rust.nix b/modules/languages/rust.nix index 25930cdc..1298c9fd 100644 --- a/modules/languages/rust.nix +++ b/modules/languages/rust.nix @@ -12,11 +12,7 @@ in { enable = mkEnableOption "Rust language support"; treesitter = { - enable = mkOption { - description = "Enable Rust treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Rust treesitter" // {default = config.vim.languages.enableTreesitter;}; package = nvim.types.mkGrammarOption pkgs "rust"; }; @@ -30,16 +26,14 @@ in { }; lsp = { - enable = mkOption { - description = "Rust LSP support (rust-analyzer with extra tools)"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Rust LSP support (rust-analyzer with extra tools)" // {default = config.vim.languages.enableLSP;}; + package = mkOption { description = "rust-analyzer package"; type = types.package; default = pkgs.rust-analyzer; }; + opts = mkOption { description = "Options to pass to rust analyzer"; type = types.str; diff --git a/modules/languages/sql.nix b/modules/languages/sql.nix index 0b03cbcf..4093ec91 100644 --- a/modules/languages/sql.nix +++ b/modules/languages/sql.nix @@ -68,11 +68,8 @@ in { }; treesitter = { - enable = mkOption { - description = "Enable SQL treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable SQL treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = mkOption { description = "SQL treesitter grammar to use"; type = types.package; @@ -81,16 +78,14 @@ in { }; lsp = { - enable = mkOption { - description = "Enable SQL LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable SQL LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "SQL LSP server to use"; type = with types; enum (attrNames servers); default = defaultServer; }; + package = mkOption { description = "SQL LSP server package"; type = types.package; @@ -99,16 +94,14 @@ in { }; format = { - enable = mkOption { - description = "Enable SQL formatting"; - type = types.bool; - default = config.vim.languages.enableFormat; - }; + enable = mkEnableOption "Enable SQL formatting" // {default = config.vim.languages.enableFormat;}; + type = mkOption { description = "SQL formatter to use"; type = with types; enum (attrNames formats); default = defaultFormat; }; + package = mkOption { description = "SQL formatter package"; type = types.package; @@ -117,11 +110,8 @@ in { }; extraDiagnostics = { - enable = mkOption { - description = "Enable extra SQL diagnostics"; - type = types.bool; - default = config.vim.languages.enableExtraDiagnostics; - }; + enable = mkEnableOption "Enable extra SQL diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;}; + types = lib.nvim.types.diagnostics { langDesc = "SQL"; inherit diagnostics; diff --git a/modules/languages/svelte.nix b/modules/languages/svelte.nix index 31aaf6d2..a300f053 100644 --- a/modules/languages/svelte.nix +++ b/modules/languages/svelte.nix @@ -58,25 +58,20 @@ in { enable = mkEnableOption "Svelte language support"; treesitter = { - enable = mkOption { - description = "Enable Svelte treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Svelte treesitter" // {default = config.vim.languages.enableTreesitter;}; + sveltePackage = nvim.types.mkGrammarOption pkgs "svelte"; }; lsp = { - enable = mkOption { - description = "Enable Svelte LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable Svelte LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "Svelte LSP server to use"; type = with types; enum (attrNames servers); default = defaultServer; }; + package = mkOption { description = "Svelte LSP server package"; type = types.package; @@ -85,16 +80,14 @@ in { }; format = { - enable = mkOption { - description = "Enable Svelte formatting"; - type = types.bool; - default = config.vim.languages.enableFormat; - }; + enable = mkEnableOption "Enable Svelte formatting" // {default = config.vim.languages.enableFormat;}; + type = mkOption { description = "Svelte formatter to use"; type = with types; enum (attrNames formats); default = defaultFormat; }; + package = mkOption { description = "Svelte formatter package"; type = types.package; @@ -103,11 +96,8 @@ in { }; extraDiagnostics = { - enable = mkOption { - description = "Enable extra Svelte diagnostics"; - type = types.bool; - default = config.vim.languages.enableExtraDiagnostics; - }; + enable = mkEnableOption "Enable extra Svelte diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;}; + types = lib.nvim.types.diagnostics { langDesc = "Svelte"; inherit diagnostics; diff --git a/modules/languages/tidal/tidal.nix b/modules/languages/tidal/tidal.nix index 9554571a..5bcd2550 100644 --- a/modules/languages/tidal/tidal.nix +++ b/modules/languages/tidal/tidal.nix @@ -6,7 +6,7 @@ with lib; with builtins; { options.vim.tidal = { - enable = mkEnableOption "Enable tidalcycles tools and plugins"; + enable = mkEnableOption "tidalcycles tools and plugins"; flash = mkOption { description = ''When sending a paragraph or a single line, vim-tidal will "flash" the selection for some milliseconds''; diff --git a/modules/languages/ts.nix b/modules/languages/ts.nix index 940f8d9f..3989b478 100644 --- a/modules/languages/ts.nix +++ b/modules/languages/ts.nix @@ -58,26 +58,20 @@ in { enable = mkEnableOption "Typescript/Javascript language support"; treesitter = { - enable = mkOption { - description = "Enable Typescript/Javascript treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Typescript/Javascript treesitter" // {default = config.vim.languages.enableTreesitter;}; tsPackage = nvim.types.mkGrammarOption pkgs "tsx"; jsPackage = nvim.types.mkGrammarOption pkgs "javascript"; }; lsp = { - enable = mkOption { - description = "Enable Typescript/Javascript LSP support"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Enable Typescript/Javascript LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { description = "Typescript/Javascript LSP server to use"; type = with types; enum (attrNames servers); default = defaultServer; }; + package = mkOption { description = "Typescript/Javascript LSP server package"; type = types.package; @@ -86,16 +80,14 @@ in { }; format = { - enable = mkOption { - description = "Enable Typescript/Javascript formatting"; - type = types.bool; - default = config.vim.languages.enableFormat; - }; + enable = mkEnableOption "Enable Typescript/Javascript formatting" // {default = config.vim.languages.enableFormat;}; + type = mkOption { description = "Typescript/Javascript formatter to use"; type = with types; enum (attrNames formats); default = defaultFormat; }; + package = mkOption { description = "Typescript/Javascript formatter package"; type = types.package; @@ -104,11 +96,8 @@ in { }; extraDiagnostics = { - enable = mkOption { - description = "Enable extra Typescript/Javascript diagnostics"; - type = types.bool; - default = config.vim.languages.enableExtraDiagnostics; - }; + enable = mkEnableOption "Enable extra Typescript/Javascript diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;}; + types = lib.nvim.types.diagnostics { langDesc = "Typescript/Javascript"; inherit diagnostics; diff --git a/modules/languages/zig.nix b/modules/languages/zig.nix index 02410bed..2c8bf0ff 100644 --- a/modules/languages/zig.nix +++ b/modules/languages/zig.nix @@ -12,24 +12,19 @@ in { enable = mkEnableOption "SQL language support"; treesitter = { - enable = mkOption { - description = "Enable Zig treesitter"; - type = types.bool; - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Enable Zig treesitter" // {default = config.vim.languages.enableTreesitter;}; package = nvim.types.mkGrammarOption pkgs "zig"; }; + lsp = { - enable = mkOption { - description = "Zig LSP support (zls)"; - type = types.bool; - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Zig LSP support (zls)" // {default = config.vim.languages.enableLSP;}; + package = mkOption { description = "ZLS package"; type = types.package; default = pkgs.zls; }; + zigPackage = mkOption { description = "Zig package used by ZLS"; type = types.package; diff --git a/modules/minimap/codewindow/codewindow.nix b/modules/minimap/codewindow/codewindow.nix index 802673e2..d67762ba 100644 --- a/modules/minimap/codewindow/codewindow.nix +++ b/modules/minimap/codewindow/codewindow.nix @@ -1,7 +1,7 @@ {lib, ...}: with lib; { options.vim.minimap.codewindow = { - enable = mkEnableOption "Enable codewindow plugin for minimap view"; + enable = mkEnableOption "codewindow plugin for minimap view"; mappings = { open = mkMappingOption "Open minimap [codewindow]" "mo"; diff --git a/modules/minimap/minimap-vim/minimap-vim.nix b/modules/minimap/minimap-vim/minimap-vim.nix index 33d166a3..bd237aa7 100644 --- a/modules/minimap/minimap-vim/minimap-vim.nix +++ b/modules/minimap/minimap-vim/minimap-vim.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.minimap.minimap-vim = { - enable = mkEnableOption "Enable minimap-vim plugin for minimap view"; + enable = mkEnableOption "minimap-vim plugin for minimap view"; }; } diff --git a/modules/notes/mind-nvim/mind-nvim.nix b/modules/notes/mind-nvim/mind-nvim.nix index aa496d82..d9b069c7 100644 --- a/modules/notes/mind-nvim/mind-nvim.nix +++ b/modules/notes/mind-nvim/mind-nvim.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.notes.mind-nvim = { - enable = mkEnableOption "The power of trees at your fingertips. "; + enable = mkEnableOption "organizer tool for Neovim."; }; } diff --git a/modules/notes/obsidian/obsidian.nix b/modules/notes/obsidian/obsidian.nix index c4631d9c..674c66b4 100644 --- a/modules/notes/obsidian/obsidian.nix +++ b/modules/notes/obsidian/obsidian.nix @@ -7,7 +7,7 @@ with lib; with builtins; { options.vim.notes = { obsidian = { - enable = mkEnableOption "Complementary neovim plugins for Obsidian editor"; + enable = mkEnableOption "complementary neovim plugins for Obsidian editor"; dir = mkOption { type = types.str; default = "~/my-vault"; diff --git a/modules/notes/orgmode/orgmode.nix b/modules/notes/orgmode/orgmode.nix index 68a76206..3ba9e302 100644 --- a/modules/notes/orgmode/orgmode.nix +++ b/modules/notes/orgmode/orgmode.nix @@ -6,15 +6,15 @@ with lib; with builtins; { options.vim.notes.orgmode = { - enable = mkEnableOption "Enable nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds"; + enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds"; orgAgendaFiles = mkOption { type = types.str; - default = "{'~/Dropbox/org/*', '~/my-orgs/**/*'}"; + default = "{'~/Documents/org/*', '~/my-orgs/**/*'}"; description = "List of org files to be used as agenda files."; }; orgDefaultNotesFile = mkOption { type = types.str; - default = "~/Dropbox/org/refile.org"; + default = "~/Documents/org/refile.org"; description = "Default org file to be used for notes."; }; }; diff --git a/modules/notes/todo-comments/todo-comments.nix b/modules/notes/todo-comments/todo-comments.nix index 39b8aadc..992a6c62 100644 --- a/modules/notes/todo-comments/todo-comments.nix +++ b/modules/notes/todo-comments/todo-comments.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.notes.todo-comments = { - enable = mkEnableOption "Enable todo-comments"; + enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base"; patterns = { highlight = mkOption { diff --git a/modules/projects/project-nvim/config.nix b/modules/projects/project-nvim/config.nix index c0faff42..c7f0c671 100644 --- a/modules/projects/project-nvim/config.nix +++ b/modules/projects/project-nvim/config.nix @@ -4,59 +4,49 @@ ... }: with lib; -with builtins; { - options.vim.projects.project-nvim = { - enable = mkEnableOption "Enable project-nvim for project management"; +with builtins; let + cfg = config.vim.projects.project-nvim; +in { + config = mkIf cfg.enable { + vim.startPlugins = [ + "project-nvim" + ]; - manualMode = mkOption { - type = types.bool; - default = true; - description = "don't automatically change the root directory so the user has the option to manually do so using `:ProjectRoot` command"; - }; + vim.luaConfigRC.project-nvim = nvim.dag.entryAnywhere '' + require('project_nvim').setup({ + manual_mode = ${boolToString cfg.manualMode}, + detection_methods = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.detectionMethods)} }, - # detection methods should accept one or more strings from a list - detectionMethods = mkOption { - type = types.listOf types.str; - default = ["lsp" "pattern"]; - description = "Detection methods to use"; - }; + -- All the patterns used to detect root dir, when **"pattern"** is in + -- detection_methods + patterns = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.patterns)} }, - # patterns - patterns = mkOption { - type = types.listOf types.str; - default = [".git" "_darcs" ".hg" ".bzr" ".svn" "Makefile" "package.json" "flake.nix" "cargo.toml"]; - description = "Patterns to use for pattern detection method"; - }; + -- Table of lsp clients to ignore by name + -- eg: { "efm", ... } + ignore_lsp = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.lspIgnored)} }, - # table of lsp servers to ignore by name - lspIgnored = mkOption { - type = types.listOf types.str; - default = []; - description = "LSP servers no ignore by name"; - }; + -- Don't calculate root dir on specific directories + -- Ex: { "~/.cargo/*", ... } + exclude_dirs = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.excludeDirs)} }, - excludeDirs = mkOption { - type = types.listOf types.str; - default = []; - description = "Directories to exclude from project root search"; - }; + -- Show hidden files in telescope + show_hidden = ${boolToString cfg.showHidden}, - showHidden = mkOption { - type = types.bool; - default = false; - description = "Show hidden files in telescope picker"; - }; + -- When set to false, you will get a message when project.nvim changes your + -- directory. + silent_chdir = ${boolToString cfg.silentChdir}, - silentChdir = mkOption { - type = types.bool; - default = true; - description = "Silently change directory when changing project"; - }; + -- What scope to change the directory, valid options are + -- * global (default) + -- * tab + -- * win + scope_chdir = '${toString cfg.scopeChdir}', - scopeChdir = mkOption { - type = types.enum ["global" "tab" "win"]; - default = "global"; - description = "What scope to change the directory"; - }; + -- Path where project.nvim will store the project history for use in + -- telescope + datapath = vim.fn.stdpath("data"), + }) + ''; }; } + diff --git a/modules/projects/project-nvim/project-nvim.nix b/modules/projects/project-nvim/project-nvim.nix index d78e10f5..1a4dc633 100644 --- a/modules/projects/project-nvim/project-nvim.nix +++ b/modules/projects/project-nvim/project-nvim.nix @@ -4,48 +4,60 @@ ... }: with lib; -with builtins; let - cfg = config.vim.projects.project-nvim; -in { - config = mkIf cfg.enable { - vim.startPlugins = [ - "project-nvim" - ]; +with builtins; { + options.vim.projects.project-nvim = { + enable = mkEnableOption "Enable project-nvim for project management"; - vim.luaConfigRC.project-nvim = nvim.dag.entryAnywhere '' - require('project_nvim').setup({ - manual_mode = ${boolToString cfg.manualMode}, - detection_methods = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.detectionMethods)} }, + manualMode = mkOption { + type = types.bool; + default = true; + description = "don't automatically change the root directory so the user has the option to manually do so using `:ProjectRoot` command"; + }; - -- All the patterns used to detect root dir, when **"pattern"** is in - -- detection_methods - patterns = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.patterns)} }, + # detection methods should accept one or more strings from a list + detectionMethods = mkOption { + type = types.listOf types.str; + default = ["lsp" "pattern"]; + description = "Detection methods to use"; + }; - -- Table of lsp clients to ignore by name - -- eg: { "efm", ... } - ignore_lsp = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.lspIgnored)} }, + # patterns + patterns = mkOption { + type = types.listOf types.str; + default = [".git" "_darcs" ".hg" ".bzr" ".svn" "Makefile" "package.json" "flake.nix" "cargo.toml"]; + description = "Patterns to use for pattern detection method"; + }; - -- Don't calculate root dir on specific directories - -- Ex: { "~/.cargo/*", ... } - exclude_dirs = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.excludeDirs)} }, + # table of lsp servers to ignore by name + lspIgnored = mkOption { + type = types.listOf types.str; + default = []; + description = "LSP servers no ignore by name"; + }; - -- Show hidden files in telescope - show_hidden = ${boolToString cfg.showHidden}, + excludeDirs = mkOption { + type = types.listOf types.str; + default = []; + description = "Directories to exclude from project root search"; + }; - -- When set to false, you will get a message when project.nvim changes your - -- directory. - silent_chdir = ${boolToString cfg.silentChdir}, + showHidden = mkOption { + type = types.bool; + default = false; + description = "Show hidden files in telescope picker"; + }; - -- What scope to change the directory, valid options are - -- * global (default) - -- * tab - -- * win - scope_chdir = '${toString cfg.scopeChdir}', + silentChdir = mkOption { + type = types.bool; + default = true; + description = "Silently change directory when changing project"; + }; - -- Path where project.nvim will store the project history for use in - -- telescope - datapath = vim.fn.stdpath("data"), - }) - ''; + scopeChdir = mkOption { + type = types.enum ["global" "tab" "win"]; + default = "global"; + description = "What scope to change the directory"; + }; }; } + diff --git a/modules/rich-presence/presence-nvim/presence-nvim.nix b/modules/rich-presence/presence-nvim/presence-nvim.nix index 491aadd7..f2cc90e6 100644 --- a/modules/rich-presence/presence-nvim/presence-nvim.nix +++ b/modules/rich-presence/presence-nvim/presence-nvim.nix @@ -6,7 +6,7 @@ with lib; with builtins; { options.vim.presence.presence-nvim = { - enable = mkEnableOption "Enable presence.nvim plugin for discord rich presence"; + enable = mkEnableOption "presence.nvim plugin for discord rich presence"; image_text = mkOption { type = types.str; diff --git a/modules/session/nvim-session-manager/nvim-session-manager.nix b/modules/session/nvim-session-manager/nvim-session-manager.nix index 7f84c212..881a6aec 100644 --- a/modules/session/nvim-session-manager/nvim-session-manager.nix +++ b/modules/session/nvim-session-manager/nvim-session-manager.nix @@ -6,7 +6,7 @@ with lib; with builtins; { options.vim.session.nvim-session-manager = { - enable = mkEnableOption "Enable nvim-session-manager"; + enable = mkEnableOption "nvim-session-manager: manage sessions like folders in VSCode"; mappings = { loadSession = mkOption { diff --git a/modules/snippets/vsnip/vsnip.nix b/modules/snippets/vsnip/vsnip.nix index 88e421cd..c59a5d64 100644 --- a/modules/snippets/vsnip/vsnip.nix +++ b/modules/snippets/vsnip/vsnip.nix @@ -1,11 +1,6 @@ -{ - config, - lib, - ... -}: -with lib; -with builtins; { +{lib, ...}: +with lib; { options.vim.snippets.vsnip = { - enable = mkEnableOption "Enable vim-vsnip"; + enable = mkEnableOption "vim-vsnip: snippet LSP/VSCode's format"; }; } diff --git a/modules/statusline/lualine/lualine.nix b/modules/statusline/lualine/lualine.nix index ebc217b5..da89180f 100644 --- a/modules/statusline/lualine/lualine.nix +++ b/modules/statusline/lualine/lualine.nix @@ -8,14 +8,10 @@ with builtins; let supported_themes = import ./supported_themes.nix; in { options.vim.statusline.lualine = { - enable = mkEnableOption "lualine"; + enable = mkEnableOption "lualine statusline plugin"; icons = { - enable = mkOption { - type = types.bool; - description = "Enable icons for lualine"; - default = true; - }; + enable = mkEnableOption "icons for lualine" // {default = true;}; }; refresh = { @@ -125,6 +121,7 @@ in { "mode", separator = { left = '▎', + right = '' }, }, } @@ -184,7 +181,12 @@ in { { "diagnostics", sources = {'nvim_lsp', 'nvim_diagnostic', 'coc'}, - symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '} + symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '}, + diagnostics_color = { + color_error = { fg = colors.red }, + color_warn = { fg = colors.yellow }, + color_info = { fg = colors.cyan }, + }, }, } ''; @@ -224,12 +226,7 @@ in { { "branch", icon = ' •', - separator = { - left = '(', - right = ')' - }, color = {bg='none', fg='lavender'}, - }, } ''; diff --git a/modules/tabline/nvim-bufferline/nvim-bufferline.nix b/modules/tabline/nvim-bufferline/nvim-bufferline.nix index 32e2dd31..ec2478e1 100644 --- a/modules/tabline/nvim-bufferline/nvim-bufferline.nix +++ b/modules/tabline/nvim-bufferline/nvim-bufferline.nix @@ -2,6 +2,8 @@ with lib; with builtins; { options.vim.tabline.nvimBufferline = { + enable = mkEnableOption "nvim-bufferline-lua as a bufferline"; + mappings = { closeCurrent = mkMappingOption "Close buffer" null; cycleNext = mkMappingOption "Next buffer" "bn"; @@ -13,7 +15,5 @@ with builtins; { moveNext = mkMappingOption "Move next buffer" "bmn"; movePrevious = mkMappingOption "Move previous buffer" "bmp"; }; - - enable = mkEnableOption "Enable nvim-bufferline-lua as a bufferline"; }; } diff --git a/modules/terminal/toggleterm/toggleterm.nix b/modules/terminal/toggleterm/toggleterm.nix index 35effffc..2bef2f82 100644 --- a/modules/terminal/toggleterm/toggleterm.nix +++ b/modules/terminal/toggleterm/toggleterm.nix @@ -15,23 +15,27 @@ with builtins; { default = ""; }; }; + direction = mkOption { type = types.enum ["horizontal" "vertical" "tab" "float"]; default = "horizontal"; description = "Direction of the terminal"; }; + enable_winbar = mkOption { type = types.bool; default = false; description = "Enable winbar"; }; + lazygit = { - enable = mkEnableOption "Enable LazyGit integration"; + enable = mkEnableOption "LazyGit integration"; direction = mkOption { type = types.enum ["horizontal" "vertical" "tab" "float"]; default = "float"; description = "Direction of the lazygit window"; }; + package = mkOption { type = with types; nullOr package; default = pkgs.lazygit; diff --git a/modules/ui/colorizer/colorizer.nix b/modules/ui/colorizer/colorizer.nix index 48ec2bdc..54c932a5 100644 --- a/modules/ui/colorizer/colorizer.nix +++ b/modules/ui/colorizer/colorizer.nix @@ -6,7 +6,7 @@ with lib; with builtins; { options.vim.ui.colorizer = { - enable = mkEnableOption "Enable nvim-colorizer.lua for color highlighting"; + enable = mkEnableOption "nvim-colorizer.lua for color highlighting"; options = { rgb = mkOption { diff --git a/modules/ui/modes/modes.nix b/modules/ui/modes/modes.nix index 0aab9576..a1b2dcc4 100644 --- a/modules/ui/modes/modes.nix +++ b/modules/ui/modes/modes.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.ui.modes-nvim = { - enable = mkEnableOption "Enable modes.nvim UI elements"; + enable = mkEnableOption "modes.nvim's prismatic line decorations"; }; } diff --git a/modules/ui/noice/noice.nix b/modules/ui/noice/noice.nix index 481785ed..0b3bd712 100644 --- a/modules/ui/noice/noice.nix +++ b/modules/ui/noice/noice.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.ui.noice = { - enable = mkEnableOption "Enable noice-nvim UI modifications"; + enable = mkEnableOption "noice-nvim UI modification library"; }; } diff --git a/modules/ui/notifications/nvim-notify/nvim-notify.nix b/modules/ui/notifications/nvim-notify/nvim-notify.nix index d24e82db..0028a892 100644 --- a/modules/ui/notifications/nvim-notify/nvim-notify.nix +++ b/modules/ui/notifications/nvim-notify/nvim-notify.nix @@ -6,29 +6,34 @@ with lib; with builtins; { options.vim.notify.nvim-notify = { - enable = mkEnableOption "Enable nvim-notify plugin"; + enable = mkEnableOption "nvim-notify notifications"; stages = mkOption { type = types.enum ["fade_in_slide_out" "fade_in" "slide_out" "none"]; default = "fade_in_slide_out"; description = "The stages of the notification"; }; + timeout = mkOption { type = types.int; default = 1000; description = "The timeout of the notification"; }; + background_colour = mkOption { type = types.str; default = "#000000"; description = "The background colour of the notification"; }; + position = mkOption { type = types.enum ["top_left" "top_right" "bottom_left" "bottom_right"]; default = "top_right"; description = "The position of the notification"; }; + icons = mkOption { type = types.attrsOf types.str; + description = "The icons of the notification"; default = { ERROR = ""; WARN = ""; @@ -36,7 +41,6 @@ with builtins; { DEBUG = ""; TRACE = ""; }; - description = "The icons of the notification"; }; }; } diff --git a/modules/ui/smartcolumn/smartcolumn.nix b/modules/ui/smartcolumn/smartcolumn.nix index 349bf48f..0f01cfc0 100644 --- a/modules/ui/smartcolumn/smartcolumn.nix +++ b/modules/ui/smartcolumn/smartcolumn.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.ui.smartcolumn = { - enable = mkEnableOption "Enable Smartcolumn line length indicator"; + enable = mkEnableOption "line length indicator"; showColumnAt = mkOption { type = types.nullOr types.int; diff --git a/modules/utility/binds/cheatsheet/cheatsheet.nix b/modules/utility/binds/cheatsheet/cheatsheet.nix index c16b1f41..517f4e24 100644 --- a/modules/utility/binds/cheatsheet/cheatsheet.nix +++ b/modules/utility/binds/cheatsheet/cheatsheet.nix @@ -6,6 +6,6 @@ with lib; with builtins; { options.vim.binds.cheatsheet = { - enable = mkEnableOption "Enable cheatsheet-nvim: searchable cheatsheet for nvim using telescope"; + enable = mkEnableOption "cheatsheet-nvim: searchable cheatsheet for nvim using telescope"; }; } diff --git a/modules/utility/binds/which-key/which-key.nix b/modules/utility/binds/which-key/which-key.nix index 41354516..b8e6fa00 100644 --- a/modules/utility/binds/which-key/which-key.nix +++ b/modules/utility/binds/which-key/which-key.nix @@ -1,11 +1,7 @@ -{ - config, - lib, - ... -}: +{lib, ...}: with lib; with builtins; { options.vim.binds.whichKey = { - enable = mkEnableOption "Enable which-key keybind menu"; + enable = mkEnableOption "which-key keybind helper menu"; }; } diff --git a/modules/utility/ccc/ccc.nix b/modules/utility/ccc/ccc.nix index f7366bd9..c0faa555 100644 --- a/modules/utility/ccc/ccc.nix +++ b/modules/utility/ccc/ccc.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.utility.ccc = { - enable = mkEnableOption "Enable ccc color picker for neovim"; + enable = mkEnableOption "ccc color picker for neovim"; mappings = { quit = mkMappingOption "Cancel and close the UI without replace or insert" ""; diff --git a/modules/utility/diffview/diffview.nix b/modules/utility/diffview/diffview.nix index ad66155a..dd6fae3e 100644 --- a/modules/utility/diffview/diffview.nix +++ b/modules/utility/diffview/diffview.nix @@ -1,11 +1,7 @@ -{ - config, - lib, - ... -}: +{lib, ...}: with lib; with builtins; { options.vim.utility.diffview-nvim = { - enable = mkEnableOption "Enable diffview-nvim"; + enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev"; }; } diff --git a/modules/utility/gestures/gesture-nvim/gesture-nvim.nix b/modules/utility/gestures/gesture-nvim/gesture-nvim.nix index d65f4cb3..06071b86 100644 --- a/modules/utility/gestures/gesture-nvim/gesture-nvim.nix +++ b/modules/utility/gestures/gesture-nvim/gesture-nvim.nix @@ -1,7 +1,7 @@ {lib, ...}: with lib; { options.vim.gestures.gesture-nvim = { - enable = mkEnableOption "Enable gesture-nvim plugin"; + enable = mkEnableOption "gesture-nvim: mouse gestures"; mappings = { draw = mkMappingOption "Start drawing [gesture.nvim]" ""; diff --git a/modules/utility/icon-picker/icon-picker.nix b/modules/utility/icon-picker/icon-picker.nix index 231a8b4b..29aee8ed 100644 --- a/modules/utility/icon-picker/icon-picker.nix +++ b/modules/utility/icon-picker/icon-picker.nix @@ -1,11 +1,7 @@ -{ - config, - lib, - ... -}: +{lib, ...}: with lib; with builtins; { options.vim.utility.icon-picker = { - enable = mkEnableOption "Enable nerdfonts icon picker for nvim"; + enable = mkEnableOption "nerdfonts icon picker for nvim"; }; } diff --git a/modules/utility/motion/hop/hop.nix b/modules/utility/motion/hop/hop.nix index c57dc7a2..1eef3f81 100644 --- a/modules/utility/motion/hop/hop.nix +++ b/modules/utility/motion/hop/hop.nix @@ -5,6 +5,6 @@ with lib; { hop = mkMappingOption "Jump to occurences [hop.nvim]" "h"; }; - enable = mkEnableOption "Enable Hop.nvim plugin (easy motion)"; + enable = mkEnableOption "Hop.nvim plugin (easy motion)"; }; } diff --git a/modules/utility/motion/leap/leap.nix b/modules/utility/motion/leap/leap.nix index 045562d4..3ff9302b 100644 --- a/modules/utility/motion/leap/leap.nix +++ b/modules/utility/motion/leap/leap.nix @@ -2,7 +2,7 @@ with lib; with builtins; { options.vim.utility.motion.leap = { - enable = mkEnableOption "Enable leap.nvim plugin (easy motion)"; + enable = mkEnableOption "leap.nvim plugin (easy motion)"; mappings = { leapForwardTo = mkOption { diff --git a/modules/utility/telescope/config.nix b/modules/utility/telescope/config.nix index e7e00dcc..0156a0dd 100644 --- a/modules/utility/telescope/config.nix +++ b/modules/utility/telescope/config.nix @@ -45,6 +45,11 @@ in { mkIf config.vim.treesitter.enable (mkSetBinding mappings.treesitter " Telescope treesitter") ) + + ( + mkIf config.vim.projects.project-nvim.enable + (mkSetBinding mappings.findProjects "") + ) ]; vim.luaConfigRC.telescope = nvim.dag.entryAnywhere '' diff --git a/modules/utility/telescope/telescope.nix b/modules/utility/telescope/telescope.nix index 7735fc15..a48ac06e 100644 --- a/modules/utility/telescope/telescope.nix +++ b/modules/utility/telescope/telescope.nix @@ -3,6 +3,8 @@ with lib; with builtins; { options.vim.telescope = { mappings = { + findProjects = mkMappingOption "Find files [Telescope]" "fp"; + findFiles = mkMappingOption "Find files [Telescope]" "ff"; liveGrep = mkMappingOption "Live grep [Telescope]" "fg"; buffers = mkMappingOption "Buffers [Telescope]" "fb"; @@ -26,6 +28,6 @@ with builtins; { treesitter = mkMappingOption "Treesitter [Telescope]" "fs"; }; - enable = mkEnableOption "Enable multi-purpose telescope utility"; + enable = mkEnableOption "telescope.nvim: multi-purpose search & picker utility"; }; } diff --git a/modules/utility/wakatime/vim-wakatime.nix b/modules/utility/wakatime/vim-wakatime.nix index 2df357eb..496e929f 100644 --- a/modules/utility/wakatime/vim-wakatime.nix +++ b/modules/utility/wakatime/vim-wakatime.nix @@ -6,7 +6,7 @@ with lib; with builtins; { options.vim.utility.vim-wakatime = { - enable = mkEnableOption "Enable vim-wakatime"; + enable = mkEnableOption "vim-wakatime: live code statistics"; cli-package = mkOption { type = with types; nullOr package; diff --git a/modules/visuals/visuals.nix b/modules/visuals/visuals.nix index ceefe55e..2a6bf8e9 100644 --- a/modules/visuals/visuals.nix +++ b/modules/visuals/visuals.nix @@ -12,24 +12,12 @@ in { nvimWebDevicons.enable = mkEnableOption "dev icons. Required for certain plugins [nvim-web-devicons]."; - scrollBar.enable = mkOption { - type = types.bool; - description = "Enable scrollbar [scrollbar.nvim]"; - default = false; - }; + scrollBar.enable = mkEnableOption "Enable scrollbar [scrollbar.nvim]"; - smoothScroll.enable = mkOption { - type = types.bool; - description = "Enable smooth scrolling [cinnamon-nvim]"; - default = false; - }; + smoothScroll.enable = mkEnableOption "Enable smooth scrolling [cinnamon-nvim]"; cellularAutomaton = { - enable = mkOption { - type = types.bool; - description = "Enable cellular automaton [cellular-automaton]"; - default = false; - }; + enable = mkEnableOption "Enable cellular automaton [cellular-automaton]"; mappings = { makeItRain = mkMappingOption "Make it rain [cellular-automaton]" "fml"; @@ -37,11 +25,8 @@ in { }; fidget-nvim = { - enable = mkOption { - type = types.bool; - description = "Enable nvim LSP UI element [fidget-nvim]"; - default = false; - }; + enable = mkEnableOption "Enable nvim LSP UI element [fidget-nvim]"; + align = { bottom = mkOption { type = types.bool; @@ -68,11 +53,7 @@ in { }; indentBlankline = { - enable = mkOption { - type = types.bool; - description = "Enable indentation guides [indent-blankline]"; - default = false; - }; + enable = mkEnableOption "Enable indentation guides [indent-blankline]"; listChar = mkOption { type = types.str;