nvim-treesitter / playground

Treesitter playground integrated into Neovim
Apache License 2.0
897 stars 47 forks source link

fix(fallback for show_hl_captures) #87

Closed aarondiel closed 2 years ago

aarondiel commented 2 years ago

currently if treesitter-highlighter is not loaded and there is no syntax available, :TSCaptureUnderCursor throws an error; this commit makes sure that no empty array is passed into open_floating_preview.

additionally show_hl_captures will now try to query the highlight group even if vim.b.current_syntax == nil as a fallback

this is useful inside buffers that manage their own highlight groups (nvim-tree, neogit, etc)

theHamsta commented 2 years ago

Thank you!