-
Notifications
You must be signed in to change notification settings - Fork 170
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
Definition jumps are not possible with files containing Japanese characters. #1347
Comments
Thank you for the bug report! I suspect this is related to #1251. The Prism parser returns byte instead of character locations, so multibyte characters are currently throwing off the language server. We need to come up with a strategy to fix this generally for the entire language server since locations are used everywhere. |
Thanks for getting back to me. I could not find that Issue. Sorry to have bothered you. It seems like a difficult issue to solve. I will wait patiently. |
I have a similar problem, How is your progress? DescriptionI'm also using VSCode's ruby-lsp plugin, but it seems that if there is more than 13 bytes of character data, including multibyte characters, in the method comment, I cannot define a jump.
Success File class Foo
# ああああ
def foobar
puts 'foobar'
end
end
foo = Foo.new
foo.foobar Failed File class Foo
# あああああ
def foobar
puts 'foobar'
end
end
foo = Foo.new
foo.foobar environment
|
We need to finalize #2051. I ended up not being able to dedicate enough time to help the author push the PR over the finish line. I'm going to ask to get the PR up again and help get it shipped. |
Ruby version
3.1.4, 3.2.2, 3.3.0
Code snippet
Gemfile
vscode/settings.json
success file
failed file
success file 2
VSCode
However, I have the same issue on my Mac
Description
I was going to use vscode's ruby-lsp plugin. However, after struggling for a while, I could not make the definition jump.
The cause seems to be the presence of Japanese comments in the file.
In the attached Ruby code, I assume a situation like jumping from
pp TEST
toTEST = 'test'
.' In the case of the code written insuccess file 1', it succeeds. But for the code in
failed file, it fails. The only difference is that the Japanese comment
# テスト` is on the line above the jump source.Furthermore, if you look at
success file 2
, it succeeds if the same Japanese comment is added to the line below the jump source.If there is any information I am missing, please let me know.
Expected output
Maybe this is true for other languages as well. I hope that eventually Japanese will be handled properly and we can jump from
pp TEST
toTEST = 'test'
in examples likefailed file
.The text was updated successfully, but these errors were encountered: