diff --git a/README.md b/README.md index 7991491..177d68a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ I do not merge PRs from the original repo that I don't personally need. ## 🛑 Breaking changes +- **Config**: `keymaps.focus_location` -> `keymaps.peek_location` to avoid + confusion with focus window commands. + - **Behaviour**: Removed hover floating window from `toggle_preview`. - Instead, you can set `open_hover_on_preview=true` (true by default) so that the `hover_symbol` action can be triggered when `toggle_preview`is @@ -274,7 +277,8 @@ require("symbols-outline").setup({}) - **Node**: An item in the outline view - **Fold**: Collapse a collapsible node - **Location**: Where in the source file a node is from -- **Preview**: Peek the location of a node in code using a floating window +- **Preview**: Show the location of a node in code using a floating window +- **Peek**: Go to corresponding location in code without leaving outline window - **Hover**: Cursor currently on the line of a node - **Hover symbol**: Displaying a floating window to show symbol information provided by provider. @@ -320,7 +324,7 @@ local opts = { border = 'single', -- Behaviour changed in this fork: -- Auto close the outline window if goto_location is triggered and not for - -- focus_location + -- peek_location auto_close = false, -- Vim options for the outline window @@ -355,8 +359,9 @@ local opts = { -- It can auto close the outline window when triggered, see -- 'auto_close' option above. goto_location = "", - -- Jump to symbol under cursor but keep focus on outline window - focus_location = "o", + -- Jump to symbol under cursor but keep focus on outline window. + -- Renamed in this fork! + peek_location = "o", hover_symbol = "", -- Preview symbol under cursor toggle_preview = "K", diff --git a/lua/symbols-outline.lua b/lua/symbols-outline.lua index cc3df72..1adccc5 100644 --- a/lua/symbols-outline.lua +++ b/lua/symbols-outline.lua @@ -259,9 +259,13 @@ local function setup_keymaps(bufnr) M._goto_location(true) end) -- goto_location of symbol but stay in outline - map(config.options.keymaps.focus_location, function() + map(config.options.keymaps.peek_location, function() M._goto_location(false) end) + -- -- goto_location of symbol but stay in outline + -- map(config.options.keymaps.down_and_goto, function() + -- M._move_and_goto(false) + -- end) -- hover symbol map( config.options.keymaps.hover_symbol, diff --git a/lua/symbols-outline/config.lua b/lua/symbols-outline/config.lua index c24fd85..8c9ae57 100644 --- a/lua/symbols-outline/config.lua +++ b/lua/symbols-outline/config.lua @@ -35,7 +35,7 @@ M.defaults = { show_help = '?', close = { '', 'q' }, goto_location = '', - focus_location = 'o', + peek_location = 'o', hover_symbol = '', toggle_preview = 'K', rename_symbol = 'r',