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

LSP completions are case sensitive; add option to have them be case insensitive #2017

Closed
aral opened this issue Apr 8, 2022 · 4 comments · Fixed by #6008
Closed

LSP completions are case sensitive; add option to have them be case insensitive #2017

aral opened this issue Apr 8, 2022 · 4 comments · Fixed by #6008
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements

Comments

@aral
Copy link
Contributor

aral commented Apr 8, 2022

Summary

LSP completions are case sensitive at the moment. It would be nice to have the option to make them case insensitive.

Reproduction Steps

In the following example:

const FOO

console.log(fo)

pressing tab after fo results in:

Screenshot from 2022-04-08 11-35-06@2x

(FOO is not shown.)

Why is this important?

Because it is more ergonomic not to have to press shift all the time.

Suggested implementation

Either:

  1. Make case-insensitive auto-completion the default, or
  2. Make case-insensitive auto-completion a setting (this could make use of the already existing smart-case setting)

Platform

Linux

Terminal Emulator

io.elementary.t

Helix Version

helix 22.05-dev (2d4f94e)

@aral aral added the C-bug Category: This is a bug label Apr 8, 2022
@aral
Copy link
Contributor Author

aral commented Apr 8, 2022

Sorry, I can’t remove the bug label. This is an enhancement request, not a bug.

@the-mikedavis the-mikedavis added C-enhancement Category: Improvements and removed C-bug Category: This is a bug labels Apr 8, 2022
@the-mikedavis
Copy link
Member

I'm curious how other editors do this. I assume this would be something the language server would handle itself when figuring out what completions are available, but maybe we can handle it on the client side by figuring out permutations of the text for snake-case, camel-case, shout-case, etc.

@aral
Copy link
Contributor Author

aral commented Apr 8, 2022

@the-mikedavis Not sure. I’m currently using the TypeScript LSP (https://github.com/typescript-language-server/typescript-language-server).

I know that in VSCode the completions are case insensitive (at least by default, I never felt the need to change that).

@kirawi kirawi added the A-language-server Area: Language server client label May 26, 2022
@gbogarinb
Copy link
Contributor

I'm coding in typescript now and suffering from this, where should I look to even try to improve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@aral @gbogarinb @the-mikedavis @kirawi and others