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

Should filterText trim prefixes? #729

Closed
stamblerre opened this issue Apr 20, 2019 · 5 comments
Closed

Should filterText trim prefixes? #729

stamblerre opened this issue Apr 20, 2019 · 5 comments

Comments

@stamblerre
Copy link

For example, if I have a variable abc in scope, and I have typed a, should the filter text be bc? I would guess yes, based on the behavior of VSCode, but it seems that other language servers behave differently.

For context, this question was first brought up in golang/go#31552 and tigersoldier/company-lsp#103.

@rcjsuen
Copy link
Contributor

rcjsuen commented Apr 20, 2019

Personally, I don't trim filterText in my language server but I can't speak for anyone else. I don't recall any past discussions about this field either.

@stamblerre
Copy link
Author

It seems that most other language servers don't either, and I didn't expect that I had to - however, without doing trimming, VSCode doesn't behave as I would expect it to. Perhaps this is a VSCode bug? Would be happy to file it there, but it would also be helpful to clarify this in the spec.

@muirdm
Copy link

muirdm commented Apr 24, 2019

The Rust server does not set filterPrefix but works correctly in VSCode (using the example in golang/go#31552 (comment)). This is starting to look like a VSCode go extension bug. Do language extensions have custom handling of completion candidates?

@stamblerre
Copy link
Author

The only handling would be in the language client, which is in https://github.com/Microsoft/vscode-languageserver-node. I'll open an issue there, but for now, I'll leave the filter text as is in gopls. Maybe I can add a temporary config to not trim it.

@dbaeumer
Copy link
Member

@stamblerre I commented in microsoft/vscode-languageserver-node#488

Lets close this issue for now until I have a better understanding why your case is failing. I was not able to reproduce it.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants