From a0905ee428cf75c94e97ef80ea79d1d16f2c8968 Mon Sep 17 00:00:00 2001 From: rice-cracker-dev Date: Sat, 17 May 2025 11:46:43 +0700 Subject: [PATCH 1/2] basic: deprecate scrollOffset --- modules/extra/deprecations.nix | 2 +- modules/neovim/init/basic.nix | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/extra/deprecations.nix b/modules/extra/deprecations.nix index 91d8ef28..0a5733ab 100644 --- a/modules/extra/deprecations.nix +++ b/modules/extra/deprecations.nix @@ -18,7 +18,7 @@ showSignColumn = "signcolumn"; # 2025-02-07 - scrollOff = "scrolloff"; + scrollOffset = "scrolloff"; }; in { imports = concatLists [ diff --git a/modules/neovim/init/basic.nix b/modules/neovim/init/basic.nix index 195ef5e7..2f3934ae 100644 --- a/modules/neovim/init/basic.nix +++ b/modules/neovim/init/basic.nix @@ -6,11 +6,10 @@ inherit (lib.options) mkOption mkEnableOption literalMD; inherit (lib.strings) optionalString; inherit (lib.attrsets) optionalAttrs; - inherit (lib.types) enum bool str int either; + inherit (lib.types) enum bool str either; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.dag) entryAfter; inherit (lib.nvim.binds) pushDownDefault; - inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.types) luaInline; cfg = config.vim; @@ -22,12 +21,6 @@ in { description = "Hide search highlight so it doesn't stay highlighted"; }; - scrollOffset = mkOption { - type = int; - default = 8; - description = "Start scrolling this number of lines from the top or bottom of the page."; - }; - syntaxHighlighting = mkOption { type = bool; default = !config.vim.treesitter.highlight.enable; From 6d1b7ec094e7d3ce935f8c9e66c9b15d0b4d77f6 Mon Sep 17 00:00:00 2001 From: rice-cracker-dev Date: Sat, 17 May 2025 11:53:39 +0700 Subject: [PATCH 2/2] docs: deprecate vim.scrollOffset --- docs/release-notes/rl-0.8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 17f024b4..cf12a6a3 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -308,6 +308,7 @@ `vim.diagnostics.nvim-lint.linters.*.required_files`. - Add global function `nvf_lint` under `vim.diagnostics.nvim-lint.lint_function`. +- Deprecate `vim.scrollOffset` in favor of `vim.options.scrolloff`. [Sc3l3t0n](https://github.com/Sc3l3t0n):