Compare commits

...

8 commits

Author SHA1 Message Date
DamitusThyYeetus123
bf296f3dd2
Merge 6d07646fae into e8018bbd38 2024-12-04 14:16:32 +00:00
raf
e8018bbd38
Merge branch 'main' into v0.7 2024-12-04 17:16:29 +03:00
94d1a26b1c
meta: mark as release 2024-12-04 17:12:12 +03:00
damii
6d07646fae Fix formatting 2024-12-04 09:35:25 +11:00
Ching Pei Yang
14de965ce9
formatting 2024-12-03 01:31:48 +01:00
DamitusThyYeetus123
234ad31909
Merge branch 'NotAShelf:v0.7' into v0.7 2024-12-03 09:13:34 +11:00
orangci
ea7469f1c8 docs: fix a typo in installation instructions 2024-11-19 00:27:30 +03:00
DamitusThyYeetus123
73cc5edd31 nvim-tree: Add directory opening 2024-11-12 13:25:08 +11:00
2 changed files with 9 additions and 2 deletions

View file

@ -77,6 +77,9 @@ 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 == ""
@ -84,7 +87,7 @@ in {
local filetype = vim.bo[data.buf].ft
-- only files please
if not real_file and not no_name then
if not real_file and not directory and not no_name then
return
end
@ -93,6 +96,10 @@ 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

View file

@ -1,4 +1,4 @@
{
"release": "v0.7",
"isReleaseBranch": false
"isReleaseBranch": true
}