diff --git a/modules/neovim/init/spellcheck.nix b/modules/neovim/init/spellcheck.nix index f8d784da..5d6f5bed 100644 --- a/modules/neovim/init/spellcheck.nix +++ b/modules/neovim/init/spellcheck.nix @@ -124,6 +124,7 @@ in { nvim --headless --clean \ --cmd "mkspell $out/spell/$name.add.spl $spellfile" -Es -n done + ''; in mkIf (cfg.extraSpellWords != {}) [ @@ -132,12 +133,10 @@ in { compileJoinedSpellfiles.outPath ]; - options = { - spell = true; - spelllang = cfg.languages; - }; - luaConfigRC.spellcheck = entryAfter ["basic"] '' + vim.opt.spell = true + vim.opt.spelllang = ${listToLuaTable cfg.languages} + -- Disable spellchecking for certain filetypes -- as configured by `vim.spellcheck.ignoredFiletypes` vim.api.nvim_create_augroup("nvf_autocmds", {clear = false}) diff --git a/modules/plugins/utility/gestures/gesture-nvim/config.nix b/modules/plugins/utility/gestures/gesture-nvim/config.nix index 9838c178..2996f7d2 100644 --- a/modules/plugins/utility/gestures/gesture-nvim/config.nix +++ b/modules/plugins/utility/gestures/gesture-nvim/config.nix @@ -15,47 +15,43 @@ mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; in { config = mkIf cfg.enable { - vim = { - startPlugins = ["gesture-nvim"]; + vim.startPlugins = ["gesture-nvim"]; - maps.normal = mkMerge [ - (mkSetLuaBinding mappings.draw "require('gesture').draw") - (mkSetLuaBinding mappings.finish "require('gesture').finish") - (mkIf (mappings.draw.value == "") { - "" = {action = "";}; - }) - ]; + vim.maps.normal = mkMerge [ + (mkSetLuaBinding mappings.draw "require('gesture').draw") + (mkSetLuaBinding mappings.finish "require('gesture').finish") + (mkIf (mappings.draw.value == "") { + "" = {action = "";}; + }) + ]; - options.mouse = "a"; - pluginRC.gesture-nvim = entryAnywhere '' - local gesture = require("gesture") - gesture.register({ - name = "scroll to bottom", - inputs = { gesture.up(), gesture.down() }, - action = "normal! G", - }) + vim.pluginRC.gesture-nvim = entryAnywhere '' + vim.opt.mouse = "a" - gesture.register({ - name = "next tab", - inputs = { gesture.right() }, - action = "tabnext", - }) - - gesture.register({ - name = "previous tab", - inputs = { gesture.left() }, - action = function(ctx) -- also can use callable - vim.cmd.tabprevious() - end, - }) - - gesture.register({ - name = "go back", - inputs = { gesture.right(), gesture.left() }, - -- map to `` keycode - action = [[lua vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "n", true)]], - }) - ''; - }; + local gesture = require("gesture") + gesture.register({ + name = "scroll to bottom", + inputs = { gesture.up(), gesture.down() }, + action = "normal! G", + }) + gesture.register({ + name = "next tab", + inputs = { gesture.right() }, + action = "tabnext", + }) + gesture.register({ + name = "previous tab", + inputs = { gesture.left() }, + action = function(ctx) -- also can use callable + vim.cmd.tabprevious() + end, + }) + gesture.register({ + name = "go back", + inputs = { gesture.right(), gesture.left() }, + -- map to `` keycode + action = [[lua vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "n", true)]], + }) + ''; }; } diff --git a/modules/plugins/utility/gestures/gesture-nvim/default.nix b/modules/plugins/utility/gestures/gesture-nvim/default.nix index 4c7987e7..27e7e09f 100644 --- a/modules/plugins/utility/gestures/gesture-nvim/default.nix +++ b/modules/plugins/utility/gestures/gesture-nvim/default.nix @@ -1,4 +1,4 @@ -{ +_: { imports = [ ./gesture-nvim.nix ./config.nix diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix index 20eb50e7..980c9497 100644 --- a/modules/wrapper/rc/options.nix +++ b/modules/wrapper/rc/options.nix @@ -3,7 +3,7 @@ lib, ... }: let - inherit (lib.options) mkOption literalMD literalExpression; + inherit (lib.options) mkOption mkEnableOption literalMD literalExpression; inherit (lib.strings) optionalString; inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything; inherit (lib.trivial) isBool; @@ -19,7 +19,7 @@ in { default = false; example = true; description = '' - [official documentation]: https://neovim.io/doc/user/lua.html#vim.loader.enable() + [{option}`official documentation`]: https://neovim.io/doc/user/lua.html#vim.loader.enable() the experimental Lua module loader to speed up the start up process @@ -31,7 +31,7 @@ in { ::: {.note} The Lua module loader is *disabled* by default. Before setting this option, please - take a look at the {option}`[official documentation]`. This option may be enabled by + take a look at the [{option}`official documentation`]. This option may be enabled by default in the future. ::: ''; @@ -83,7 +83,7 @@ in { ./nvim/my-lua-file.lua # source type path - pure and reproducible - (builtins.path { + (builtins.source { path = ./nvim/my-lua-file.lua; name = "my-lua-file"; }) @@ -274,11 +274,7 @@ in { vim.opt.runtimepath:append(${listToLuaTable cfg.additionalRuntimePaths}) ''} - ${optionalString cfg.enableLuaLoader '' - if vim.loader then - vim.loader.enable() - end - ''} + ${optionalString cfg.enableLuaLoader "vim.loader.enable()"} ''; defaultText = literalMD '' @@ -288,7 +284,7 @@ in { if [](#opt-vim.enableLuaLoader) is set to true. ''; - example = literalExpression ''''${builtins.readFile ./my-lua-config-pre.lua}''; + example = literalExpression ''"$${builtins.readFile ./my-lua-config-pre.lua}"''; description = '' Verbatim lua code that will be inserted **before**