Document border option and publicize has_code_win

This commit is contained in:
hedy
2023-11-02 17:31:37 +08:00
parent 4358ce8e9b
commit 841825b747
4 changed files with 14 additions and 5 deletions

View File

@@ -375,13 +375,13 @@ function M.focus_outline()
end
function M.focus_code()
if M.state.code_win then
if require('symbols-outline.preview').has_code_win() then
vim.fn.win_gotoid(M.state.code_win)
end
end
function M.focus_toggle()
if M.view:is_open() and M.state.code_win then
if M.view:is_open() and require('symbols-outline.preview').has_code_win() then
local winid = vim.fn.win_getid()
if winid == M.state.code_win then
vim.fn.win_gotoid(M.view.winnr)

View File

@@ -3,12 +3,12 @@ local vim = vim
local M = {}
M.defaults = {
position = 'right',
width = 25,
highlight_hovered_item = true,
show_guides = true,
position = 'right',
border = 'single',
relative_width = true,
width = 25,
auto_close = false,
auto_preview = false,
open_hover_on_preview = true,

View File

@@ -24,6 +24,8 @@ local function has_code_win()
return isBufValid
end
M.has_code_win = has_code_win
local function get_offset()
local outline_winnr = so.view.winnr
local width = 53