fix(nvimtree): remove deprecated system_open option (#1621)

This commit is contained in:
Dobry Nikolov 2026-06-02 18:22:01 +03:00
commit 4e03740d25
3 changed files with 26 additions and 24 deletions

View file

@ -130,6 +130,10 @@
## Changelog {#sec-release-0-9-changelog}
[bovf](https://github.com/bovf):
- Removed the deprecated `system_open` setup option from `nvim-tree.lua` to avoid startup warnings now that upstream uses `vim.ui.open()`.
[ErinaYip](https://github.com/ErinaYip):
- Fixed and updated `lualine` options:

View file

@ -14,6 +14,16 @@
inherit (options.vim.filetree.nvimTree) mappings;
in {
config = mkIf cfg.enable {
assertions = [
{
assertion = !(cfg.setupOpts ? system_open);
message = ''
vim.filetree.nvimTree.setupOpts.system_open was removed by nvim-tree.lua.
Use Neovim's vim.ui.open() instead. See nvf issue #1621.
'';
}
];
vim = {
binds.whichKey.register = pushDownDefault {
"<leader>t" = "+NvimTree";

View file

@ -5,6 +5,7 @@
...
}: let
inherit (lib.options) mkEnableOption mkOption literalExpression;
inherit (lib.modules) mkRemovedOptionModule;
inherit (lib.generators) mkLuaInline;
inherit (lib.types) str bool int submodule listOf enum oneOf attrs addCheck;
inherit (lib.nvim.types) mkPluginSetupOption;
@ -28,10 +29,6 @@
reloadOnBufEnter = "reload_on_buf_enter";
respectBufCwd = "respect_buf_cwd";
hijackDirectories = "hijack_directories";
systemOpen = {
args = "args";
cmd = "cmd";
};
diagnostics = "diagnostics";
git = {
enable = "enable";
@ -72,8 +69,18 @@
["vim" "filetree" "nvimTree"]
["vim" "filetree" "nvimTree" "setupOpts"]
migrationTable;
systemOpenRemovedMessage = ''
nvim-tree.lua removed system_open and now uses Neovim's vim.ui.open().
See nvf issue #1621.
'';
in {
imports = renamedSetupOpts;
imports =
renamedSetupOpts
++ [
(mkRemovedOptionModule ["vim" "filetree" "nvimTree" "systemOpen" "args"] systemOpenRemovedMessage)
(mkRemovedOptionModule ["vim" "filetree" "nvimTree" "systemOpen" "cmd"] systemOpenRemovedMessage)
];
options.vim.filetree.nvimTree = {
enable = mkEnableOption "filetree via nvim-tree.lua";
@ -228,25 +235,6 @@ in {
};
};
system_open = {
args = mkOption {
default = [];
description = "Optional argument list.";
type = listOf str;
};
cmd = mkOption {
default =
if pkgs.stdenv.isDarwin
then "open"
else if pkgs.stdenv.isLinux
then "${pkgs.xdg-utils}/bin/xdg-open"
else throw "NvimTree: No default system open command for this platform, please set `vim.filetree.nvimTree.systemOpen.cmd`";
description = "The open command itself";
type = str;
};
};
diagnostics = mkOption {
description = ''
Show LSP and COC diagnostics in the signcolumn