mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-05 12:00:21 +00:00
add scope info in panel
This commit is contained in:
parent
91d1366b65
commit
3dc8c02c39
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user