We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 593d556 commit b69255dCopy full SHA for b69255d
lua/neo-tree/sources/common/file-nesting.lua
@@ -1,5 +1,6 @@
1
local iter = require("plenary.iterators").iter
2
local utils = require("neo-tree.utils")
3
+local Path = require("plenary.path")
4
5
-- File nesting a la JetBrains (#117).
6
local M = {}
@@ -17,7 +18,10 @@ function M.get_parent(item)
17
18
for base_exts, nesting_exts in pairs(M.config) do
19
for _, exts in ipairs(nesting_exts) do
20
if item.exts == exts then
- return utils.path_join(item.parent_path, item.base) .. "." .. base_exts
21
+ local parent_id = utils.path_join(item.parent_path, item.base) .. "." .. base_exts
22
+ if Path:new(parent_id):exists() then
23
+ return parent_id
24
+ end
25
end
26
27
0 commit comments