diff options
Diffstat (limited to 'modules')
48 files changed, 337 insertions, 609 deletions
diff --git a/modules/by-name/nv/nvim/autocmds/default.nix b/modules/by-name/nv/nvim/autocmds/default.nix index 706f1bbd..4d7b4894 100644 --- a/modules/by-name/nv/nvim/autocmds/default.nix +++ b/modules/by-name/nv/nvim/autocmds/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - config.home-manager.users.soispha = lib.mkIf cfg.enable { +{config}: { + home-manager.users.soispha = { programs.nixvim = { autoGroups = { cursor_off = {clear = true;}; diff --git a/modules/by-name/nv/nvim/clipboard/default.nix b/modules/by-name/nv/nvim/clipboard/default.nix index f6348e44..26b9ce1a 100644 --- a/modules/by-name/nv/nvim/clipboard/default.nix +++ b/modules/by-name/nv/nvim/clipboard/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { clipboard.providers = { wl-copy.enable = true; }; diff --git a/modules/by-name/nv/nvim/mappings/default.nix b/modules/by-name/nv/nvim/mappings/default.nix index 683b0465..6cd34b11 100644 --- a/modules/by-name/nv/nvim/mappings/default.nix +++ b/modules/by-name/nv/nvim/mappings/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - config.home-manager.users.soispha = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha = { programs.nixvim = { globals = { mapleader = " "; diff --git a/modules/by-name/nv/nvim/module.nix b/modules/by-name/nv/nvim/module.nix index 17cc8dcc..66ba7ad6 100644 --- a/modules/by-name/nv/nvim/module.nix +++ b/modules/by-name/nv/nvim/module.nix @@ -21,18 +21,15 @@ useShards = false; baseDirectory = ./plgs; fileName = "default.nix"; + finalizeFunction = name: path: import path {inherit config lib pkgs extra_lib;}; }); -in { - imports = - [ - ./autocmds - ./clipboard - ./mappings - ./options - ./performance - ] - ++ plgs; + autocmds = import ./autocmds {inherit config;}; + clipboard = import ./clipboard {}; + mappings = import ./mappings {}; + options = import ./options {inherit config lib;}; + performance = import ./performance {}; +in { options.soispha.programs.nvim = { enable = lib.mkEnableOption "custom nvim config"; shell = lib.mkOption { @@ -41,62 +38,72 @@ in { }; }; - config = lib.mkIf cfg.enable { - soispha.services.unison.pathsToSync = [ - "~/.local/state/nvim" - ]; - vhack.persist.userDirectories.soispha = [ - ".local/state/nvim" - ]; + config = lib.mkIf cfg.enable ( + lib.mkMerge (plgs + ++ [ + autocmds + clipboard + mappings + options + performance + { + soispha.services.unison.pathsToSync = [ + "~/.local/state/nvim" + ]; + vhack.persist.userDirectories.soispha = [ + ".local/state/nvim" + ]; - home-manager.users.soispha = { - imports = [ - extra_modules.home.nixvim - ]; + home-manager.users.soispha = { + imports = [ + extra_modules.home.nixvim + ]; - home.sessionVariables = { - EDITOR = "nvim"; - VISUAL = "nvim"; - CODEEDITOR = "nvim"; - }; + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + CODEEDITOR = "nvim"; + }; - programs.nixvim = { - enable = true; + programs.nixvim = { + enable = true; - # Use my global nixpkgs set, instead of constructing a separate one. - nixpkgs.useGlobalPackages = true; + # Use my global nixpkgs set, instead of constructing a separate one. + nixpkgs.useGlobalPackages = true; - # source: https://www.patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Neovim - extraConfigLuaPre = lib.mkBefore '' - --------------------------------------------------------------------------- - -- - -- ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ - -- ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ - -- ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ - -- ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ - -- ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ - -- ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ - -- - --------------------------------------------------------------------------- - ''; + # source: https://www.patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Neovim + extraConfigLuaPre = lib.mkBefore '' + --------------------------------------------------------------------------- + -- + -- ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ + -- ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ + -- ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ + -- ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ + -- ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ + -- ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + -- + --------------------------------------------------------------------------- + ''; - extraPackages = [ - /* - These are mostly linters and formatters used for different file types. - Including them here is fine, as they are not necessarily-sync able to different people. - */ - # nix - pkgs.alejandra - pkgs.statix + extraPackages = [ + /* + These are mostly linters and formatters used for different file types. + Including them here is fine, as they are not necessarily-sync able to different people. + */ + # nix + pkgs.alejandra + pkgs.statix - # yaml - pkgs.yamllint + # yaml + pkgs.yamllint - # shell - pkgs.shellcheck - pkgs.shfmt - ]; - }; - }; - }; + # shell + pkgs.shellcheck + pkgs.shfmt + ]; + }; + }; + } + ]) + ); } diff --git a/modules/by-name/nv/nvim/options/default.nix b/modules/by-name/nv/nvim/options/default.nix index 301f0ac0..8d720aba 100644 --- a/modules/by-name/nv/nvim/options/default.nix +++ b/modules/by-name/nv/nvim/options/default.nix @@ -10,11 +10,10 @@ { config, lib, - ... }: let cfg = config.soispha.programs.nvim; in { - home-manager.users.soispha.programs.nixvim.opts = lib.mkIf cfg.enable { + home-manager.users.soispha.programs.nixvim.opts = { autoindent = true; # copy indent from previous line cindent = true; # use c like indenting rules breakindent = true; # continue indent visually diff --git a/modules/by-name/nv/nvim/performance/default.nix b/modules/by-name/nv/nvim/performance/default.nix index a392a672..d3e1f9ca 100644 --- a/modules/by-name/nv/nvim/performance/default.nix +++ b/modules/by-name/nv/nvim/performance/default.nix @@ -1,11 +1,5 @@ -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { performance = { combinePlugins = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/colorscheme/default.nix b/modules/by-name/nv/nvim/plgs/colorscheme/default.nix index f8cd5892..e4ae5038 100644 --- a/modules/by-name/nv/nvim/plgs/colorscheme/default.nix +++ b/modules/by-name/nv/nvim/plgs/colorscheme/default.nix @@ -9,13 +9,10 @@ # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { pkgs, - config, lib, ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +}:{ + home-manager.users.soispha.programs.nixvim = { # TODO: package nightfox though a module extraConfigLuaPost = '' ${lib.strings.fileContents ./lua/nightfox.lua} diff --git a/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix b/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix index 68a88d32..c23cd84d 100644 --- a/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix +++ b/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.comment = { enable = true; settings = { diff --git a/modules/by-name/nv/nvim/plgs/femaco/default.nix b/modules/by-name/nv/nvim/plgs/femaco/default.nix index eac6b393..d94b546c 100644 --- a/modules/by-name/nv/nvim/plgs/femaco/default.nix +++ b/modules/by-name/nv/nvim/plgs/femaco/default.nix @@ -9,11 +9,8 @@ # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { lib, - config, ... -}: let - cfg = config.soispha.programs.nvim; -in { +}: { # TODO: Re-active this plugin, when it does no longer depend on `treesitter-legacy` <2026-01-18> home-manager.users.soispha.programs.nixvim = lib.mkIf false { plugins.femaco = { diff --git a/modules/by-name/nv/nvim/plgs/goto-preview/default.nix b/modules/by-name/nv/nvim/plgs/goto-preview/default.nix index 93761dfd..a3adb465 100644 --- a/modules/by-name/nv/nvim/plgs/goto-preview/default.nix +++ b/modules/by-name/nv/nvim/plgs/goto-preview/default.nix @@ -10,12 +10,9 @@ { pkgs, lib, - config, ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +}: { + home-manager.users.soispha.programs.nixvim = { # TODO: package goto-preview though a module extraConfigLuaPost = '' ${lib.strings.fileContents ./lua/goto-preview.lua} diff --git a/modules/by-name/nv/nvim/plgs/harpoon/default.nix b/modules/by-name/nv/nvim/plgs/harpoon/default.nix index c85c7c80..a12ddfc2 100644 --- a/modules/by-name/nv/nvim/plgs/harpoon/default.nix +++ b/modules/by-name/nv/nvim/plgs/harpoon/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{lib, ...}: { + home-manager.users.soispha.programs.nixvim = { plugins.harpoon.enable = true; keymaps = diff --git a/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix b/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix index e652a60d..3ad264dc 100644 --- a/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix +++ b/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix @@ -7,15 +7,9 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - ... -}: let - cfg = config.soispha.programs.nvim; -in { +{...}: { # TODO: change the nvim path, when I change the path with lf - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { + home-manager.users.soispha.programs.nixvim = { plugins.lf = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/lsp/default.nix b/modules/by-name/nv/nvim/plgs/lsp/default.nix index 27a6f909..895cf482 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/default.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/default.nix @@ -8,37 +8,41 @@ # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { - config, lib, + extra_lib, + config, + pkgs, ... }: let - cfg = config.soispha.programs.nvim; -in { - imports = [ - ./keymaps - ./servers - ]; - home-manager.users.soispha.programs.nixvim.plugins.lsp = lib.mkIf cfg.enable { - enable = true; - onAttach = - "" - # + '' - # function(client, bufnr) - # -- Enable completion triggered by <c-x><c-o> - # -- vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - # end - # '' - ; - preConfig = '' - vim.diagnostic.config({ - underline = true, - -- virtual_text = true, - virtual_text = { - source = "always", -- Or "if_many" - }, - update_in_insert = true, - severity_sort = true, - }, nil); - ''; - }; -} + keymaps = import ./keymaps {}; + servers = import ./servers {inherit extra_lib config lib pkgs;}; +in + lib.mkMerge [ + keymaps + servers + { + home-manager.users.soispha.programs.nixvim.plugins.lsp = { + enable = true; + onAttach = + "" + # + '' + # function(client, bufnr) + # -- Enable completion triggered by <c-x><c-o> + # -- vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + # end + # '' + ; + preConfig = '' + vim.diagnostic.config({ + underline = true, + -- virtual_text = true, + virtual_text = { + source = "always", -- Or "if_many" + }, + update_in_insert = true, + severity_sort = true, + }, nil); + ''; + }; + } + ] diff --git a/modules/by-name/nv/nvim/plgs/lsp/keymaps/default.nix b/modules/by-name/nv/nvim/plgs/lsp/keymaps/default.nix index 7cc9f6d5..13f31ee7 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/keymaps/default.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/keymaps/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.keymaps = { diagnostic = { "N" = { diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix index 0e7be6e8..52e478a5 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix @@ -7,18 +7,18 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{...}: { - imports = [ - ./servers/bashls.nix - ./servers/ccls.nix - ./servers/ltex.nix - ./servers/lua-ls.nix - ./servers/nil-ls.nix - ./servers/openscad.nix - ./servers/quick-lint-js.nix - ./servers/ruff-lsp.nix - ./servers/rust-analyzer.nix - ./servers/texlab.nix - ./servers/zls.nix - ]; -} +{ + extra_lib, + config, + lib, + pkgs, + ... +}: let + servers = builtins.attrValues (extra_lib.mkByName { + useShards = false; + baseDirectory = ./servers; + fileName = "default.nix"; + finalizeFunction = name: path: import path {inherit config lib pkgs;}; + }); +in + lib.mkMerge servers diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/bashls.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/bashls/default.nix index 8d2b0d03..1ed049c4 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/bashls.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/bashls/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { bashls.enable = true; }; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ccls.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ccls/default.nix index eed7f349..59e79cd4 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ccls.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ccls/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { ccls.enable = true; }; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ltex.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ltex/default.nix index 5c0024f0..502ad696 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ltex.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ltex/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { ltex = let filetypes = [ diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/lua-ls.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/lua-ls/default.nix index 9350cd37..ddd7609a 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/lua-ls.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/lua-ls/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { lua_ls = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/nil-ls.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/nil-ls/default.nix index 3b7e2523..6c4eef96 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/nil-ls.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/nil-ls/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { nil_ls = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad/default.nix index 1d516c9d..4e4353bc 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { extraConfigLuaPost = /* lua diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js/default.nix index 097abfbe..edc0b10a 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { extraConfigLuaPost = /* lua diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ruff-lsp.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ruff-lsp/default.nix index 3ad3ad8f..da30be2f 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ruff-lsp.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/ruff-lsp/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - pkgs, - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { ruff = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/rust-analyzer.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/rust-analyzer/default.nix index fd344c50..cf58653b 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/rust-analyzer.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/rust-analyzer/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { rust_analyzer = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/texlab.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/texlab/default.nix index 5f001177..3181c77d 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/texlab.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/texlab/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { plugins.lsp.servers = { texlab = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls/default.nix index aab7a135..cb2353b1 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - pkgs, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { extraConfigLuaPost = /* lua diff --git a/modules/by-name/nv/nvim/plgs/lspkind/default.nix b/modules/by-name/nv/nvim/plgs/lspkind/default.nix index 3846fa32..1b78d4ff 100644 --- a/modules/by-name/nv/nvim/plgs/lspkind/default.nix +++ b/modules/by-name/nv/nvim/plgs/lspkind/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.lspkind = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim.plugins.lspkind = { enable = true; settings.preset = "default"; # "codicons" is only for a font patched with vscode-codeicons. }; diff --git a/modules/by-name/nv/nvim/plgs/ltex_extra/default.nix b/modules/by-name/nv/nvim/plgs/ltex_extra/default.nix index a01d5653..66ce7b96 100644 --- a/modules/by-name/nv/nvim/plgs/ltex_extra/default.nix +++ b/modules/by-name/nv/nvim/plgs/ltex_extra/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - pkgs, - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { # TODO: package ltex_extra though a module extraPlugins = [ pkgs.vimPlugins.ltex_extra-nvim diff --git a/modules/by-name/nv/nvim/plgs/lualine/default.nix b/modules/by-name/nv/nvim/plgs/lualine/default.nix index 7a69519b..c42181de 100644 --- a/modules/by-name/nv/nvim/plgs/lualine/default.nix +++ b/modules/by-name/nv/nvim/plgs/lualine/default.nix @@ -7,131 +7,124 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.lualine = let - get_location_of_file = { - __raw = '' - function() - local file_lines = vim.fn.line('$'); - local file_current_cursor_positon = vim.fn.getcurpos(); - return file_current_cursor_positon[3] .. ":" .. file_current_cursor_positon[2] .. "/" .. file_lines - end - ''; - }; +{...}: let + get_location_of_file = { + __raw = '' + function() + local file_lines = vim.fn.line('$'); + local file_current_cursor_positon = vim.fn.getcurpos(); + return file_current_cursor_positon[3] .. ":" .. file_current_cursor_positon[2] .. "/" .. file_lines + end + ''; + }; - get_trailing_whitespace = { - __raw = '' + get_trailing_whitespace = { + __raw = '' + function() + local space = vim.fn.search([[\s\+$]], 'nwc') + return space ~= 0 and "TW:" .. space or "" + end + ''; + }; + get_mixed_indent = { + __raw = + /* + lua + */ + '' function() - local space = vim.fn.search([[\s\+$]], 'nwc') - return space ~= 0 and "TW:" .. space or "" + local space_pat = [[\v^ +]] + local tab_pat = [[\v^\t+]] + local space_indent = vim.fn.search(space_pat, 'nwc') + local tab_indent = vim.fn.search(tab_pat, 'nwc') + local mixed = (space_indent > 0 and tab_indent > 0) + local mixed_same_line + if not mixed then + mixed_same_line = vim.fn.search([[\v^(\t+ | +\t)]], 'nwc') + mixed = mixed_same_line > 0 + end + if not mixed then return "" end + if mixed_same_line ~= nil and mixed_same_line > 0 then + return 'MI:' .. mixed_same_line + end + local space_indent_cnt = vim.fn.searchcount({ pattern = space_pat, max_count = 1e3 }).total + local tab_indent_cnt = vim.fn.searchcount({ pattern = tab_pat, max_count = 1e3 }).total + if space_indent_cnt > tab_indent_cnt then + return 'MI:' .. tab_indent + else + return 'MI:' .. space_indent + end end ''; - }; - get_mixed_indent = { - __raw = - /* - lua - */ - '' - function() - local space_pat = [[\v^ +]] - local tab_pat = [[\v^\t+]] - local space_indent = vim.fn.search(space_pat, 'nwc') - local tab_indent = vim.fn.search(tab_pat, 'nwc') - local mixed = (space_indent > 0 and tab_indent > 0) - local mixed_same_line - if not mixed then - mixed_same_line = vim.fn.search([[\v^(\t+ | +\t)]], 'nwc') - mixed = mixed_same_line > 0 - end - if not mixed then return "" end - if mixed_same_line ~= nil and mixed_same_line > 0 then - return 'MI:' .. mixed_same_line - end - local space_indent_cnt = vim.fn.searchcount({ pattern = space_pat, max_count = 1e3 }).total - local tab_indent_cnt = vim.fn.searchcount({ pattern = tab_pat, max_count = 1e3 }).total - if space_indent_cnt > tab_indent_cnt then - return 'MI:' .. tab_indent - else - return 'MI:' .. space_indent - end - end - ''; - }; - in - lib.mkIf cfg.enable { - enable = true; + }; +in { + home-manager.users.soispha.programs.nixvim.plugins.lualine = { + enable = true; - settings = { - options = { - iconsEnabled = true; - theme = "nightfox"; - }; + settings = { + options = { + iconsEnabled = true; + theme = "nightfox"; + }; - # TODO: add all installed and supported extensions here - extensions = [ - "toggleterm" - #"fugitive" # TODO: maybe add this? - ]; + # TODO: add all installed and supported extensions here + extensions = [ + "toggleterm" + #"fugitive" # TODO: maybe add this? + ]; - componentSeparators = { - left = ""; - right = ""; - }; - sectionSeparators = { - left = ""; - right = ""; - }; - disabledFiletypes = { - statusline = []; - winbar = []; - }; - ignoreFocus = []; - alwaysDivideMiddle = true; - globalstatus = false; - refresh = { - statusline = 1000; - tabline = 1000; - winbar = 1000; - }; - sections = { - lualine_a = ["mode"]; - lualine_b = [ - { - __raw = '' - {'FugitiveHead', icon = ""} - ''; - } - "diff" - "diagnostics" - ]; - lualine_c = ["filename"]; - lualine_x = ["searchcount" "filetype"]; - lualine_y = [ - "encoding" - "fileformat" - get_mixed_indent - get_trailing_whitespace - ]; - lualine_z = [get_location_of_file]; - }; - inactiveSections = { - lualine_a = []; - lualine_b = []; - lualine_c = ["filename"]; - lualine_x = [get_location_of_file]; - lualine_y = []; - lualine_z = []; - }; - tabline = {}; - winbar = {}; - inactiveWinbar = {}; + componentSeparators = { + left = ""; + right = ""; + }; + sectionSeparators = { + left = ""; + right = ""; + }; + disabledFiletypes = { + statusline = []; + winbar = []; + }; + ignoreFocus = []; + alwaysDivideMiddle = true; + globalstatus = false; + refresh = { + statusline = 1000; + tabline = 1000; + winbar = 1000; + }; + sections = { + lualine_a = ["mode"]; + lualine_b = [ + { + __raw = '' + {'FugitiveHead', icon = ""} + ''; + } + "diff" + "diagnostics" + ]; + lualine_c = ["filename"]; + lualine_x = ["searchcount" "filetype"]; + lualine_y = [ + "encoding" + "fileformat" + get_mixed_indent + get_trailing_whitespace + ]; + lualine_z = [get_location_of_file]; + }; + inactiveSections = { + lualine_a = []; + lualine_b = []; + lualine_c = ["filename"]; + lualine_x = [get_location_of_file]; + lualine_y = []; + lualine_z = []; }; + tabline = {}; + winbar = {}; + inactiveWinbar = {}; }; + }; } diff --git a/modules/by-name/nv/nvim/plgs/luasnip/default.nix b/modules/by-name/nv/nvim/plgs/luasnip/default.nix index 222b5070..b40743d6 100644 --- a/modules/by-name/nv/nvim/plgs/luasnip/default.nix +++ b/modules/by-name/nv/nvim/plgs/luasnip/default.nix @@ -7,15 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - pkgs, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{pkgs, ...}: { + home-manager.users.soispha.programs.nixvim = { keymaps = [ { key = "<C-K>"; diff --git a/modules/by-name/nv/nvim/plgs/neorg/default.nix b/modules/by-name/nv/nvim/plgs/neorg/default.nix index b69f5a58..ac5e5a6a 100644 --- a/modules/by-name/nv/nvim/plgs/neorg/default.nix +++ b/modules/by-name/nv/nvim/plgs/neorg/default.nix @@ -7,13 +7,7 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { +{lib, ...}: { # TODO: Re-active, whence neorg actually builds with all the treesitter grammars # activated <2026-01-18> home-manager.users.soispha.programs.nixvim = lib.mkIf false { diff --git a/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix b/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix index 48883bd3..9d6a4f6b 100644 --- a/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix +++ b/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix @@ -7,20 +7,14 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { +{...}: { soispha.nixpkgs.unfreePackageNames = [ # the plugin is lacking an license and is thus unfree, effectively # its okay though (TODO: investigate <2026-05-11>)? "cmp-calc" ]; - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { + home-manager.users.soispha.programs.nixvim = { opts.completeopt = [ "menu" # Show completions in a menu "menuone" # Also open menu, when only one completion exists diff --git a/modules/by-name/nv/nvim/plgs/nvim-lint/default.nix b/modules/by-name/nv/nvim/plgs/nvim-lint/default.nix index 90e81832..9536f1a2 100644 --- a/modules/by-name/nv/nvim/plgs/nvim-lint/default.nix +++ b/modules/by-name/nv/nvim/plgs/nvim-lint/default.nix @@ -9,13 +9,10 @@ # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { pkgs, - config, lib, ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +}: { + home-manager.users.soispha.programs.nixvim = { # TODO: package nvim-lint though a module extraConfigLuaPost = '' ${lib.strings.fileContents ./lua/nvim-lint.lua} diff --git a/modules/by-name/nv/nvim/plgs/telescope/default.nix b/modules/by-name/nv/nvim/plgs/telescope/default.nix index b2c66edc..b33dbe14 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/default.nix @@ -8,25 +8,29 @@ # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { - config, lib, + extra_lib, + pkgs, ... }: let - cfg = config.soispha.programs.nvim; -in { - imports = [ - ./defaults - ./keymaps - ./extensions - ]; - home-manager.users.soispha.programs.nixvim.plugins = lib.mkIf cfg.enable { - telescope = { - enable = true; - }; + defaults = import ./defaults {}; + keymaps = import ./keymaps {}; + extensions = import ./extensions {inherit extra_lib pkgs lib;}; +in + lib.mkMerge [ + defaults + keymaps + extensions + { + home-manager.users.soispha.programs.nixvim.plugins = { + telescope = { + enable = true; + }; - # This is a dependency of telescope - web-devicons = { - enable = true; - }; - }; -} + # This is a dependency of telescope + web-devicons = { + enable = true; + }; + }; + } + ] diff --git a/modules/by-name/nv/nvim/plgs/telescope/defaults/default.nix b/modules/by-name/nv/nvim/plgs/telescope/defaults/default.nix index 7cfe9698..8fb4a99d 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/defaults/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/defaults/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.telescope.settings.defaults = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim.plugins.telescope.settings.defaults = { mappings = let insert_and_normal_mappings = { # map actions.which_key to <c-h> (default: <c-/>) diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/default.nix index 0b0ed0f6..3fc3aefc 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/default.nix @@ -7,12 +7,17 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{...}: { - imports = [ - ./bibtex - ./frecency - ./fzy-native - ./rooter - ./symbols - ]; -} +{ + extra_lib, + lib, + pkgs, + ... +}: let + extensions = builtins.attrValues (extra_lib.mkByName { + useShards = false; + baseDirectory = ./ext; + fileName = "default.nix"; + finalizeFunction = name: path: import path {inherit pkgs lib;}; + }); +in + lib.mkMerge extensions diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/bibtex/default.nix index 693db974..c2fea575 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/bibtex/default.nix @@ -7,9 +7,7 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{config, ...}: let - cfg = config.soispha.programs.nvim; -in { +{...}: { # TODO: Re-enable this, once the plugin is merged into nixpkgs <2025-03-29> # home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { # extraPlugins = [ diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/tex.lua b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/bibtex/tex.lua index fbe7c993..fbe7c993 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/tex.lua +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/bibtex/tex.lua diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/frecency/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/frecency/default.nix index 3d5eae99..83a4ed3d 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/frecency/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/frecency/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim = { keymaps = [ { key = "gff"; diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/fzy-native/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/fzy-native/default.nix index 7a2fc164..1b173516 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/fzy-native/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/fzy-native/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.telescope.extensions.fzy-native = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim.plugins.telescope.extensions.fzy-native = { enable = true; }; } diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/rooter/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/rooter/default.nix index 4d91e988..de1aa929 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/rooter/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/rooter/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - lib, - config, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +{lib, ...}: { + home-manager.users.soispha.programs.nixvim = { extraConfigLuaPost = '' ${lib.strings.fileContents ./lua/rooter.lua} ''; diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/rooter/lua/rooter.lua index b6542429..b6542429 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/rooter/lua/rooter.lua +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/ext/rooter/lua/rooter.lua diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/symbols/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/symbols/default.nix deleted file mode 100644 index 1f82523d..00000000 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/symbols/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - pkgs, - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { - extraPlugins = [ - # Source of symbols for telescope symbols - pkgs.vimPlugins.telescope-symbols-nvim - ]; - keymaps = [ - { - key = "<space>il"; - mode = "n"; - action.__raw = '' - function() - require('telescope.builtin').symbols{ sources = { - 'latex' - }} - end - ''; - options.desc = "[i]nsert a [l]atex symbol"; - } - { - key = "<space>ie"; - mode = "n"; - action.__raw = '' - function() - require('telescope.builtin').symbols{ sources = { - 'emoji', - }} - end - ''; - options.desc = "[i]nsert a [e]moji"; - } - { - key = "<space>is"; - mode = "n"; - action.__raw = '' - function() - require('telescope.builtin').symbols{ sources = { - 'emoji', - 'gitmoji', - 'julia', - 'kaomoji', - 'latex', - 'math', - 'nerd', - }} - end - ''; - options.desc = "[i]nsert a [s]ymbol (like emojis)"; - } - ]; - }; -} diff --git a/modules/by-name/nv/nvim/plgs/telescope/keymaps/default.nix b/modules/by-name/nv/nvim/plgs/telescope/keymaps/default.nix index d5cc55f5..12c56887 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/keymaps/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/keymaps/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.telescope.keymaps = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim.plugins.telescope.keymaps = { "<space>rg" = { action = "live_grep"; options = { diff --git a/modules/by-name/nv/nvim/plgs/todo-comments/default.nix b/modules/by-name/nv/nvim/plgs/todo-comments/default.nix index cd1a7dbf..a535469c 100644 --- a/modules/by-name/nv/nvim/plgs/todo-comments/default.nix +++ b/modules/by-name/nv/nvim/plgs/todo-comments/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.todo-comments = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim.plugins.todo-comments = { enable = true; settings = { guiStyle = { diff --git a/modules/by-name/nv/nvim/plgs/treesitter/default.nix b/modules/by-name/nv/nvim/plgs/treesitter/default.nix index 1377cb8a..acce3e6e 100644 --- a/modules/by-name/nv/nvim/plgs/treesitter/default.nix +++ b/modules/by-name/nv/nvim/plgs/treesitter/default.nix @@ -8,14 +8,11 @@ # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { - config, pkgs, lib, ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { +}: { + home-manager.users.soispha.programs.nixvim = { # NOTE: These are required to build grammars, but I already use the nix grammars <2024-07-13> dependencies = { tree-sitter.enable = false; diff --git a/modules/by-name/nv/nvim/plgs/vim-tex/default.nix b/modules/by-name/nv/nvim/plgs/vim-tex/default.nix index 71422f94..7538540c 100644 --- a/modules/by-name/nv/nvim/plgs/vim-tex/default.nix +++ b/modules/by-name/nv/nvim/plgs/vim-tex/default.nix @@ -7,13 +7,7 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { +{lib, ...}: { # TODO: Do I still need this module at all? <2026-01-18> home-manager.users.soispha.programs.nixvim = lib.mkIf false { opts.conceallevel = 0; diff --git a/modules/by-name/nv/nvim/plgs/which-key/default.nix b/modules/by-name/nv/nvim/plgs/which-key/default.nix index e5bca546..b247b533 100644 --- a/modules/by-name/nv/nvim/plgs/which-key/default.nix +++ b/modules/by-name/nv/nvim/plgs/which-key/default.nix @@ -7,14 +7,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - config, - lib, - ... -}: let - cfg = config.soispha.programs.nvim; -in { - home-manager.users.soispha.programs.nixvim.plugins.which-key = lib.mkIf cfg.enable { +{...}: { + home-manager.users.soispha.programs.nixvim.plugins.which-key = { enable = true; }; } |
