Skip to content

Commit 6cffbed

Browse files
committed
feat(nvim): make reveal in explorer smarter
1 parent e3cc07d commit 6cffbed

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • home/dot_config/exact_nvim/exact_lua/exact_specs

home/dot_config/exact_nvim/exact_lua/exact_specs/snacks.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Plugin.opts = {
6565
ignored = true,
6666
hidden = true,
6767
git_untracked = true,
68-
follow_file = false,
68+
follow_file = true,
69+
exclude = { 'node_modules' },
6970
win = {
7071
list = {
7172
keys = {
@@ -194,15 +195,14 @@ Plugin.keys = {
194195
'<Space>f',
195196
function()
196197
local snacks = require('snacks')
197-
snacks.explorer.open()
198-
end,
199-
desc = 'File Explorer',
200-
},
201-
{
202-
'<Space>F',
203-
function()
204-
local snacks = require('snacks')
205-
snacks.explorer.reveal()
198+
199+
local explorer = snacks.picker.get({ source = 'explorer' })[1]
200+
201+
if explorer then
202+
explorer:focus()
203+
else
204+
snacks.explorer.reveal()
205+
end
206206
end,
207207
desc = 'Reveal in Explorer',
208208
},

0 commit comments

Comments
 (0)