Skip to content

completeFunctionCalls adds brackets when writing JSX #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
m-gail opened this issue Feb 22, 2024 · 1 comment
Open

completeFunctionCalls adds brackets when writing JSX #239

m-gail opened this issue Feb 22, 2024 · 1 comment

Comments

@m-gail
Copy link

m-gail commented Feb 22, 2024

If you set the option complete_function_calls to true, brackets will also be added when completing JSX, even though JSX elements are not called as functions.

tstools

The expected behavior should be to not complete function calls in JSX markup. For example, in VS-Code it would work like this:

vscode

@m-gail
Copy link
Author

m-gail commented Feb 23, 2024

After some testing I found a few other instances where completeFunctionCalls works incorrectly, for example in import statements or destructuring objects.
The problems are the ones handled by this function in typescript-language-server:
https://github.com/typescript-language-server/typescript-language-server/blob/983a6923114c39d638e0c7d419ae16e8bca8985c/src/completion.ts#L326
I think typescript-tools.nvim should behave the same as typescript-language-server here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant