folke / trouble.nvim

🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.
Apache License 2.0
5.11k stars 173 forks source link

bug: Types not visible in trouble document symbols sidebar #493

Closed zayihu closed 3 weeks ago

zayihu commented 3 weeks ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478

Operating system/version

ArchLinux, kernel 6.9.3

Describe the bug

TypeScript types not visible in symbols panel, only interfaces. Screenshot_20240609_184900

Steps To Reproduce

  1. load nvim config: https://github.com/zayihu/dotfiles/tree/main/nvim
  2. Open project folder in nvim.
  3. Open TypeScript types file.
  4. Interfaces are visible as document symbols, types are not.

Expected Behavior

Expecting TypeScript types to be visible as doc symbols too.

Repro

No response

folke commented 3 weeks ago

If you use :Trouble symbols, then there's a filter added to only show the most relevant kinds.

See the config at https://github.com/folke/trouble.nvim?tab=readme-ov-file#%EF%B8%8F-configuration

I just checked and it seems that type defs have the kind Variable, which is weird tbh.

You can change the filter to inucde those or to include all.

You can also see all of them by using :Trouble lsp_document_symbols instead

zayihu commented 3 weeks ago

Thank you very much! Will try.