Skip to content

Commit e4da01e

Browse files
committed
feat(#3310): minimum neovim version 0.10
1 parent 2c0b647 commit e4da01e

File tree

7 files changed

+9
-64
lines changed

7 files changed

+9
-64
lines changed

doc/nvim-tree-lua.txt

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,8 +1042,6 @@ Config *nvim-tree-config*
10421042
|nvim_tree.config.hijack_directories|
10431043
• {update_focused_file}? (`nvim_tree.config.update_focused_file`)
10441044
|nvim_tree.config.update_focused_file|
1045-
• {system_open}? (`nvim_tree.config.system_open`)
1046-
|nvim_tree.config.system_open|
10471045
{git}? (`nvim_tree.config.git`)
10481046
|nvim_tree.config.git|
10491047
{diagnostics}? (`nvim_tree.config.diagnostics`)
@@ -1499,30 +1497,6 @@ Config: update_focused_file *nvim-tree-config-update-focused-file*
14991497

15001498

15011499

1502-
==============================================================================
1503-
Config: system_open *nvim-tree-config-system-open*
1504-
1505-
*nvim_tree.config.system_open*
1506-
Open files or directories via the OS.
1507-
1508-
Nvim:
1509-
`>=` 0.10 uses |vim.ui.open()| unless {cmd} is specified
1510-
`<` 0.10 calls external {cmd}:
1511-
• UNIX: `xdg-open`
1512-
• macOS: `open`
1513-
• Windows: `cmd`
1514-
1515-
Once nvim-tree minimum Nvim version is updated to 0.10, this configuration
1516-
will no longer be necessary and will be removed.
1517-
1518-
Fields: ~
1519-
{cmd}? (`string`) The open command itself
1520-
{args}? (`string[]`, default: `{}` or `{ "/c", "start", '""' }` on
1521-
windows) Optional argument list. Leave empty for OS specific
1522-
default.
1523-
1524-
1525-
15261500
==============================================================================
15271501
Config: git *nvim-tree-config-git*
15281502

@@ -2155,10 +2129,6 @@ Following is the default configuration, see |nvim_tree.config| for details. >lua
21552129
},
21562130
exclude = false,
21572131
},
2158-
system_open = {
2159-
cmd = "",
2160-
args = {},
2161-
},
21622132
git = {
21632133
enable = true,
21642134
show_on_dirs = true,
@@ -2935,7 +2905,7 @@ run.cmd({node}) *nvim_tree.api.node.run.cmd()*
29352905
{node} (`nvim_tree.api.Node?`) directory or file
29362906

29372907
run.system({node}) *nvim_tree.api.node.run.system()*
2938-
Execute |nvim_tree.config.system_open|.
2908+
Open with the system default handler: |vim.ui.open()|.
29392909

29402910
Parameters: ~
29412911
{node} (`nvim_tree.api.Node?`) directory or file

lua/nvim-tree/_meta/api/node.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ nvim_tree.api.node.run = {}
271271
function nvim_tree.api.node.run.cmd(node) end
272272

273273
---
274-
---Execute [nvim_tree.config.system_open].
274+
---Open with the system default handler: [vim.ui.open()].
275275
---
276276
---@param node? nvim_tree.api.Node directory or file
277277
function nvim_tree.api.node.run.system(node) end

lua/nvim-tree/_meta/config.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ error("Cannot require a meta file")
8787
---[nvim_tree.config.update_focused_file]
8888
---@field update_focused_file? nvim_tree.config.update_focused_file
8989
---
90-
---[nvim_tree.config.system_open]
91-
---@field system_open? nvim_tree.config.system_open
92-
---
9390
---[nvim_tree.config.git]
9491
---@field git? nvim_tree.config.git
9592
---

lua/nvim-tree/_meta/config/system_open.lua

Lines changed: 0 additions & 24 deletions
This file was deleted.

lua/nvim-tree/config.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@ M.d = { -- config-default-start
173173
},
174174
exclude = false,
175175
},
176-
system_open = {
177-
cmd = "",
178-
args = {},
179-
},
180176
git = {
181177
enable = true,
182178
show_on_dirs = true,

lua/nvim-tree/legacy.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ local function removed_config(u)
146146
)
147147
end
148148
u["create_in_closed_folder"] = nil
149+
150+
if u.system_open then
151+
require("nvim-tree.notify").warn(
152+
"system_open has been removed, now uses the system default handler: vim.ui.open()"
153+
)
154+
u["system_open"] = nil
155+
end
149156
end
150157

151158
---Migrate legacy config in place.

scripts/vimdoc_config.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ local srcs_config = {
2222
{ helptag = "nvim-tree-config-renderer", section = "Config: renderer", path = base .. "_meta/config/renderer.lua", },
2323
{ helptag = "nvim-tree-config-hijack-directories", section = "Config: hijack_directories", path = base .. "_meta/config/hijack_directories.lua", },
2424
{ helptag = "nvim-tree-config-update-focused-file", section = "Config: update_focused_file", path = base .. "_meta/config/update_focused_file.lua", },
25-
{ helptag = "nvim-tree-config-system-open", section = "Config: system_open", path = base .. "_meta/config/system_open.lua", },
2625
{ helptag = "nvim-tree-config-git", section = "Config: git", path = base .. "_meta/config/git.lua", },
2726
{ helptag = "nvim-tree-config-diagnostics", section = "Config: diagnostics", path = base .. "_meta/config/diagnostics.lua", },
2827
{ helptag = "nvim-tree-config-modified", section = "Config: modified", path = base .. "_meta/config/modified.lua", },

0 commit comments

Comments
 (0)