Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Thorsten Ball3921259b6c05
diff --git a/crates/zed/src/languages/ruby/config.toml b/crates/zed/src/languages/ruby/config.toml
index d3285d48d2b..3784952f6c7 100644
--- a/crates/zed/src/languages/ruby/config.toml
+++ b/crates/zed/src/languages/ruby/config.toml
@@ -1,33 +1,40 @@
name = "Ruby"
grammar = "ruby"
path_suffixes = [
- "rb",
- "Gemfile",
- "rake",
- "Rakefile",
- "ru",
- "thor",
- "cap",
- "capfile",
- "Capfile",
- "jbuilder",
- "rabl",
- "rxml",
- "builder",
- "gemspec",
- "rdoc",
- "thor",
- "pryrc",
- "simplecov"
+ "rb",
+ "Gemfile",
+ "rake",
+ "Rakefile",
+ "ru",
+ "thor",
+ "cap",
+ "capfile",
+ "Capfile",
+ "jbuilder",
+ "rabl",
+ "rxml",
+ "builder",
+ "gemspec",
+ "rdoc",
+ "thor",
+ "pryrc",
+ "simplecov",
]
first_line_pattern = '^#!.*\bruby\b'
line_comments = ["# "]
autoclose_before = ";:.,=}])>"
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 = 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",
+ ] },
]
collapsed_placeholder = "# ..."
+word_characters = ["_", "$", "=", "@", "!", ":", "?"]