diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index cac8ee51..4aa0b215 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -35,6 +35,7 @@ jobs: - name: Install Nix uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - uses: cachix/cachix-action@v15 with: diff --git a/modules/extra/deprecations.nix b/modules/extra/deprecations.nix index 541d2894..8d27d7ac 100644 --- a/modules/extra/deprecations.nix +++ b/modules/extra/deprecations.nix @@ -4,7 +4,6 @@ inherit (lib.nvim.config) batchRenameOptions; renamedVimOpts = batchRenameOptions ["vim"] ["vim" "options"] { - # 2024-12-01 colourTerm = "termguicolors"; mouseSupport = "mouse"; cmdHeight = "cmdheight"; @@ -16,9 +15,6 @@ autoIndent = "autoindent"; wordWrap = "wrap"; showSignColumn = "signcolumn"; - - # 2025-02-07 - scrollOf = "scrolloff"; }; in { imports = concatLists [ @@ -97,15 +93,9 @@ in { # 2024-12-02 (mkRenamedOptionModule ["vim" "enableEditorconfig"] ["vim" "globals" "editorconfig"]) - - # 2025-02-06 - (mkRemovedOptionModule ["vim" "disableArrows"] '' - Top-level convenience options are now in the process of being removed from nvf as - their behaviour was abstract, and confusing. Please use 'vim.options' or 'vim.luaConfigRC' - to replicate previous behaviour. - '') ] + # 2024-12-01 # Migrated via batchRenameOptions. Further batch renames must be below this line. renamedVimOpts ]; diff --git a/modules/neovim/init/basic.nix b/modules/neovim/init/basic.nix index 47bfe500..b4677de9 100644 --- a/modules/neovim/init/basic.nix +++ b/modules/neovim/init/basic.nix @@ -16,6 +16,12 @@ cfg = config.vim; in { options.vim = { + disableArrows = mkOption { + type = bool; + default = false; + description = "Set to prevent arrow keys from moving cursor"; + }; + hideSearchHighlight = mkOption { type = bool; default = false; diff --git a/modules/neovim/mappings/config.nix b/modules/neovim/mappings/config.nix index 230df030..4d7f2417 100644 --- a/modules/neovim/mappings/config.nix +++ b/modules/neovim/mappings/config.nix @@ -26,6 +26,34 @@ in { config = { vim.keymaps = mkMerge [ + ( + mkIf cfg.disableArrows [ + { + key = ""; + mode = ["n" "i"]; + action = ""; + noremap = false; + } + { + key = ""; + mode = ["n" "i"]; + action = ""; + noremap = false; + } + { + key = ""; + mode = ["n" "i"]; + action = ""; + noremap = false; + } + { + key = ""; + mode = ["n" "i"]; + action = ""; + noremap = false; + } + ] + ) ( pipe cfg.maps [