Author: Nibaldo González (nibgonz@gmail.com)
Last Change: April 2020
Requirements: KDE Frameworks 5.53.0 or higher
Last versions: Included in KDE Frameworks 5.70.0+.
This file is part of the KDE's KSyntaxHighlighting Framework.
Add syntax highlighting to KDE text editors (as Kate, KWrite, KDevelop or any application that uses the KSyntaxHighlighting or KTextEditor Framework) for TypeScript, TypeScript React (TSX) & JavaScript React (JSX).
These files are an extension of the JavaScript highlighter (javascript.xml
, Version 14).
NOTE:
- The TypeScript and TypeScript React highlighters require KDE Frameworks 5.53.0 to work.
typescript-react.xml
depends ontypescript.xml
,typescript.xml
andjavascript-react.xml
depend on the JavaScript highlighter.
The syntax highlighting definition files, of the KSyntaxHighlighting Framework, consist of XML files that are compiled in the KDE Frameworks libraries.
However, these XML files can also be stored in:
For local user | $HOME/.local/share/org.kde.syntax-highlighting/syntax/ |
For all users | /usr/share/org.kde.syntax-highlighting/syntax/ |
For Kate's Flatpak package | $HOME/.var/app/org.kde.kate/data/org.kde.syntax-highlighting/syntax/ |
For Kate's Snap package | $HOME/snap/kate/current/.local/share/org.kde.syntax-highlighting/syntax/ |
On Windows | %USERPROFILE%\AppData\Local\org.kde.syntax-highlighting\syntax\ |
For more details of KSyntaxHighlighting Framework, visit:
- Official Repository: https://invent.kde.org/frameworks/syntax-highlighting
- Documentation: https://docs.kde.org/trunk5/en/applications/katepart/highlight.html
If you do not have the latest version of KDE Frameworks, you can manually install the latest XML files.
IMPORTANT: Also install the latest version of javascript.xml
;
a copy of this file is included in this repository.
The file typescript-react.xml
requires the latest version of typescript.xml
.
Copy the *.xml
files to the directory of the XML syntax definition files,
mentioned in the previous section.
Ex.: For local user:
mkdir -p $HOME/.local/share/org.kde.syntax-highlighting/syntax/
cp ./{typescript,typescript-react,javascript-react,javascript}.xml $HOME/.local/share/org.kde.syntax-highlighting/syntax/
For all users:
sudo mkdir -p /usr/share/org.kde.syntax-highlighting/syntax/
sudo cp ./{typescript,typescript-react,javascript-react,javascript}.xml /usr/share/org.kde.syntax-highlighting/syntax/
typescript.xml Version |
Date | KDE Frameworks | Relevant Changes |
---|---|---|---|
10 | Apr. 13, 2020 | 5.70.0 | Add the "awaited" type operator. |
9 | Feb. 23, 2020 | 5.68.0 |
|
8 | Dec. 12, 2019 | 5.66.0 | Add "bigint" primitive type. |
7 | Nov. 20, 2019 | 5.65.0 | Move keywords of built-in object to "javascript.xml". |
6 | Oct. 01, 2019 | 5.64.0 |
|
5 | Aug. 30, 2019 | 5.62.0 | Fix incorrect highlighting of the "?" operator, in the previous update. |
4 | Jul. 16, 2019 | 5.61.0 | Fixed highlighting of keywords before ":" in conditional expressions. |
3 | Feb. 18, 2019 | 5.56.0 | Add support to bigint, add the "is" keyword and multiple fixes and improvements. |
2 | Dec. 29, 2018 | 5.54.0 | Fix float-points and improve types detection. |
1 | Nov. 18, 2018 | 5.53.0 |
javascript-react.xml Version |
typescript-react.xml Version |
Date | KDE Frameworks | Relevant Changes |
---|---|---|---|---|
- | 9 | Feb. 23, 2020 | 5.68.0 | Adapt to the TypeScript highlighter. |
8 | 8 | Nov. 21, 2019 | 5.65.0 | Tag detection is more stricter. |
7 | 7 | Nov. 19, 2019 | 5.65.0 | Rename definitions to "TypeScript React (TSX)" and "JavaScript React (JSX)". |
6 | 6 | Oct. 01, 2019 | 5.64.0 | TSX: Highlight "<T extends" as a type assertion, not as a Tag. |
- | 5 | Aug. 30, 2019 | 5.62.0 | Adapt to the TypeScript highlighter. |
- | 4 | Jul. 16, 2019 | 5.61.0 | Adapt to the TypeScript highlighter. |
5 | 3 | Feb. 20, 2019 | 5.56.0 |
|
4 | 2 | Dec. 30, 2018 | 5.54.0 |
|
3 | 1 | Nov. 18, 2018 | 5.53.0 |