mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-26 04:32:23 +00:00
Compare commits
11 commits
889f688f70
...
ba2093af43
Author | SHA1 | Date | |
---|---|---|---|
|
ba2093af43 | ||
5b2ab22777 | |||
66d0a81206 | |||
8597fb9a5b | |||
e8018bbd38 | |||
94d1a26b1c | |||
|
6d07646fae | ||
|
14de965ce9 | ||
|
234ad31909 | ||
|
ea7469f1c8 | ||
|
73cc5edd31 |
3 changed files with 12 additions and 5 deletions
|
@ -95,9 +95,9 @@ in
|
|||
nixos-render-docs manual html \
|
||||
--manpage-urls ${path + "/doc/manpage-urls.json"} \
|
||||
--revision ${lib.trivial.revisionWithDefault manual-release} \
|
||||
--stylesheet "$dest"/style.css \
|
||||
--script ./highlightjs/highlight.pack.js \
|
||||
--script ./highlightjs/loader.js \
|
||||
--stylesheet style.css \
|
||||
--script highlightjs/highlight.pack.js \
|
||||
--script highlightjs/loader.js \
|
||||
--script script/anchor-use.js \
|
||||
--script script/anchor-min.js \
|
||||
--toc-depth 2 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"release": "v0.7",
|
||||
"isReleaseBranch": false
|
||||
"isReleaseBranch": true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue