You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a command to do this with Dashboard.nvim but I can't make it work with snacks
My keymaps:
vim.api.nvim_set_keymap('n', '<Leader>;', ':lua ToggleDashboard()<CR>', { noremap=true, silent=true })
functionToggleDashboard()
-- Si aun nunca fui a un dashboardiforiginal_file=='' then-- Guarda el archivo actual y abre el dashboardoriginal_file=vim.fn.expand'%:p'Snacks.dashboard() -- Usar un comando de lua `:lua ... "`else-- Hay algo en original file, es decir estoy en un dashboard-- Vuelve al archivo originalvim.cmd('edit ' ..original_file)
original_file='' -- Y borro para poder usarla de nuevoendend
It successfully goes to the dashboard but can't go back to the saved buffer, it seems it gets overriden by dashboard or something?
E5108: Error executing lua vim/_editor.lua:0: nvim_exec2()[1]..BufWinEnter Autocommands for "*": Vim(append):Error executing lua callback: ...uz/.local/share/nvim/lazy/sna
cks.nvim/lua/snacks/win.lua:887: Invalid buffer id: 6
stack traceback:
[C]: in function 'nvim_win_set_buf'
...uz/.local/share/nvim/lazy/snacks.nvim/lua/snacks/win.lua:887: in function <...uz/.local/share/nvim/lazy/snacks.nvim/lua/snacks/win.lua:847>
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
/home/jcruz/.config/nvim/lua/keymaps.lua:86: in function 'ToggleDashboard'
[string ":lua"]:1: in main chunk
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
/home/jcruz/.config/nvim/lua/keymaps.lua:86: in function 'ToggleDashboard'
[string ":lua"]:1: in main chunk
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I had a command to do this with Dashboard.nvim but I can't make it work with snacks
My keymaps:
It successfully goes to the dashboard but can't go back to the saved buffer, it seems it gets overriden by dashboard or something?
Beta Was this translation helpful? Give feedback.
All reactions