20 lines
921 B
TOML
20 lines
921 B
TOML
name = "JavaScript"
|
|
path_suffixes = ["js", "jsx", "mjs", "cjs"]
|
|
first_line_pattern = '^#!.*\bnode\b'
|
|
line_comment = "// "
|
|
autoclose_before = ";:.,=}])>"
|
|
brackets = [
|
|
{ start = "{", end = "}", close = true, newline = true },
|
|
{ start = "[", end = "]", close = true, newline = true },
|
|
{ start = "(", end = ")", close = true, newline = true },
|
|
{ start = "<", end = ">", close = false, newline = true, not_in = ["comment", "string"] },
|
|
{ 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 = false, not_in = ["comment", "string"] },
|
|
{ start = "/*", end = " */", close = true, newline = false, not_in = ["comment", "string"] },
|
|
]
|
|
|
|
[overrides.element]
|
|
line_comment = { remove = true }
|
|
block_comment = ["{/* ", " */}"]
|