rails-i18n-vscode
rails-i18n-vscode copied to clipboard
IntelliSense issues (prevents suggestion popup anything starts with lowercase letter)
When I install your extension, my intellisense with Solargraph/Ruby stops working when method or variable starts with lowercase letter.
Let's say you have this:
def a
local_variable = 1
# now, to get autocomplete you can write "loc"
loc #<-- I should get local_variable as a suggestion.
end
On normal cases, it works as expected. When I enable/install this extension, I no longer get any suggestion for anything that starts with lowercase letter.
To work with it, I need to manually trigger popup via Ctrl+Space or put a dot, @ or upppercase class names.
Please see below link and watch the GIFs.
Disabling this extension solves all problems and also intellisense becomes very responsive too.
Follow from here: https://github.com/castwide/solargraph/issues/212#issuecomment-524697883
Basically, this extension prevents intellisense suggestions from being visible on very first character.
@gencer Thanks for the report. I can actually confirm this, in your example the extension returns a valid empty result, which should make vscode call the next completion provider (solargraph), which it somehow doesn't. You should be able to make the extension work again by removing ruby from the rails i18n language identifiers setting.
@shanehofstetter thanks. I did the change. But we should fix this. Because I use I18n.t('...')
in Ruby too.
Update: I see that 0.4.0
released and have some improvements.
The update may bring some improvements yes, but its not resolved, at least on my machine. Problem may be related to this https://github.com/Microsoft/vscode/issues/27042
So it seems if I remove the trigger characters (which made the completion provider the most specific and thus blocked solargraph) it works nicely, but one has to apply the following vscode settings in order for the autocomplete to work inside i18n calls:
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true // <- this one
}
Which seems quite inconvenient, not really sure what to do..
@shanehofstetter I applied the setting but still having issues with suggestions not showing up for lower case chars (I use TabNine for suggestions). Is there an option to deactivate i18n suggestions and just keep the goTo and hover features? BTW it's a great extension.