vscode-modern-vhdl icon indicating copy to clipboard operation
vscode-modern-vhdl copied to clipboard

Respect letter case in code completion hints

Open dominiksalvet opened this issue 4 years ago • 4 comments

Hello for the third time! :smile:

The current letter case of code completion hints does not always match with the letter case of actually applied hints. In other words, the code completion hints do not respect vhdl.suggestAttributeCase, vhdl.suggestLibraryCase and vhdl.suggestPackageCase settings and they have fixed letter case.

This one is not a serious issue to be honest but it decreases the overall user experience a bit. Hence, would it be feasible to make the code completions respect the mentioned settings? Or is there too much overhead in that? :thinking:


With the worst case settings, it may look like that (click on me):

magic

The settings I used are probably obvious but just for the sake of completeness:

"vhdl.suggestAttributeCase": "upper"
"vhdl.suggestLibraryCase": "lower"
"vhdl.suggestPackageCase": "lower"

dominiksalvet avatar Jun 22 '20 22:06 dominiksalvet

This issue is the last one in this batch, I promise. :pray: Thank you for your time, I really appreciate it! :purple_heart:

dominiksalvet avatar Jun 22 '20 22:06 dominiksalvet

There are two parts to this I think. Has been a while since I implemented this so bear with me...

In the case of the library, the completion you see is from the snippet definition. Snippets are not particularly flexible and VSCode consideration of case insensitive languages is lacking.

The other completions are defined via the completions API and absolutely can be modified to behave as you suggest.

richjyoung avatar Jun 23 '20 09:06 richjyoung

Turns out the library... line is a snippet, and use... triggers a completion. Either way, I am sure the suggested and actual text inserted can be aligned to respect the settings.

richjyoung avatar Jun 23 '20 09:06 richjyoung

Great! Glad to hear that. :rocket:

dominiksalvet avatar Jun 23 '20 15:06 dominiksalvet