Skip to content
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

fix: map optionalReplacementSpan for typescript-language-server #2257

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

jasonlyu123
Copy link
Member

@jasonlyu123 jasonlyu123 commented Jan 12, 2024

#2251 For typescript plugin

The reason is that ts.CompletionInfo.optionalReplacementSpan is still generated position, and the typescript-language-server used it to create TextEdit, but the position doesn't exist. Neovim probably filters it out because it is invalid. VSCode doesn't use ts.CompletionInfo.optionalReplacementSpan, so we never map it.

https://github.com/typescript-language-server/typescript-language-server/blob/80ef6149cd64b9859e402adb1ca3e7c410ab52b5/src/lsp-server.ts#L529
https://github.com/typescript-language-server/typescript-language-server/blob/80ef6149cd64b9859e402adb1ca3e7c410ab52b5/src/completion.ts#L154

@dummdidumm dummdidumm merged commit c6a7994 into sveltejs:master Jan 12, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants