From 2a2cf45e9094bc4c3ee739ebaf4b81e752345490 Mon Sep 17 00:00:00 2001 From: Ben Hamment Date: Mon, 29 Jan 2024 22:41:57 +0000 Subject: [PATCH] Improve file types list for Ruby syntax (#7022) ### Improved list of file types that require Ruby syntax highlighting - `.ru` files: These are Rackup files and are used for configuring Rack applications. - `.thor` files: Used for defining Thor tasks. Thor is a toolkit for building powerful command-line interfaces in Ruby. - `.cap, .capfile, and Capfile`: These files are used for Capistrano deployment configuration. - `.jbuilder` files: Used for creating JSON responses in a Rails application. - `.rabl files`: RABL (Ruby API Builder Language) files are used for defining JSON templates. - `.rxml` files: RXML files are used for creating XML responses. - `.builder` files: Builder templates, which are used for generating XML and other formats. - `.gemspec` files: These files define metadata for a RubyGem. - `.rdoc` files: RDoc documentation files. - `.thor` files: These files are used for defining Thor tasks. - `.pryrc` files: Configuration files for the Pry REPL (Read-Eval-Print Loop). - `.simplecov`: Configuration file for SimpleCov, a code coverage analysis tool. #### Some examples - image - image - image - image - image - image - image - image - `path_suffixes` Also new lines the array for readability especially for diffs. Release Notes: - Associated `.ru`, `.thor`, `.cap`, `.capfile`, `Capfile`, `.jbuilder`, `.rabl`, `.rxml`, `.builder`, `.gemspec`, `.rdoc`, `.thor`, `.pryrc`, and `.simplecov` files with Ruby. --- crates/zed/src/languages/ruby/config.toml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/crates/zed/src/languages/ruby/config.toml b/crates/zed/src/languages/ruby/config.toml index e522cd06a2..8f2f1fab97 100644 --- a/crates/zed/src/languages/ruby/config.toml +++ b/crates/zed/src/languages/ruby/config.toml @@ -1,5 +1,24 @@ name = "Ruby" -path_suffixes = ["rb", "Gemfile", "rake", "Rakefile"] +path_suffixes = [ + "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 = ";:.,=}])>"