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:
parent
e93dca5ec3
commit
3921259b6c
1 changed files with 30 additions and 23 deletions
|
@ -1,33 +1,40 @@
|
||||||
name = "Ruby"
|
name = "Ruby"
|
||||||
grammar = "ruby"
|
grammar = "ruby"
|
||||||
path_suffixes = [
|
path_suffixes = [
|
||||||
"rb",
|
"rb",
|
||||||
"Gemfile",
|
"Gemfile",
|
||||||
"rake",
|
"rake",
|
||||||
"Rakefile",
|
"Rakefile",
|
||||||
"ru",
|
"ru",
|
||||||
"thor",
|
"thor",
|
||||||
"cap",
|
"cap",
|
||||||
"capfile",
|
"capfile",
|
||||||
"Capfile",
|
"Capfile",
|
||||||
"jbuilder",
|
"jbuilder",
|
||||||
"rabl",
|
"rabl",
|
||||||
"rxml",
|
"rxml",
|
||||||
"builder",
|
"builder",
|
||||||
"gemspec",
|
"gemspec",
|
||||||
"rdoc",
|
"rdoc",
|
||||||
"thor",
|
"thor",
|
||||||
"pryrc",
|
"pryrc",
|
||||||
"simplecov"
|
"simplecov",
|
||||||
]
|
]
|
||||||
first_line_pattern = '^#!.*\bruby\b'
|
first_line_pattern = '^#!.*\bruby\b'
|
||||||
line_comments = ["# "]
|
line_comments = ["# "]
|
||||||
autoclose_before = ";:.,=}])>"
|
autoclose_before = ";:.,=}])>"
|
||||||
brackets = [
|
brackets = [
|
||||||
{ start = "{", end = "}", close = true, newline = true },
|
{ start = "{", end = "}", close = true, newline = true },
|
||||||
{ start = "[", end = "]", close = true, newline = true },
|
{ 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 = [
|
||||||
{ start = "'", end = "'", close = true, newline = false, not_in = ["comment", "string"] },
|
"comment",
|
||||||
|
"string",
|
||||||
|
] },
|
||||||
|
{ start = "'", end = "'", close = true, newline = false, not_in = [
|
||||||
|
"comment",
|
||||||
|
"string",
|
||||||
|
] },
|
||||||
]
|
]
|
||||||
collapsed_placeholder = "# ..."
|
collapsed_placeholder = "# ..."
|
||||||
|
word_characters = ["_", "$", "=", "@", "!", ":", "?"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue