typescript-ts-mode.el: Minor touches
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode--indent-compatibility-b893426) (tsx-ts-mode--font-lock-compatibility-bb1f97b): Catch specific error. (typescript-ts-base-mode): Improve docstring (bug#65470).
This commit is contained in:
parent
67c8271076
commit
bcf287bd11
1 changed files with 6 additions and 3 deletions
|
@ -87,7 +87,7 @@ Check if a node type is available, then return the right indent rules."
|
|||
(progn (treesit-query-capture 'tsx '((jsx_fragment) @capture))
|
||||
`(((match "<" "jsx_fragment") parent 0)
|
||||
((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset)))
|
||||
(error
|
||||
(treesit-query-error
|
||||
`(((match "<" "jsx_text") parent 0)
|
||||
((parent-is "jsx_text") parent typescript-ts-mode-indent-offset)))))
|
||||
|
||||
|
@ -178,7 +178,8 @@ Argument LANGUAGE is either `typescript' or `tsx'."
|
|||
(jsx_self_closing_element
|
||||
[(member_expression (identifier)) (identifier)]
|
||||
@typescript-ts-jsx-tag-face)))
|
||||
(error '((jsx_opening_element
|
||||
(treesit-query-error
|
||||
'((jsx_opening_element
|
||||
[(nested_identifier (identifier)) (identifier)]
|
||||
@typescript-ts-jsx-tag-face)
|
||||
|
||||
|
@ -370,7 +371,9 @@ Argument LANGUAGE is either `typescript' or `tsx'."
|
|||
|
||||
;;;###autoload
|
||||
(define-derived-mode typescript-ts-base-mode prog-mode "TypeScript"
|
||||
"Major mode for editing TypeScript."
|
||||
"Generic major mode for editing TypeScript.
|
||||
|
||||
This mode is intended to be inherited by concrete major modes."
|
||||
:group 'typescript
|
||||
:syntax-table typescript-ts-mode--syntax-table
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue