Select language based on a file's first content line in addition to its path

This commit is contained in:
Max Brunsfeld 2023-04-16 12:28:27 -07:00
parent e655a6c767
commit 1dcd4717b1
6 changed files with 85 additions and 30 deletions

View file

@ -1,5 +1,6 @@
name = "JavaScript"
path_suffixes = ["js", "jsx", "mjs"]
first_line_pattern = '^#!.*\bnode\b'
line_comment = "// "
autoclose_before = ";:.,=}])>"
brackets = [

View file

@ -1,5 +1,6 @@
name = "Python"
path_suffixes = ["py", "pyi"]
first_line_pattern = '^#!.*\bpython[0-9.]*\b'
line_comment = "# "
autoclose_before = ";:.,=}])>"
brackets = [

View file

@ -1,5 +1,6 @@
name = "Ruby"
path_suffixes = ["rb", "Gemfile"]
first_line_pattern = '^#!.*\bruby\b'
line_comment = "# "
autoclose_before = ";:.,=}])>"
brackets = [