mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-09 16:39:51 +01:00
Compare commits
1 commit
c7a66f0f8b
...
91d27c5d82
Author | SHA1 | Date | |
---|---|---|---|
|
91d27c5d82 |
1 changed files with 1 additions and 8 deletions
|
@ -77,9 +77,6 @@ in {
|
|||
-- buffer is a real file on the disk
|
||||
local real_file = vim.fn.filereadable(data.file) == 1
|
||||
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
|
||||
|
@ -87,7 +84,7 @@ in {
|
|||
local filetype = vim.bo[data.buf].ft
|
||||
|
||||
-- only files please
|
||||
if not real_file and not directory and not no_name then
|
||||
if not real_file and not no_name then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -96,10 +93,6 @@ in {
|
|||
return
|
||||
end
|
||||
|
||||
-- cd if buffer is a directory
|
||||
if directory then
|
||||
vim.cmd.cd(data.file)
|
||||
end
|
||||
-- open the tree but don't focus it
|
||||
require("nvim-tree.api").tree.toggle({ focus = false })
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue