Bug 462324 - [LSP plugin] typescript-language-server JSX props auto-completion partially working
Summary: [LSP plugin] typescript-language-server JSX props auto-completion partially w...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.08.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-27 18:40 UTC by Arnaud
Modified: 2022-12-14 14:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Autocomplete not suggesting props for a simple component (60.99 KB, image/png)
2022-11-27 18:40 UTC, Arnaud
Details
Autocomplete suggesting only one prop (43.11 KB, image/png)
2022-11-27 18:47 UTC, Arnaud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud 2022-11-27 18:40:06 UTC
Created attachment 154088 [details]
Autocomplete not suggesting props for a simple component

SUMMARY

When entering props for a JSX component (eg: when working with react/react-native), the autocompletion does not show results reliably. For simple components it seems to not show any props, but for larger components from libraries I can use autocomplete for only some of them. I'll try to dig more into this to maybe see a pattern.

STEPS TO REPRODUCE
1. Install typescript-language-server (https://github.com/typescript-language-server/typescript-language-server)
2. Enable the Kate LSP plugin
3. Open a react/react-native project
4. Create a simple component accepting props
5. Create another component and render the previous component
6. Try to use auto-completion, see how the props are not suggested.

OBSERVED RESULT

The props are not suggested in the autocomplete popup, but the component signature is shown in another popup (with the name of the props available). See the attached screenshot.

EXPECTED RESULT

All props accepted by a JSX component should be suggested in the autocomplete popup.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Kernel Version: 6.0.8-1-MANJARO (64-bit)
ADDITIONAL INFORMATION
Comment 1 Arnaud 2022-11-27 18:47:29 UTC
Created attachment 154089 [details]
Autocomplete suggesting only one prop

As you can see in this screenshot, the autocomplete shows only one of the 6 available props, making the feature unreliable.
Comment 2 Arnaud 2022-12-14 14:06:20 UTC
Compiled latest version from git and it seems fixed, thanks for your hard work!