-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support includeAutomaticOptionalChainCompletions option #134
Comments
It's a new feature, not supported yet. |
@chemzqm hi! just updated the extension to check your fix, and you made it wrong, sorry :(
It must NOT disable the completion on such values. Completion must be triggered as usual after the dot, but this option must be passed to typescript engine to make it stop adding the '?.' to the suggestions.
But with the recent update the completion is not triggered at all (for both 'true' and 'false' values), until you type The initial intention was to disable the wrong |
Looks like you're using old version of coc-tsserver. |
my version is 1.5.1 |
Fixed on latest release branch of coc.nvim. |
The completion is triggered, but filterText could be wrong. |
Oh, thanks. Sorry for troubling you |
Hi. There is a bug with optional chain operator completion if the
strictNullChecks
mode is enabled in the tsconfig.json.TL;DR - for objects which are possibly null, typescript returns the the completed item with prepended
?.
symbols and vim just appends it to the previously manually added dot, and we get:obj.?.prop
.Example:
When I add a dot and go through the suggestions this happens:
Typescript lib returns the
?.prop
completed item, and nvim wouldn't delete the dot inserted manually before. It's very annoying, and I'd prefer to insert the?
manually, and luckily there is an option:typescript.suggest.includeAutomaticOptionalChainCompletions
Look here the definition
But it seems that coc doesn't pass this option from the coc-config to the typescript.
Here is a coc-log:
The text was updated successfully, but these errors were encountered: