mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 18:31:37 +03:00
windows: Replace symlinks with files for TSX Tree-sitter queries (#13893)
Previously to these changes, as stated in the issue, when someone tried to use TSX as language for the file, the language was not set and it disappeared from the selectable language list. This was due to the fact that that the three files were symlinks, and windows couldn't read them. I replaced them with normal files. Fixes #12208. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
c5e5add094
commit
7f50055d70
@ -1 +0,0 @@
|
||||
../typescript/brackets.scm
|
5
crates/languages/src/tsx/brackets.scm
Normal file
5
crates/languages/src/tsx/brackets.scm
Normal file
@ -0,0 +1,5 @@
|
||||
("(" @open ")" @close)
|
||||
("[" @open "]" @close)
|
||||
("{" @open "}" @close)
|
||||
("<" @open ">" @close)
|
||||
("\"" @open "\"" @close)
|
@ -1 +0,0 @@
|
||||
../typescript/indents.scm
|
15
crates/languages/src/tsx/indents.scm
Normal file
15
crates/languages/src/tsx/indents.scm
Normal file
@ -0,0 +1,15 @@
|
||||
[
|
||||
(call_expression)
|
||||
(assignment_expression)
|
||||
(member_expression)
|
||||
(lexical_declaration)
|
||||
(variable_declaration)
|
||||
(assignment_expression)
|
||||
(if_statement)
|
||||
(for_statement)
|
||||
] @indent
|
||||
|
||||
(_ "[" "]" @end) @indent
|
||||
(_ "<" ">" @end) @indent
|
||||
(_ "{" "}" @end) @indent
|
||||
(_ "(" ")" @end) @indent
|
@ -1 +0,0 @@
|
||||
../typescript/outline.scm
|
76
crates/languages/src/tsx/outline.scm
Normal file
76
crates/languages/src/tsx/outline.scm
Normal file
@ -0,0 +1,76 @@
|
||||
(internal_module
|
||||
"namespace" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(enum_declaration
|
||||
"enum" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(type_alias_declaration
|
||||
"type" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(function_declaration
|
||||
"async"? @context
|
||||
"function" @context
|
||||
name: (_) @name
|
||||
parameters: (formal_parameters
|
||||
"(" @context
|
||||
")" @context)) @item
|
||||
|
||||
(interface_declaration
|
||||
"interface" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(export_statement
|
||||
(lexical_declaration
|
||||
["let" "const"] @context
|
||||
(variable_declarator
|
||||
name: (_) @name) @item))
|
||||
|
||||
(program
|
||||
(lexical_declaration
|
||||
["let" "const"] @context
|
||||
(variable_declarator
|
||||
name: (_) @name) @item))
|
||||
|
||||
(class_declaration
|
||||
"class" @context
|
||||
name: (_) @name) @item
|
||||
|
||||
(method_definition
|
||||
[
|
||||
"get"
|
||||
"set"
|
||||
"async"
|
||||
"*"
|
||||
"readonly"
|
||||
"static"
|
||||
(override_modifier)
|
||||
(accessibility_modifier)
|
||||
]* @context
|
||||
name: (_) @name
|
||||
parameters: (formal_parameters
|
||||
"(" @context
|
||||
")" @context)) @item
|
||||
|
||||
(public_field_definition
|
||||
[
|
||||
"declare"
|
||||
"readonly"
|
||||
"abstract"
|
||||
"static"
|
||||
(accessibility_modifier)
|
||||
]* @context
|
||||
name: (_) @name) @item
|
||||
|
||||
; Add support for (node:test, bun:test and Jest) runnable
|
||||
(call_expression
|
||||
function: (_) @context
|
||||
(#any-of? @context "it" "test" "describe")
|
||||
arguments: (
|
||||
arguments . (string
|
||||
(string_fragment) @name
|
||||
)
|
||||
)
|
||||
) @item
|
Loading…
Reference in New Issue
Block a user