@@ -36,6 +36,7 @@ vim.g.symbols_outline = {
|
|||||||
show_numbers = false,
|
show_numbers = false,
|
||||||
show_relative_numbers = false,
|
show_relative_numbers = false,
|
||||||
show_symbol_details = true,
|
show_symbol_details = true,
|
||||||
|
preview_bg_highlight = 'Pmenu',
|
||||||
keymaps = { -- These keymaps can be a string or a table for multiple keys
|
keymaps = { -- These keymaps can be a string or a table for multiple keys
|
||||||
close = {"<Esc>", "q"},
|
close = {"<Esc>", "q"},
|
||||||
goto_location = "<Cr>",
|
goto_location = "<Cr>",
|
||||||
@@ -88,6 +89,7 @@ vim.g.symbols_outline = {
|
|||||||
| show_numbers | Shows numbers with the outline | boolean | false |
|
| show_numbers | Shows numbers with the outline | boolean | false |
|
||||||
| show_relative_numbers | Shows relative numbers with the outline | boolean | false |
|
| show_relative_numbers | Shows relative numbers with the outline | boolean | false |
|
||||||
| show_symbol_details | Shows extra details with the symbols (lsp dependent) | boolean | true |
|
| show_symbol_details | Shows extra details with the symbols (lsp dependent) | boolean | true |
|
||||||
|
| preview_bg_highlight | Background color of the preview window | string | Pmenu |
|
||||||
| keymaps | Which keys do what | table (dictionary) | [here](#default-keymaps) |
|
| keymaps | Which keys do what | table (dictionary) | [here](#default-keymaps) |
|
||||||
| symbols | Icon and highlight config for symbol icons | table (dictionary) | scroll up |
|
| symbols | Icon and highlight config for symbol icons | table (dictionary) | scroll up |
|
||||||
| lsp_blacklist | Which lsp clients to ignore | table (array) | {} |
|
| lsp_blacklist | Which lsp clients to ignore | table (array) | {} |
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ or skip this section entirely if you want to roll with the defaults.
|
|||||||
show_numbers = false,
|
show_numbers = false,
|
||||||
show_relative_numbers = false,
|
show_relative_numbers = false,
|
||||||
show_symbol_details = true,
|
show_symbol_details = true,
|
||||||
|
preview_bg_highlight = 'Pmenu',
|
||||||
-- These keymaps can be a string or a table for multiple keys
|
-- These keymaps can be a string or a table for multiple keys
|
||||||
keymaps = {
|
keymaps = {
|
||||||
close = {"<Esc>", "q"},
|
close = {"<Esc>", "q"},
|
||||||
@@ -167,6 +168,15 @@ show_symbol_details
|
|||||||
|
|
||||||
Type: boolean
|
Type: boolean
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
preview_bg_highlight
|
||||||
|
|
||||||
|
Background color of the preview window
|
||||||
|
|
||||||
|
Default: Pmenu
|
||||||
|
|
||||||
|
Type: string
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
keymaps
|
keymaps
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ M.defaults = {
|
|||||||
show_numbers = false,
|
show_numbers = false,
|
||||||
show_relative_numbers = false,
|
show_relative_numbers = false,
|
||||||
show_symbol_details = true,
|
show_symbol_details = true,
|
||||||
|
preview_bg_highlight = 'Pmenu',
|
||||||
keymaps = { -- These keymaps can be a string or a table for multiple keys
|
keymaps = { -- These keymaps can be a string or a table for multiple keys
|
||||||
close = {"<Esc>", "q"},
|
close = {"<Esc>", "q"},
|
||||||
goto_location = "<Cr>",
|
goto_location = "<Cr>",
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ local function setup_hover_buf()
|
|||||||
update_hover()
|
update_hover()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function set_bg_hl()
|
||||||
|
local winhi = "Normal:" .. config.options.preview_bg_highlight
|
||||||
|
vim.api.nvim_win_set_option(state.preview_win, "winhighlight", winhi)
|
||||||
|
vim.api.nvim_win_set_option(state.hover_win, "winhighlight", winhi)
|
||||||
|
end
|
||||||
|
|
||||||
local function show_preview()
|
local function show_preview()
|
||||||
if state.preview_win == nil and state.preview_buf == nil then
|
if state.preview_win == nil and state.preview_buf == nil then
|
||||||
state.preview_buf = vim.api.nvim_create_buf(false, true)
|
state.preview_buf = vim.api.nvim_create_buf(false, true)
|
||||||
@@ -195,6 +201,7 @@ function M.show()
|
|||||||
|
|
||||||
show_preview()
|
show_preview()
|
||||||
show_hover()
|
show_hover()
|
||||||
|
set_bg_hl()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.close()
|
function M.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user