Configure atoms for Ruby

pull/70/head
Wilfred Hughes 2021-11-20 14:46:12 +07:00
parent a5ed3fbd48
commit fd4c17ecf1
2 changed files with 2 additions and 8 deletions

@ -1,3 +1 @@
# Hello world VALID_FILENAME_CHARS = 'foo'
gem "jekyll", "~> #{Jekyll::VERSION}"
foo ""

@ -204,16 +204,12 @@ pub fn from_extension(extension: &OsStr) -> Option<TreeSitterConfig> {
"rb" => Some(TreeSitterConfig { "rb" => Some(TreeSitterConfig {
name: "Ruby", name: "Ruby",
language: unsafe { tree_sitter_ruby() }, language: unsafe { tree_sitter_ruby() },
atom_nodes: (vec!["escape_sequence", "string_content"]) atom_nodes: (vec!["string", "heredoc_body", "regex"]).into_iter().collect(),
.into_iter()
.collect(),
delimiter_tokens: (vec![ delimiter_tokens: (vec![
("{", "}"), ("{", "}"),
("(", ")"), ("(", ")"),
("[", "]"), ("[", "]"),
("|", "|"), ("|", "|"),
// TODO: why doesn't this work on Jekyll commit 369c34510782ac8?
// ("\"", "\""),
("def", "end"), ("def", "end"),
("begin", "end"), ("begin", "end"),
("class", "end"), ("class", "end"),