Extend Ruby word characters to include valid identifier chars (#7824)

In Ruby `_$=@!:?` can all be part of an identifier. If we don't have
them in this list, autocomplete doesn't work as expected.

See: https://gist.github.com/misfo/1072693

This fixes one part of #7819 but not the whole ticket.

Release Notes:

- Fixed completions in Ruby not working for identifiers that start or
end with special characters (e.g.: `@`)
This commit is contained in:
Thorsten Ball 2024-02-15 14:25:18 +01:00 committed by GitHub
parent e93dca5ec3
commit 3921259b6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ path_suffixes = [
"rdoc",
"thor",
"pryrc",
"simplecov"
"simplecov",
]
first_line_pattern = '^#!.*\bruby\b'
line_comments = ["# "]
@ -27,7 +27,14 @@ brackets = [
{ start = "{", end = "}", close = true, newline = true },
{ start = "[", end = "]", close = true, newline = true },
{ start = "(", end = ")", close = true, newline = true },
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["comment", "string"] },
{ start = "'", end = "'", close = true, newline = false, not_in = ["comment", "string"] },
{ start = "\"", end = "\"", close = true, newline = false, not_in = [
"comment",
"string",
] },
{ start = "'", end = "'", close = true, newline = false, not_in = [
"comment",
"string",
] },
]
collapsed_placeholder = "# ..."
word_characters = ["_", "$", "=", "@", "!", ":", "?"]