File tree Expand file tree Collapse file tree 1 file changed +23
-8
lines changed Expand file tree Collapse file tree 1 file changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -105,19 +105,34 @@ function! asyncrun#locator#nofile_buffer_path() abort
105
105
catch
106
106
endtry
107
107
endtry
108
+ elseif &ft == ' NvimTree'
109
+ try
110
+ let t = luaeval (' require("nvim-tree.api").tree.get_nodes().absolute_path' )
111
+ return t
112
+ catch
113
+ endtry
114
+ elseif &ft == ' defx'
115
+ if exists (' b:defx' )
116
+ try
117
+ let t = b: defx .paths[0 ]
118
+ return t
119
+ catch
120
+ endtry
121
+ endif
108
122
endif
109
123
if exists (' b:git_dir' )
110
124
return b: git_dir
111
125
endif
112
- endif
113
- if &ft == ' oil' && &bt != ' '
114
- let name = bufname (' %' )
115
- if name = ~ ' \v^oil\:[\\\/][\\\/]'
116
- let t = strpart (name, s: windows ? 7 : 6 )
117
- if s: windows && t = ~ ' \v^\w[\\\/]'
118
- let t = strpart (t , 0 , 1 ) . ' :' . strpart (t , 1 )
126
+ elseif &bt != ' '
127
+ if &ft == ' oil'
128
+ let name = bufname (' %' )
129
+ if name = ~ ' \v^oil\:[\\\/][\\\/]'
130
+ let t = strpart (name, s: windows ? 7 : 6 )
131
+ if s: windows && t = ~ ' \v^\w[\\\/]'
132
+ let t = strpart (t , 0 , 1 ) . ' :' . strpart (t , 1 )
133
+ endif
134
+ return t
119
135
endif
120
- return t
121
136
endif
122
137
endif
123
138
return ' '
You can’t perform that action at this time.
0 commit comments