mirror of https://github.com/helix-editor/helix
fix: Improving JSX and TSX indents (#3853)
parent
111d2dafd3
commit
714db9c666
|
@ -332,7 +332,7 @@ source = { git = "https://github.com/omertuc/tree-sitter-go-work", rev = "6dd9dd
|
||||||
name = "javascript"
|
name = "javascript"
|
||||||
scope = "source.js"
|
scope = "source.js"
|
||||||
injection-regex = "(js|javascript)"
|
injection-regex = "(js|javascript)"
|
||||||
file-types = ["js", "jsx", "mjs", "cjs"]
|
file-types = ["js", "mjs", "cjs"]
|
||||||
shebangs = ["node"]
|
shebangs = ["node"]
|
||||||
roots = []
|
roots = []
|
||||||
comment-token = "//"
|
comment-token = "//"
|
||||||
|
@ -363,7 +363,7 @@ injection-regex = "jsx"
|
||||||
file-types = ["jsx"]
|
file-types = ["jsx"]
|
||||||
roots = []
|
roots = []
|
||||||
comment-token = "//"
|
comment-token = "//"
|
||||||
language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
|
language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascriptreact" }
|
||||||
indent = { tab-width = 2, unit = " " }
|
indent = { tab-width = 2, unit = " " }
|
||||||
grammar = "javascript"
|
grammar = "javascript"
|
||||||
|
|
||||||
|
|
|
@ -1 +1,9 @@
|
||||||
|
[
|
||||||
|
(jsx_fragment)
|
||||||
|
(jsx_element)
|
||||||
|
(jsx_self_closing_element)
|
||||||
|
] @indent
|
||||||
|
|
||||||
|
(parenthesized_expression) @indent
|
||||||
|
|
||||||
; inherits: ecma
|
; inherits: ecma
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
; inherits: typescript
|
; inherits: typescript,jsx
|
||||||
|
|
Loading…
Reference in New Issue