modules/neovim: deprecate vim.showSignColumn

Prefer the type-safe `vim.options` equivalent.
This commit is contained in:
NotAShelf 2024-12-03 00:53:22 +03:00
parent 5a5f49f85f
commit 07f50e84eb
No known key found for this signature in database
GPG key ID: AF26552424E53993
3 changed files with 29 additions and 25 deletions

View file

@ -14,6 +14,7 @@
splitRight = "splitright";
autoIndent = "autoindent";
wordWrap = "wrap";
showSignColumn = "signcolumn";
};
in {
imports = concatLists [
@ -35,23 +36,28 @@ in {
vim.autopairs.enable has been removed in favor of per-plugin modules.
You can enable nvim-autopairs with vim.autopairs.nvim-autopairs.enable instead.
'')
(mkRemovedOptionModule ["vim" "autopairs" "type"] ''
vim.autopairs.type has been removed in favor of per-plugin modules.
You can enable nvim-autopairs with vim.autopairs.nvim-autopairs.enable instead.
'')
(mkRemovedOptionModule ["vim" "autocomplete" "enable"] ''
vim.autocomplete.enable has been removed in favor of per-plugin modules.
You can enable nvim-cmp with vim.autocomplete.nvim-cmp.enable instead.
'')
(mkRemovedOptionModule ["vim" "autocomplete" "type"] ''
vim.autocomplete.type has been removed in favor of per-plugin modules.
You can enable nvim-cmp with vim.autocomplete.nvim-cmp.enable instead.
'')
(mkRemovedOptionModule ["vim" "autocomplete" "sources"] ''
vim.autocomplete.sources has been removed in favor of per-plugin modules.
You can add nvim-cmp sources with vim.autocomplete.nvim-cmp.sources
instead.
'')
(mkRemovedOptionModule ["vim" "snippets" "vsnip" "enable"] ''
vim.snippets.vsnip.enable has been removed in favor of the more modern luasnip.
'')

View file

@ -58,12 +58,6 @@ in {
description = "Prevent swapfile and backupfile from being created";
};
showSignColumn = mkOption {
type = bool;
default = true;
description = "Show the sign column";
};
bell = mkOption {
type = enum ["none" "visual" "on"];
default = "none";
@ -117,10 +111,6 @@ in {
vim.o.undodir = ${toLuaObject cfg.undoFile.path}
''}
${optionalString cfg.showSignColumn ''
vim.o.signcolumn = "yes"
''}
${optionalString cfg.preventJunkFiles ''
vim.o.swapfile = false
vim.o.backup = false

View file

@ -6,6 +6,7 @@
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.nvim.languages) toVimBool;
inherit (lib.nvim.types) dagOf;
inherit (lib.nvim.lua) listToLuaTable;
@ -227,6 +228,13 @@ in {
default = true;
description = "Enable word wrapping.";
};
signcolumn = mkOption {
type = bool;
default = true;
apply = x: toVimBool x; # convert to a yes/no str
description = "Show the sign column";
};
};
};