Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c66b2f04d2 | |||
| 29575c1e20 |
+3
-1
@@ -1,2 +1,4 @@
|
||||
---@type vim.lsp.Config
|
||||
return {}
|
||||
return {
|
||||
filetypes = { "typescript", "typescriptreact" },
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ require("ts").setup({
|
||||
lang = "gotmpl",
|
||||
},
|
||||
"https://github.com/tree-sitter/tree-sitter-html",
|
||||
"https://github.com/tree-sitter/tree-sitter-javascript",
|
||||
"https://github.com/tree-sitter/tree-sitter-json",
|
||||
"https://github.com/tree-sitter-grammars/tree-sitter-luadoc",
|
||||
{
|
||||
|
||||
@@ -93,6 +93,10 @@
|
||||
"rev": "73a3947324f6efddf9e17c0ea58d454843590cc0",
|
||||
"src": "https://github.com/tree-sitter/tree-sitter-html"
|
||||
},
|
||||
"tree-sitter-javascript": {
|
||||
"rev": "58404d8cf191d69f2674a8fd507bd5776f46cb11",
|
||||
"src": "https://github.com/tree-sitter/tree-sitter-javascript"
|
||||
},
|
||||
"tree-sitter-json": {
|
||||
"rev": "001c28d7a29832b06b0e831ec77845553c89b56d",
|
||||
"src": "https://github.com/tree-sitter/tree-sitter-json"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
; inherits: ecma,jsx
|
||||
@@ -0,0 +1,56 @@
|
||||
; inherits: ecma,jsx
|
||||
|
||||
; Parameters
|
||||
(formal_parameters
|
||||
(identifier) @variable.parameter)
|
||||
|
||||
(formal_parameters
|
||||
(rest_pattern
|
||||
(identifier) @variable.parameter))
|
||||
|
||||
; ({ a }) => null
|
||||
(formal_parameters
|
||||
(object_pattern
|
||||
(shorthand_property_identifier_pattern) @variable.parameter))
|
||||
|
||||
; ({ a = b }) => null
|
||||
(formal_parameters
|
||||
(object_pattern
|
||||
(object_assignment_pattern
|
||||
(shorthand_property_identifier_pattern) @variable.parameter)))
|
||||
|
||||
; ({ a: b }) => null
|
||||
(formal_parameters
|
||||
(object_pattern
|
||||
(pair_pattern
|
||||
value: (identifier) @variable.parameter)))
|
||||
|
||||
; ([ a ]) => null
|
||||
(formal_parameters
|
||||
(array_pattern
|
||||
(identifier) @variable.parameter))
|
||||
|
||||
; ({ a } = { a }) => null
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
(object_pattern
|
||||
(shorthand_property_identifier_pattern) @variable.parameter)))
|
||||
|
||||
; ({ a = b } = { a }) => null
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
(object_pattern
|
||||
(object_assignment_pattern
|
||||
(shorthand_property_identifier_pattern) @variable.parameter))))
|
||||
|
||||
; a => null
|
||||
(arrow_function
|
||||
parameter: (identifier) @variable.parameter)
|
||||
|
||||
; optional parameters
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
left: (identifier) @variable.parameter))
|
||||
|
||||
; punctuation
|
||||
(optional_chain) @punctuation.delimiter
|
||||
@@ -0,0 +1 @@
|
||||
; inherits: ecma,jsx
|
||||
Reference in New Issue
Block a user