Merge branch 'main' of github.com:hedyhli/outline.nvim
This commit is contained in:
@@ -19,7 +19,7 @@ Table of Contents *outline-table-of-contents*
|
|||||||
PREREQUISITES *outline-prerequisites*
|
PREREQUISITES *outline-prerequisites*
|
||||||
|
|
||||||
- Neovim 0.7+
|
- Neovim 0.7+
|
||||||
- Properly configured Neovim LSP client
|
- Properly configured Neovim LSP client (otherwise only markdown is supported)
|
||||||
|
|
||||||
|
|
||||||
INSTALLATION *outline-installation*
|
INSTALLATION *outline-installation*
|
||||||
|
|||||||
@@ -96,16 +96,13 @@ function M.parse_ts(root, children, bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.get_symbols(bufnr)
|
function M.get_symbols(bufnr)
|
||||||
local status, parsers = pcall(require, 'nvim-treesitter.parsers')
|
bufnr = bufnr or 0
|
||||||
|
|
||||||
|
local status, parser = pcall(vim.treesitter.get_parser, bufnr)
|
||||||
if not status then
|
if not status then
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|
||||||
bufnr = bufnr or 0
|
|
||||||
|
|
||||||
local parser = parsers.get_parser(bufnr)
|
|
||||||
|
|
||||||
if parser == nil then
|
if parser == nil then
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user