(breaking_change) feat: Make setup explicit
Don't setup on its own
This commit is contained in:
@@ -12,6 +12,9 @@ local function setup_global_autocmd()
|
|||||||
if config.options.highlight_hovered_item then
|
if config.options.highlight_hovered_item then
|
||||||
vim.cmd "au CursorHold * :lua require('symbols-outline')._highlight_current_item()"
|
vim.cmd "au CursorHold * :lua require('symbols-outline')._highlight_current_item()"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.cmd "au InsertLeave,WinEnter,BufEnter,BufWinEnter,TabEnter,BufWritePost * :lua require('symbols-outline')._refresh()"
|
||||||
|
vim.cmd "au WinEnter * lua require'symbols-outline.preview'.close()"
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|||||||
@@ -1,17 +1,3 @@
|
|||||||
if exists('g:loaded_symbols_outline')
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:loaded_symbols_outline = 1
|
|
||||||
|
|
||||||
if exists('g:symbols_outline')
|
|
||||||
call luaeval('require"symbols-outline".setup(_A[1])', [g:symbols_outline])
|
|
||||||
else
|
|
||||||
call luaeval('require"symbols-outline".setup()')
|
|
||||||
endif
|
|
||||||
|
|
||||||
command! SymbolsOutline :lua require'symbols-outline'.toggle_outline()
|
command! SymbolsOutline :lua require'symbols-outline'.toggle_outline()
|
||||||
command! SymbolsOutlineOpen :lua require'symbols-outline'.open_outline()
|
command! SymbolsOutlineOpen :lua require'symbols-outline'.open_outline()
|
||||||
command! SymbolsOutlineClose :lua require'symbols-outline'.close_outline()
|
command! SymbolsOutlineClose :lua require'symbols-outline'.close_outline()
|
||||||
|
|
||||||
au InsertLeave,WinEnter,BufEnter,BufWinEnter,TabEnter,BufWritePost * :lua require('symbols-outline')._refresh()
|
|
||||||
au WinEnter * lua require'symbols-outline.preview'.close()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user