add scope info in panel

This commit is contained in:
ray-x 2022-07-02 20:49:54 +10:00
parent 91d1366b65
commit 3dc8c02c39
2 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,7 @@ function M.side_panel()
local Panel = require('guihua.panel')
local buf = vim.api.nvim_get_current_buf()
local p = Panel:new({
scope = 'range',
render = function(bufnr)
local ft = vim.api.nvim_buf_get_option(bufnr, 'buftype')
if ft == 'nofile' or ft == 'guihua' or ft == 'prompt' then

View File

@ -26,6 +26,7 @@ local trace = function(...) end
if vim.fn.has('nvim-0.7') == 1 then
local trace = require('navigator.util').trace
end
trace = log
local get_icon = function(kind)
if kind == nil or _NgConfigValues.icons.match_kinds[kind] == nil then
@ -641,6 +642,7 @@ function M.side_panel()
end
return require('navigator.treesitter').all_ts_nodes(b)
end,
scope = 'node_scope'
})
panel:open(true)
end