From 483aa1574d17dc53dbece461359f09997eb07f38 Mon Sep 17 00:00:00 2001 From: Brandon Sprague Date: Mon, 22 May 2023 08:38:28 -0700 Subject: [PATCH] Treat 'Vagrantfile' files as Ruby code `Vagrantfile`s are configuration files for the [vagrant](https://www.vagrantup.com/) tool, and they are written in Ruby. Even as vagrant [is ported to Go](https://www.hashicorp.com/blog/toward-vagrant-3-0), `Vagrantfile`s [will be written in Ruby](https://developer.hashicorp.com/vagrant/docs/experimental/vagrant_go) When a Vangrantfile is created, it starts with these lines: ``` ``` But since Helix (quite reasonably) doesn't change editor behavior based on file contents, adding this to `languages.toml` seems like a reasonable way to get this functionality. --- languages.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index d270c2ea5633..881a5188875e 100644 --- a/languages.toml +++ b/languages.toml @@ -670,7 +670,7 @@ source = { git = "https://github.com/nix-community/tree-sitter-nix", rev = "1b69 name = "ruby" scope = "source.ruby" injection-regex = "ruby" -file-types = ["rb", "rake", "rakefile", "irb", "gemfile", "gemspec", "Rakefile", "Gemfile", "rabl", "jbuilder", "jb", "Podfile", "podspec"] +file-types = ["rb", "rake", "rakefile", "irb", "gemfile", "gemspec", "Rakefile", "Gemfile", "rabl", "jbuilder", "jb", "Podfile", "podspec", "Vagrantfile"] shebangs = ["ruby"] roots = [] comment-token = "#"