treesitter checker

pull/4/head
ray-x 3 years ago
parent d1d3966802
commit a0a33b6a8c

@ -1,6 +1,5 @@
# Navigator
GUI for Neovim (nightly) built-in LSP with a collection of most used LSP/🌲Treesitter functions.
Easy code navigation through LSP symbols and 🌲Treesitter symbols.
# Features:
@ -10,7 +9,7 @@ Easy code navigation through LSP symbols and 🌲Treesitter symbols.
- fzy search with Lua-JIT
- Better navigation for diagnostic errors, Navigate through files that contain errors/warnings
- Group references/implementation/incomming/outgoing based on file names.
- Nerdfont, emoji for LSP kind,
- Nerdfont, emoji for LSP and Treesitter kind
# Why a new plugin

@ -63,7 +63,6 @@ local function get_all_nodes(bufnr)
end
local display_filename = fname:gsub(cwd .. "/", "./", 1)
local all_nodes = {}
-- Support completion-nvim customized label map
local customized_labels = vim.g.completion_customize_lsp_label or {}
@ -93,17 +92,28 @@ local function get_all_nodes(bufnr)
end
function M.buf_ts()
if ts_locals == nil then
error("treesitter not loaded")
return
end
local all_nodes = get_all_nodes()
gui.new_list_view({items = all_nodes, prompt = true, rawdata = true, api = "🎄"})
end
local exclude_ft = {'scroll', 'help', 'NvimTree'}
local exclude_ft = {"scroll", "help", "NvimTree"}
local function exclude(fname)
for i = 1, #exclude_ft do
if string.find(fname, exclude_ft[i]) then return true end
end
return false
for i = 1, #exclude_ft do
if string.find(fname, exclude_ft[i]) then
return true
end
end
return false
end
function M.bufs_ts()
if ts_locals == nil then
error("treesitter not loaded")
return
end
local bufs = vim.api.nvim_list_bufs()
local ts_opened = {}
for _, buf in ipairs(bufs) do

Loading…
Cancel
Save