Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hedyhli/outline.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
hedyhli committed Nov 21, 2023
2 parents e2838c1 + a21a17c commit 31ef50e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/outline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Table of Contents *outline-table-of-contents*
PREREQUISITES *outline-prerequisites*

- Neovim 0.7+
- Properly configured Neovim LSP client
- Properly configured Neovim LSP client (otherwise only markdown is supported)


INSTALLATION *outline-installation*
Expand Down
7 changes: 2 additions & 5 deletions lua/outline/utils/jsx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,13 @@ function M.parse_ts(root, children, bufnr)
end

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
return {}
end

bufnr = bufnr or 0

local parser = parsers.get_parser(bufnr)

if parser == nil then
return {}
end
Expand Down

0 comments on commit 31ef50e

Please sign in to comment.