From 67f9a96abfafe41343f5b1b7653e2f79afaf9f6d Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sat, 21 Mar 2026 05:41:26 +0100 Subject: [PATCH 1/6] utillity/coverage: add crazy coverage --- docs/manual/release-notes/rl-0.9.md | 3 ++ .../plugins/utility/crazy-coverage/config.nix | 18 ++++++++ .../utility/crazy-coverage/crazy-coverage.nix | 11 +++++ .../utility/crazy-coverage/default.nix | 6 +++ modules/plugins/utility/default.nix | 1 + npins/sources.json | 42 +++++++++++++------ 6 files changed, 68 insertions(+), 13 deletions(-) create mode 100644 modules/plugins/utility/crazy-coverage/config.nix create mode 100644 modules/plugins/utility/crazy-coverage/crazy-coverage.nix create mode 100644 modules/plugins/utility/crazy-coverage/default.nix diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 6270165b..0a0d9d9f 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -279,6 +279,9 @@ - Added neovim theme `gruber-darker` . +- Added coverage support (`vim.utility.crazy-coverage`) via + [`crazy-coverage.nvim`](https://github.com/mr-u0b0dy/crazy-coverage.nvim). + [vagahbond](https://github.com/vagahbond): [codewindow.nvim]: https://github.com/gorbit99/codewindow.nvim diff --git a/modules/plugins/utility/crazy-coverage/config.nix b/modules/plugins/utility/crazy-coverage/config.nix new file mode 100644 index 00000000..78d73491 --- /dev/null +++ b/modules/plugins/utility/crazy-coverage/config.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + cfg = config.vim.utility.crazy-coverage; +in { + config = mkIf cfg.enable { + vim.startPlugins = ["crazy-coverage"]; + + vim.pluginRC.crazy-coverage = entryAnywhere '' + require("crazy-coverage").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/utility/crazy-coverage/crazy-coverage.nix b/modules/plugins/utility/crazy-coverage/crazy-coverage.nix new file mode 100644 index 00000000..1d59f494 --- /dev/null +++ b/modules/plugins/utility/crazy-coverage/crazy-coverage.nix @@ -0,0 +1,11 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.crazy-coverage = { + enable = mkEnableOption "coverage for neovim"; + + setupOpts = + mkPluginSetupOption "crazy-coverage.nvim" {}; + }; +} diff --git a/modules/plugins/utility/crazy-coverage/default.nix b/modules/plugins/utility/crazy-coverage/default.nix new file mode 100644 index 00000000..c80cee3d --- /dev/null +++ b/modules/plugins/utility/crazy-coverage/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./crazy-coverage.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index ab116483..98a455fb 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -30,5 +30,6 @@ ./yanky-nvim ./yazi-nvim ./undotree + ./crazy-coverage ]; } diff --git a/npins/sources.json b/npins/sources.json index d03d9fca..e16a4f5c 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -393,6 +393,22 @@ "url": "https://github.com/Saecki/crates.nvim/archive/ac9fa498a9edb96dc3056724ff69d5f40b898453.tar.gz", "hash": "sha256-jfmST/S9ymwgQ99PTCOlJkk5zaxE5HiDV16TmTISDII=" }, + "crazy-coverage": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "mr-u0b0dy", + "repo": "crazy-coverage.nvim" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v2.1.0", + "revision": "1c9223bdc6f2966be0e5d4dc73c9404003eca5b4", + "url": "https://api.github.com/repos/mr-u0b0dy/crazy-coverage.nvim/tarball/refs/tags/v2.1.0", + "hash": "sha256-D9hbxvjTbpLv2fXwtKbzFiSgkUj3uNd3YowZ/GrEQjM=" + }, "csharpls-extended-lsp-nvim": { "type": "Git", "repository": { @@ -685,19 +701,6 @@ "url": "https://api.github.com/repos/olexsmir/gopher.nvim/tarball/refs/tags/v0.6.0", "hash": "sha256-7aDjMFMCiqub/zCDJIWUIX9Zc6+vyPQOczuOFdc/6S0=" }, - "grug-far-nvim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "MagicDuck", - "repo": "grug-far.nvim" - }, - "branch": "main", - "submodules": false, - "revision": "275dbedc96e61a6b8d1dfb28ba51586ddd233dcf", - "url": "https://github.com/MagicDuck/grug-far.nvim/archive/275dbedc96e61a6b8d1dfb28ba51586ddd233dcf.tar.gz", - "hash": "sha256-qn1BTNCX0Sm158Lv5JfHThqlJX9ualCIlc+RCjWa+t8=" - }, "gruber-darker": { "type": "Git", "repository": { @@ -711,6 +714,19 @@ "url": "https://github.com/blazkowolf/gruber-darker.nvim/archive/aba065c3a79b58cc3863d5c9db319255abd1258a.tar.gz", "hash": "sha256-4xB/MRTDccA5gTKe6DrN+bNfDx6fzjuIGOLdkuxg8c0=" }, + "grug-far-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "MagicDuck", + "repo": "grug-far.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "275dbedc96e61a6b8d1dfb28ba51586ddd233dcf", + "url": "https://github.com/MagicDuck/grug-far.nvim/archive/275dbedc96e61a6b8d1dfb28ba51586ddd233dcf.tar.gz", + "hash": "sha256-qn1BTNCX0Sm158Lv5JfHThqlJX9ualCIlc+RCjWa+t8=" + }, "gruvbox": { "type": "Git", "repository": { From e71c20bc52f712d979e6a10db6bdf32490f34f30 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Mon, 23 Mar 2026 22:02:44 +0100 Subject: [PATCH 2/6] languages/openscad: init --- configuration.nix | 1 + docs/manual/release-notes/rl-0.9.md | 5 +++ modules/plugins/languages/default.nix | 1 + modules/plugins/languages/openscad.nix | 62 ++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 modules/plugins/languages/openscad.nix diff --git a/configuration.nix b/configuration.nix index 656f74ad..11f3fa10 100644 --- a/configuration.nix +++ b/configuration.nix @@ -77,6 +77,7 @@ isMaximal: { tex.enable = isMaximal; # Language modules that are not as common. + openscad.enable = false; arduino.enable = false; assembly.enable = false; astro.enable = false; diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 0a0d9d9f..b0a424fc 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -259,6 +259,11 @@ - Add `languages.fluent` using the official plugin. This only provides highlighting. +- Add `languages.openscad` using + [`openscad-lsp`](https://github.com/Leathong/openscad-LSP). This currently + relies on neovim builtin syntax for highlighting, and the lsp for formatting + and diagnostics. + - Added Debugging support to `languages.php`. - Added Formatting support to `languages.php` via diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 56896e41..c47e39ab 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -61,6 +61,7 @@ in { ./make.nix ./xml.nix ./fluent.nix + ./openscad.nix # This is now a hard deprecation. (mkRenamedOptionModule ["vim" "languages" "enableLSP"] ["vim" "lsp" "enable"]) diff --git a/modules/plugins/languages/openscad.nix b/modules/plugins/languages/openscad.nix new file mode 100644 index 00000000..e1ca096d --- /dev/null +++ b/modules/plugins/languages/openscad.nix @@ -0,0 +1,62 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (builtins) attrNames; + inherit (lib.options) mkEnableOption mkOption literalExpression; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.types) enum listOf; + inherit (lib.meta) getExe; + inherit (lib.nvim.attrsets) mapListToAttrs; + + cfg = config.vim.languages.openscad; + /* + There is no Treesitter module for OpenSCAD yet. + Luckily vim already ships with a builtin syntax that is used by default. + + The LSP already ships with diagnostics, but there is also an experimental analyzer called sca2d + + But it isn't packaged for nvim-lint and would need extra work. + */ + + defaultServers = ["openscad-lsp"]; + servers = { + openscad-lsp = { + enable = true; + cmd = [(getExe pkgs.openscad-lsp) "--stdio"]; + filetypes = ["openscad"]; + }; + }; +in { + options.vim.languages.openscad = { + enable = mkEnableOption "OpenSCAD language support"; + + lsp = { + enable = + mkEnableOption "OpenSCAD LSP support" + // { + default = config.vim.lsp.enable; + defaultText = literalExpression "config.vim.lsp.enable"; + }; + + servers = mkOption { + type = listOf (enum (attrNames servers)); + default = defaultServers; + description = "OpenSCAD LSP server to use"; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.lsp.enable { + vim.lsp.servers = + mapListToAttrs (n: { + name = n; + value = servers.${n}; + }) + cfg.lsp.servers; + }) + ]); +} From 14c5b9954337861767a189e309e2b86db46381a3 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Sat, 21 Mar 2026 01:51:27 +0100 Subject: [PATCH 3/6] notes/neorg, repl/conjure: lazy load by default --- modules/plugins/notes/neorg/config.nix | 16 ++++++++------ modules/plugins/repl/conjure/conjure.nix | 28 +++++++++++++++++++++++- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/modules/plugins/notes/neorg/config.nix b/modules/plugins/notes/neorg/config.nix index f8c18ea9..76b7db4e 100644 --- a/modules/plugins/notes/neorg/config.nix +++ b/modules/plugins/notes/neorg/config.nix @@ -4,9 +4,7 @@ ... }: let inherit (lib.modules) mkIf mkMerge; - inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.binds) pushDownDefault; - inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.notes.neorg; in { @@ -19,17 +17,21 @@ in { "nvim-nio" "pathlib-nvim" "plenary-nvim" - "neorg" "neorg-telescope" ]; + lazy.plugins.neorg = { + package = "neorg"; + setupModule = "neorg"; + inherit (cfg) setupOpts; + + ft = ["norg"]; + cmd = ["Neorg"]; + }; + binds.whichKey.register = pushDownDefault { "o" = "+Notes"; }; - - pluginRC.neorg = entryAnywhere '' - require('neorg').setup(${toLuaObject cfg.setupOpts}) - ''; }; } diff --git a/modules/plugins/repl/conjure/conjure.nix b/modules/plugins/repl/conjure/conjure.nix index 83481af2..4dad0430 100644 --- a/modules/plugins/repl/conjure/conjure.nix +++ b/modules/plugins/repl/conjure/conjure.nix @@ -14,6 +14,32 @@ in { }; config = mkIf cfg.enable { - vim.startPlugins = [pkgs.vimPlugins.conjure]; + vim.lazy.plugins.conjure = { + package = pkgs.vimPlugins.conjure; + ft = [ + "clojure" + "fennel" + "janet" + "hy" + "julia" + "racket" + "scheme" + "lua" + "lisp" + "python" + "rust" + "sql" + "javascript" + "typescript" + "php" + "r" + ]; + cmd = [ + "ConjureSchool" + "ConjureEval" + "ConjureConnect" + "ConjureClientState" + ]; + }; }; } From a54e6086e5d08bf65e17a8b998568a80d4ef5fdf Mon Sep 17 00:00:00 2001 From: Soliprem Date: Sat, 21 Mar 2026 02:05:50 +0100 Subject: [PATCH 4/6] notes/obsidian: lazy load by default --- modules/plugins/notes/obsidian/config.nix | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/plugins/notes/obsidian/config.nix b/modules/plugins/notes/obsidian/config.nix index 145ddff7..cf573cea 100644 --- a/modules/plugins/notes/obsidian/config.nix +++ b/modules/plugins/notes/obsidian/config.nix @@ -5,22 +5,32 @@ }: let inherit (lib.modules) mkIf mkMerge; inherit (lib.generators) mkLuaInline; - inherit (lib.nvim.dag) entryAnywhere; - inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.notes.obsidian; in { config = mkIf cfg.enable { vim = { startPlugins = [ - "obsidian-nvim" "vim-markdown" "tabular" + "plenary-nvim" ]; - pluginRC.obsidian = entryAnywhere '' - require("obsidian").setup(${toLuaObject cfg.setupOpts}) - ''; + lazy.plugins.obsidian-nvim = { + package = "obsidian-nvim"; + # NOTE: packaged plugin directory is `obsidian.nvim`; loading by the + # spec key (`obsidian-nvim`) misses and makes `require("obsidian")` + # resolve to a loader function via lzn-auto-require. + # I don't love this, but I can't think of anything better + load = '' + vim.cmd.packadd("obsidian.nvim") + ''; + setupModule = "obsidian"; + inherit (cfg) setupOpts; + + ft = ["markdown"]; + cmd = ["Obsidian"]; + }; notes.obsidian.setupOpts = let # may not be defined From 957e583437506668f73afef449a6a456dd766245 Mon Sep 17 00:00:00 2001 From: Victor Borja Date: Tue, 24 Mar 2026 03:05:53 -0600 Subject: [PATCH 5/6] Alias vim.options as vim.opts Fixes #1469 --- modules/neovim/init/basic.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/neovim/init/basic.nix b/modules/neovim/init/basic.nix index 2f3934ae..85c07a53 100644 --- a/modules/neovim/init/basic.nix +++ b/modules/neovim/init/basic.nix @@ -78,6 +78,11 @@ in { }; }; + # Alias vim.options as vim.opts. + # This is a convenience for people using frameworks like flake-parts or Den that use lib.types.deferredModule + # and users would set `vim.options` but error when Nix confuses it with Nix Module's options-definitions. + imports = [(lib.mkAliasOptionModule ["vim" "opts"] ["vim" "options"])]; + config.vim = { # Set options that were previously interpolated in 'luaConfigRC.basic' as vim.options (vim.o) # and 'vim.globals' (vim.g). Future options, if possible, should be added here instead of the From 3d2b1cbc8f73d873653378adf4c3b215394bbe84 Mon Sep 17 00:00:00 2001 From: Victor Borja Date: Tue, 24 Mar 2026 03:35:33 -0600 Subject: [PATCH 6/6] test vim.opts alias as part of .#nix package. --- configuration.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configuration.nix b/configuration.nix index 11f3fa10..28b146d4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,6 +13,9 @@ isMaximal: { logFile = "/tmp/nvim.log"; }; + # vim.opts and vim.options are aliased + opts.expandtab = true; + spellcheck = { enable = true; programmingWordlist.enable = isMaximal;