name = "JavaScript"
grammar = "tsx"
path_suffixes = ["js", "jsx", "mjs", "cjs"]
# [/ ] is so we match "env node" or "/node" but not "ts-node"
first_line_pattern = '^#!.*\b(?:[/ ]node|deno run.*--ext[= ]js)\b'
line_comments = ["// "]
block_comment = { start = "/*", prefix = "* ", end = "*/", tab_size = 1 }
documentation_comment = { start = "/**", prefix = "* ", end = "*/", tab_size = 1 }
wrap_characters = { start_prefix = "<", start_suffix = ">", end_prefix = "</", end_suffix = ">" }
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"] },
]
word_characters = ["$", "#"]
tab_size = 2
scope_opt_in_language_servers = ["tailwindcss-language-server", "emmet-language-server"]
prettier_parser_name = "babel"
debuggers = ["JavaScript"]
import_path_strip_regex = "(?:/index)?\\.[jt]s$"

[jsx_tag_auto_close]
open_tag_node_name = "jsx_opening_element"
close_tag_node_name = "jsx_closing_element"
jsx_element_node_name = "jsx_element"
tag_name_node_name = "identifier"

[overrides.default]
linked_edit_characters = ["."]

[overrides.element]
line_comments = { remove = true }
block_comment = { start = "{/* ", prefix = "", end = "*/}", tab_size = 0 }
opt_into_language_servers = ["emmet-language-server"]

[overrides.string]
completion_query_characters = ["-", "."]
opt_into_language_servers = ["tailwindcss-language-server"]
