feat: added autoclose functionality
This commit is contained in:
@@ -49,6 +49,7 @@ or skip this section entirely if you want to roll with the defaults.
|
|||||||
auto_preview = true,
|
auto_preview = true,
|
||||||
position = 'right',
|
position = 'right',
|
||||||
width = 25,
|
width = 25,
|
||||||
|
auto_close = false,
|
||||||
show_numbers = false,
|
show_numbers = false,
|
||||||
show_relative_numbers = false,
|
show_relative_numbers = false,
|
||||||
show_symbol_details = true,
|
show_symbol_details = true,
|
||||||
@@ -132,6 +133,15 @@ width
|
|||||||
|
|
||||||
Type: int
|
Type: int
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
auto_close
|
||||||
|
|
||||||
|
Whether to automatically close the window after selection
|
||||||
|
|
||||||
|
Default: false ~
|
||||||
|
|
||||||
|
Type: boolean
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
auto_preview
|
auto_preview
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ function M._goto_location(change_focus)
|
|||||||
vim.api.nvim_win_set_cursor(M.state.code_win,
|
vim.api.nvim_win_set_cursor(M.state.code_win,
|
||||||
{node.line + 1, node.character})
|
{node.line + 1, node.character})
|
||||||
if change_focus then vim.fn.win_gotoid(M.state.code_win) end
|
if change_focus then vim.fn.win_gotoid(M.state.code_win) end
|
||||||
|
if config.options.auto_close then M.close_outline() end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M._highlight_current_item(winnr)
|
function M._highlight_current_item(winnr)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ M.defaults = {
|
|||||||
show_guides = true,
|
show_guides = true,
|
||||||
position = 'right',
|
position = 'right',
|
||||||
width = 25,
|
width = 25,
|
||||||
|
auto_close = false,
|
||||||
auto_preview = true,
|
auto_preview = true,
|
||||||
show_numbers = false,
|
show_numbers = false,
|
||||||
show_relative_numbers = false,
|
show_relative_numbers = false,
|
||||||
|
|||||||
Reference in New Issue
Block a user