Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: language server hover/completions are too verbose (#6562)
The LSP currently shows a lot of information at once. This can be useful when you want to reference information, but it is way too overwhelming to see it everywhere all the time. The general goal of this PR was to improve the overwhelming nature of the provided information and fix some other bugs along the way. - Types are now rendered entirely in a highlighted code block (no more markdown headers for members) - Typeclasses are limited to showing 6 members at once - Less depth of information is shown in general - This along with some other tweaks fixes #4853 - Typeclass members are sorted by more factors - members inherited from `constructs.Construct` (and related primitives) are hidden in completions (no more `node` and `toString` showing up everwhere) - If a typeclass is empty the completion/hover will say so - Fixes #5575 - Links in markdown that look like `{@link URL LABEL}` are now rendered as regular markdown links (Common in cdktf provider libs) - Struct expansion completions are fixed in multiple places - Notably, if you start typing a struct field you'll see relevant completions. Previously the completions only showed correctly if you triggered completions with before attempting to type anything. Fixes #4983 ## Before (cursor kept in the middle to make it look even worse) https://github.com/winglang/wing/assets/1237390/c13c6680-ec78-4cb0-a7cc-601dc6462b9e <img width="761" alt="image" src="https://github.com/winglang/wing/assets/1237390/cd622055-7aa2-4433-8fbc-097ecce1f28b"> ## After https://github.com/winglang/wing/assets/1237390/befca5be-18fd-4111-8e9b-2fd1cf6e1f34 <img width="1079" alt="image" src="https://github.com/winglang/wing/assets/1237390/1aaee0e9-82f4-4b68-8429-bfb432613336"> <img width="1098" alt="image" src="https://github.com/winglang/wing/assets/1237390/3093585f-d316-4222-a2d6-4d60b86d056f">
- Loading branch information