forked from qt-creator/qt-creator
Highlighting: update KSyntaxHighlighting to v5.80.0
Task-number: QTCREATORBUG-22558 Change-Id: I57d782397f88842edbd08b1008b2d88706c6ab52 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -11,3 +11,4 @@ heaptrack.*
|
|||||||
*.unc-backup*
|
*.unc-backup*
|
||||||
.clang-format
|
.clang-format
|
||||||
.cmake/
|
.cmake/
|
||||||
|
*.code-workspace
|
64
src/libs/3rdparty/syntax-highlighting/README.md
vendored
64
src/libs/3rdparty/syntax-highlighting/README.md
vendored
@@ -6,12 +6,15 @@ Syntax highlighting engine for Kate syntax definitions
|
|||||||
|
|
||||||
1. [Introduction](#introduction)
|
1. [Introduction](#introduction)
|
||||||
2. [Out of scope](#out-of-scope)
|
2. [Out of scope](#out-of-scope)
|
||||||
3. [Syntax Definition Files](#syntax-definition-files)
|
3. [Syntax definition files](#syntax-definition-files)
|
||||||
4. [Build it](#build-it)
|
4. [Color theme files](#color-theme-files)
|
||||||
5. [How to contribute](#how-to-contribute)
|
5. [Build it](#build-it)
|
||||||
6. [Adding unit tests for a syntax definition](#adding-unit-tests-for-a-syntax-definition)
|
6. [How to contribute](#how-to-contribute)
|
||||||
|
* [Licensing](#licensing)
|
||||||
|
* [Tips for contributing to syntax definition files](#tips-for-contributing-to-syntax-definition-files)
|
||||||
|
* [Adding unit tests for a syntax definition](#adding-unit-tests-for-a-syntax-definition)
|
||||||
7. [Report bug or help to fix them](#report-bug-or-help-to-fix-them)
|
7. [Report bug or help to fix them](#report-bug-or-help-to-fix-them)
|
||||||
8. [Updating the kate-editor.org/syntax website](#updating-the-kate-editororgsyntax-website)
|
8. [Updating the syntax & themes pages of the kate-editor.org website](#updating-the-kate-editororgsyntax-website)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
@@ -33,7 +36,7 @@ out of scope:
|
|||||||
|
|
||||||
If you need any of this, check out [KTextEditor](https://api.kde.org/frameworks/ktexteditor/html/).
|
If you need any of this, check out [KTextEditor](https://api.kde.org/frameworks/ktexteditor/html/).
|
||||||
|
|
||||||
## Syntax Definition Files
|
## Syntax definition files
|
||||||
|
|
||||||
This library uses Kate syntax definition files for the actual highlighting,
|
This library uses Kate syntax definition files for the actual highlighting,
|
||||||
the file format is documented [here](https://docs.kde.org/?application=katepart&branch=trunk5&path=highlight.html).
|
the file format is documented [here](https://docs.kde.org/?application=katepart&branch=trunk5&path=highlight.html).
|
||||||
@@ -62,7 +65,7 @@ Usually it is:
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>On Windows®</td>
|
<td>On Windows®</td>
|
||||||
<td>%USERPROFILE%\AppData\Local\org.kde.syntax-highlighting\syntax\ </td>
|
<td>%USERPROFILE%\AppData\Local\org.kde.syntax-highlighting\syntax\</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -71,6 +74,30 @@ For more details, see ["The Highlight Definition XML Format" (Working with Synta
|
|||||||
Also, in **data/schema/** there is a script to validate the syntax definiton XML
|
Also, in **data/schema/** there is a script to validate the syntax definiton XML
|
||||||
files. Use the command `validatehl.sh mySyntax.xml`.
|
files. Use the command `validatehl.sh mySyntax.xml`.
|
||||||
|
|
||||||
|
## Color theme files
|
||||||
|
|
||||||
|
This library includes the color themes, the theme files use the **JSON**
|
||||||
|
format and are located in **data/themes/** with the **.theme** extension.
|
||||||
|
|
||||||
|
Additional ones are also picked up from the file system if present,
|
||||||
|
in the **org.kde.syntax-highlighting/themes/** folder of your user directory,
|
||||||
|
allowing you to easily add custom color theme files.
|
||||||
|
The location of **org.kde.syntax-highlighting/themes/** is the same
|
||||||
|
as shown in the table of the [previous section](#syntax-definition-files),
|
||||||
|
replacing the **syntax** folder with **themes**.
|
||||||
|
|
||||||
|
The [KTextEditor](https://api.kde.org/frameworks/ktexteditor/html/) library
|
||||||
|
(used by Kate, Kile and KDevelop, for example) provides
|
||||||
|
a user interface for editing and creating KSyntaxHighlighting color themes, including
|
||||||
|
a tool for exporting and importing the JSON theme files.
|
||||||
|
The tool **utils/schema-converter/** and the script **utils/kateschema_to_theme_converter.py**
|
||||||
|
convert the old Kate schemas to KSyntaxHighlighting themes.
|
||||||
|
|
||||||
|
For more information, see:
|
||||||
|
|
||||||
|
* [Kate - Color Themes with Frameworks 5.75 (Kate Editor Website)](https://kate-editor.org/post/2020/2020-09-13-kate-color-themes-5.75/)
|
||||||
|
* [Submit a KSyntaxHighlighting Color Theme (Kate Editor Website)](https://kate-editor.org/post/2020/2020-09-18-submit-a-ksyntaxhighlighting-color-theme/)
|
||||||
|
|
||||||
## Build it
|
## Build it
|
||||||
|
|
||||||
1. Create and change into a build directory. Usually, a folder called **build**
|
1. Create and change into a build directory. Usually, a folder called **build**
|
||||||
@@ -88,6 +115,16 @@ files. Use the command `validatehl.sh mySyntax.xml`.
|
|||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone git@invent.kde.org:frameworks/syntax-highlighting.git
|
||||||
|
mkdir ./syntax-highlighting/build
|
||||||
|
cd ./syntax-highlighting/build
|
||||||
|
cmake ../
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
For more details see ["Building Kate from Sources on Linux" (Kate Editor Website)](https://kate-editor.org/build-it/).
|
For more details see ["Building Kate from Sources on Linux" (Kate Editor Website)](https://kate-editor.org/build-it/).
|
||||||
|
|
||||||
**NOTE:** If running *cmake* shows an error related to your version of KDE
|
**NOTE:** If running *cmake* shows an error related to your version of KDE
|
||||||
@@ -126,7 +163,7 @@ All files shall contain a proper "SPDX-License-Identifier: MIT" identifier insid
|
|||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
### What you should know before working with syntax definition files and sending a patch
|
### Tips for contributing to syntax definition files
|
||||||
|
|
||||||
* If you are modifying an existing syntax definition XML file, you must increase
|
* If you are modifying an existing syntax definition XML file, you must increase
|
||||||
the version number of the language.
|
the version number of the language.
|
||||||
@@ -139,15 +176,15 @@ All files shall contain a proper "SPDX-License-Identifier: MIT" identifier insid
|
|||||||
* [Available Default Styles (Working with Syntax Highlighting, KDE Documentation)](https://docs.kde.org/?application=katepart&branch=trunk5&path=highlight.html#kate-highlight-default-styles)
|
* [Available Default Styles (Working with Syntax Highlighting, KDE Documentation)](https://docs.kde.org/?application=katepart&branch=trunk5&path=highlight.html#kate-highlight-default-styles)
|
||||||
* [Kate Part (KF5): New Default Styles for better Color Schemes (Kate Editor Website)](https://kate-editor.org/2014/03/07/kate-part-kf5-new-default-styles-for-better-color-schemes/)
|
* [Kate Part (KF5): New Default Styles for better Color Schemes (Kate Editor Website)](https://kate-editor.org/2014/03/07/kate-part-kf5-new-default-styles-for-better-color-schemes/)
|
||||||
|
|
||||||
* Important: add test files, these are found in **autotests/input/**.
|
* Add test files, these are found in **autotests/input/**.
|
||||||
If you are going to add a new syntax XML file, create a new test file; if you
|
If you are going to add a new syntax XML file, create a new test file; if you
|
||||||
are going to modify a XML file, adds examples to existing test files.
|
are going to modify a XML file, adds examples to existing test files.
|
||||||
|
|
||||||
Then, it is necessary to generate and update the files in **autotests/folding/**,
|
Then, it is necessary to generate and update the files in **autotests/folding/**,
|
||||||
**autotests/html/** and **autotests/reference/**, which must be included in the
|
**autotests/html/** and **autotests/reference/**, which must be included in the
|
||||||
patches. The instructions are in the [next section](#adding-unit-tests-for-a-syntax-definition).
|
patches. Instructions are [below](#adding-unit-tests-for-a-syntax-definition).
|
||||||
|
|
||||||
## Adding unit tests for a syntax definition
|
### Adding unit tests for a syntax definition
|
||||||
|
|
||||||
1. Add an input file into the **autotests/input/** folder, lets call it
|
1. Add an input file into the **autotests/input/** folder, lets call it
|
||||||
**test.<language-extension>**.
|
**test.<language-extension>**.
|
||||||
@@ -184,9 +221,10 @@ However, some users often report bugs related to syntax highlighting in
|
|||||||
[kate/syntax](https://bugs.kde.org/buglist.cgi?component=syntax&product=kate&resolution=---)
|
[kate/syntax](https://bugs.kde.org/buglist.cgi?component=syntax&product=kate&resolution=---)
|
||||||
and [kile/editor](https://bugs.kde.org/buglist.cgi?component=editor&product=kile&resolution=---).
|
and [kile/editor](https://bugs.kde.org/buglist.cgi?component=editor&product=kile&resolution=---).
|
||||||
|
|
||||||
## Updating the kate-editor.org/syntax website
|
## Updating the syntax & themes pages of the kate-editor.org website
|
||||||
|
|
||||||
To update the [kate-editor.org/syntax](https://kate-editor.org/syntax/) website
|
To update the [kate-editor.org/syntax](https://kate-editor.org/syntax/) and
|
||||||
|
[kate-editor.org/themes](https://kate-editor.org/themes/) websites
|
||||||
including the update site & all linked examples/files,
|
including the update site & all linked examples/files,
|
||||||
please run after successful **build** & **test** the following make target:
|
please run after successful **build** & **test** the following make target:
|
||||||
|
|
||||||
|
@@ -3,10 +3,10 @@
|
|||||||
#ifndef SyntaxHighlighting_VERSION_H
|
#ifndef SyntaxHighlighting_VERSION_H
|
||||||
#define SyntaxHighlighting_VERSION_H
|
#define SyntaxHighlighting_VERSION_H
|
||||||
|
|
||||||
#define SyntaxHighlighting_VERSION_STRING "5.75.0"
|
#define SyntaxHighlighting_VERSION_STRING "5.80.0"
|
||||||
#define SyntaxHighlighting_VERSION_MAJOR 5
|
#define SyntaxHighlighting_VERSION_MAJOR 5
|
||||||
#define SyntaxHighlighting_VERSION_MINOR 75
|
#define SyntaxHighlighting_VERSION_MINOR 80
|
||||||
#define SyntaxHighlighting_VERSION_PATCH 0
|
#define SyntaxHighlighting_VERSION_PATCH 0
|
||||||
#define SyntaxHighlighting_VERSION ((5<<16)|(75<<8)|(0))
|
#define SyntaxHighlighting_VERSION ((5<<16)|(80<<8)|(0))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,9 +1,27 @@
|
|||||||
|
# create a directory for generated definitions
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/generated/syntax)
|
||||||
|
|
||||||
|
macro(generate_syntax_definition generator targetFile srcFile)
|
||||||
|
add_custom_target(
|
||||||
|
${targetFile} ALL
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/${targetFile}
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/${targetFile}
|
||||||
|
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generators/${generator}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/syntax/${srcFile}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/${targetFile}
|
||||||
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/generators/${generator}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/syntax/${srcFile}
|
||||||
|
${ARGN}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
set(gen_defs ${gen_defs} ${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/${targetFile})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
# generate PHP definitions
|
# generate PHP definitions
|
||||||
macro(generate_php_syntax_definition targetFile srcFile)
|
macro(generate_php_syntax_definition targetFile srcFile)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/generated/syntax)
|
generate_syntax_definition(generate-php.pl ${targetFile} ${srcFile} ${CMAKE_CURRENT_SOURCE_DIR}/syntax/php.xml)
|
||||||
execute_process(COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generators/generate-php.pl
|
|
||||||
INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/syntax/${srcFile}
|
|
||||||
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/${targetFile})
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
generate_php_syntax_definition(javascript-php.xml javascript.xml)
|
generate_php_syntax_definition(javascript-php.xml javascript.xml)
|
||||||
@@ -13,17 +31,12 @@ generate_php_syntax_definition(javascript-react-php.xml javascript-react.xml)
|
|||||||
generate_php_syntax_definition(typescript-php.xml typescript.xml)
|
generate_php_syntax_definition(typescript-php.xml typescript.xml)
|
||||||
generate_php_syntax_definition(mustache-php.xml mustache.xml)
|
generate_php_syntax_definition(mustache-php.xml mustache.xml)
|
||||||
|
|
||||||
|
# generate DoxygenLua definition
|
||||||
|
generate_syntax_definition(generate-doxygenlua.pl doxygenlua.xml doxygen.xml)
|
||||||
|
|
||||||
# find all definitions
|
# find all definitions
|
||||||
file(GLOB src_defs "${CMAKE_CURRENT_SOURCE_DIR}/syntax/*.xml")
|
file(GLOB src_defs "${CMAKE_CURRENT_SOURCE_DIR}/syntax/*.xml")
|
||||||
set(defs
|
set(defs ${src_defs} ${gen_defs})
|
||||||
${src_defs}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/html-php.xml
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/css-php.xml
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/javascript-php.xml
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/javascript-react-php.xml
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/typescript-php.xml
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/syntax/mustache-php.xml
|
|
||||||
)
|
|
||||||
|
|
||||||
# theme data resource
|
# theme data resource
|
||||||
qt5_add_resources(themes_QRC ${CMAKE_CURRENT_SOURCE_DIR}/themes/theme-data.qrc)
|
qt5_add_resources(themes_QRC ${CMAKE_CURRENT_SOURCE_DIR}/themes/theme-data.qrc)
|
||||||
@@ -43,7 +56,7 @@ if (QRC_SYNTAX)
|
|||||||
# generate the index file
|
# generate the index file
|
||||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax"
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax"
|
||||||
COMMAND katehighlightingindexer "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax" "${CMAKE_CURRENT_SOURCE_DIR}/schema/language.xsd" "${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc"
|
COMMAND katehighlightingindexer "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax" "${CMAKE_CURRENT_SOURCE_DIR}/schema/language.xsd" "${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc"
|
||||||
DEPENDS ${defs} ${CMAKE_CURRENT_SOURCE_DIR}/schema/language.xsd ${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc
|
DEPENDS katehighlightingindexer ${defs} ${CMAKE_CURRENT_SOURCE_DIR}/schema/language.xsd ${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
# generate the qrc file manually, to make dependencies on generated files work...
|
# generate the qrc file manually, to make dependencies on generated files work...
|
||||||
@@ -57,7 +70,7 @@ if (QRC_SYNTAX)
|
|||||||
add_library(SyntaxHighlightingData OBJECT ${themes_QRC} ${CMAKE_CURRENT_BINARY_DIR}/qrc_syntax-data.cpp)
|
add_library(SyntaxHighlightingData OBJECT ${themes_QRC} ${CMAKE_CURRENT_BINARY_DIR}/qrc_syntax-data.cpp)
|
||||||
else()
|
else()
|
||||||
# install the syntax files as normal files into the prefix
|
# install the syntax files as normal files into the prefix
|
||||||
install (FILES ${defs} DESTINATION share/org.kde.syntax-highlighting/syntax)
|
install (FILES ${defs} DESTINATION ${KDE_INSTALL_DATADIR}/org.kde.syntax-highlighting/syntax)
|
||||||
|
|
||||||
# object library to make cross-folder dependencies work, only themes
|
# object library to make cross-folder dependencies work, only themes
|
||||||
add_library(SyntaxHighlightingData OBJECT ${themes_QRC})
|
add_library(SyntaxHighlightingData OBJECT ${themes_QRC})
|
||||||
|
@@ -14,9 +14,15 @@
|
|||||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT *****
|
||||||
|
cd data/generators
|
||||||
|
# increase version of cmake.xml.tpl then
|
||||||
|
./generate-cmake-syntax.py cmake.yaml > ../syntax/cmake.xml
|
||||||
|
-->
|
||||||
|
|
||||||
<language
|
<language
|
||||||
name="CMake"
|
name="CMake"
|
||||||
version="25"
|
version="31"
|
||||||
kateversion="5.0"
|
kateversion="5.0"
|
||||||
section="Other"
|
section="Other"
|
||||||
extensions="CMakeLists.txt;*.cmake;*.cmake.in"
|
extensions="CMakeLists.txt;*.cmake;*.cmake.in"
|
||||||
@@ -28,66 +34,66 @@
|
|||||||
<highlighting>
|
<highlighting>
|
||||||
|
|
||||||
<list name="commands">
|
<list name="commands">
|
||||||
{%- for command in commands %}
|
<!--[- for command in commands ]-->
|
||||||
<item>{{command.name}}</item>
|
<item><!--{command.name}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
{% for command in commands -%}
|
<!--[ for command in commands -]-->
|
||||||
{%- if command.named_args and command.named_args.kw %}
|
<!--[- if command.named_args and command.named_args.kw ]-->
|
||||||
<list name="{{command.name}}_nargs">
|
<list name="<!--{command.name}-->_nargs">
|
||||||
{%- for arg in command.named_args.kw %}
|
<!--[- for arg in command.named_args.kw ]-->
|
||||||
<item>{{arg}}</item>
|
<item><!--{arg}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- if command.special_args and command.special_args.kw %}
|
<!--[- if command.special_args and command.special_args.kw ]-->
|
||||||
<list name="{{command.name}}_sargs">
|
<list name="<!--{command.name}-->_sargs">
|
||||||
{%- for arg in command.special_args.kw %}
|
<!--[- for arg in command.special_args.kw ]-->
|
||||||
<item>{{arg}}</item>
|
<item><!--{arg}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
|
|
||||||
<list name="variables">
|
<list name="variables">
|
||||||
{%- for var in variables.kw %}
|
<!--[- for var in variables.kw ]-->
|
||||||
<item>{{var}}</item>
|
<item><!--{var}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
<list name="deprecated-or-internal-variables">
|
<list name="deprecated-or-internal-variables">
|
||||||
{%- for var in deprecated_or_internal_variables.kw %}
|
<!--[- for var in deprecated_or_internal_variables.kw ]-->
|
||||||
<item>{{var}}</item>
|
<item><!--{var}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
<list name="environment-variables">
|
<list name="environment-variables">
|
||||||
{%- for var in environment_variables.kw %}
|
<!--[- for var in environment_variables.kw ]-->
|
||||||
<item>{{var}}</item>
|
<item><!--{var}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
{%- for kind in properties.kinds %}
|
<!--[- for kind in properties.kinds ]-->
|
||||||
<list name="{{ kind|replace('_', '-') }}">
|
<list name="<!--{ kind|replace('_', '-') }-->">
|
||||||
{%- for prop in properties[kind].kw %}
|
<!--[- for prop in properties[kind].kw ]-->
|
||||||
<item>{{prop}}</item>
|
<item><!--{prop}--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
|
|
||||||
<list name="generator-expressions">
|
<list name="generator-expressions">
|
||||||
{%- for expr in generator_expressions %}
|
<!--[- for expr in generator_expressions ]-->
|
||||||
<item>{{ expr }}</item>
|
<item><!--{ expr }--></item>
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
<contexts>
|
<contexts>
|
||||||
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text">
|
||||||
<DetectSpaces/>
|
<DetectSpaces/>
|
||||||
{% for command in commands -%}
|
<!--[ for command in commands -]-->
|
||||||
<WordDetect String="{{command.name}}" insensitive="true" attribute="Command" context="{{command.name}}_ctx"{% if command.start_region %} beginRegion="{{command.start_region}}"{% endif -%} {%- if command.end_region %} endRegion="{{command.end_region}}"{% endif %} />
|
<WordDetect String="<!--{command.name}-->" insensitive="true" attribute="Command" context="<!--{command.name}-->_ctx"<!--[ if command.start_region ]--> beginRegion="<!--{command.start_region}-->"<!--[ endif -]--> <!--[- if command.end_region ]--> endRegion="<!--{command.end_region}-->"<!--[ endif ]--> />
|
||||||
{% endfor -%}
|
<!--[ endfor -]-->
|
||||||
<DetectChar attribute="Comment" context="Match Comments and Docs" char="#" lookAhead="true" />
|
<DetectChar attribute="Comment" context="Match Comments and Docs" char="#" lookAhead="true" />
|
||||||
<DetectIdentifier attribute="User Function/Macro" context="User Function" />
|
<DetectIdentifier attribute="User Function/Macro" context="User Function" />
|
||||||
<RegExpr attribute="@Variable Substitution" context="@VarSubst" String="@&id_re;@" lookAhead="true" />
|
<RegExpr attribute="@Variable Substitution" context="@VarSubst" String="@&id_re;@" lookAhead="true" />
|
||||||
@@ -95,71 +101,64 @@
|
|||||||
<keyword attribute="Command" context="#stay" String="commands" />
|
<keyword attribute="Command" context="#stay" String="commands" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
{% for command in commands -%}
|
<!--[ for command in commands -]-->
|
||||||
{#
|
<context attribute="Normal Text" lineEndContext="#stay" name="<!--{command.name}-->_ctx">
|
||||||
<!--
|
<DetectChar attribute="Normal Text" context="<!--{command.name}-->_ctx_op" char="(" />
|
||||||
{{ command|pprint }}
|
|
||||||
-->
|
|
||||||
-#}
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="{{command.name}}_ctx">
|
|
||||||
<DetectChar attribute="Normal Text" context="{{command.name}}_ctx_op" char="(" />
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="{{command.name}}_ctx_op">
|
<context attribute="Normal Text" lineEndContext="#stay" name="<!--{command.name}-->_ctx_op">
|
||||||
{%- if command.nested_parentheses %}
|
<!--[- if command.nested_parentheses ]-->
|
||||||
<DetectChar attribute="Normal Text" context="{{command.name}}_ctx_op_nested" char="(" />
|
<DetectChar attribute="Normal Text" context="<!--{command.name}-->_ctx_op_nested" char="(" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
<IncludeRules context="EndCmdPop2" />
|
<IncludeRules context="EndCmdPop2" />
|
||||||
{%- if command.named_args and command.named_args.kw %}
|
<!--[- if command.named_args and command.named_args.kw ]-->
|
||||||
<keyword attribute="Named Args" context="#stay" String="{{command.name}}_nargs" />
|
<keyword attribute="Named Args" context="#stay" String="<!--{command.name}-->_nargs" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- if command.special_args and command.special_args.kw %}
|
<!--[- if command.special_args and command.special_args.kw ]-->
|
||||||
<keyword attribute="Special Args" context="#stay" String="{{command.name}}_sargs" />
|
<keyword attribute="Special Args" context="#stay" String="<!--{command.name}-->_sargs" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- if command.property_args and command.property_args.kw %}
|
<!--[- if command.property_args and command.property_args.kw ]-->
|
||||||
{%- for kind in command.property_args.kw %}
|
<!--[- for kind in command.property_args.kw ]-->
|
||||||
<keyword attribute="Property" context="#stay" String="{{kind}}" />
|
<keyword attribute="Property" context="#stay" String="<!--{kind}-->" />
|
||||||
{%- if properties[kind|replace('-', '_')].re %}
|
<!--[- if properties[kind|replace('-', '_')].re ]-->
|
||||||
<IncludeRules context="Detect More {{kind}}" />
|
<IncludeRules context="Detect More <!--{kind}-->" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- if command is not nulary %}
|
<!--[- if command is not nulary ]-->
|
||||||
<IncludeRules context="User Function Args" />
|
<IncludeRules context="User Function Args" />
|
||||||
{%- if command.name == 'cmake_policy' %}
|
<!--[- if command.name == 'cmake_policy' ]-->
|
||||||
<!-- NOTE Handle CMP<NNN> as a special arg of `cmake_policy` command -->
|
<!-- NOTE Handle CMP<NNN> as a special arg of `cmake_policy` command -->
|
||||||
<RegExpr attribute="Special Args" context="#stay" String="\bCMP[0-9]+\b" />
|
<RegExpr attribute="Special Args" context="#stay" String="\bCMP[0-9]+\b" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
</context>
|
</context>
|
||||||
{%- if command.nested_parentheses %}
|
<!--[- if command.nested_parentheses ]-->
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="{{command.name}}_ctx_op_nested">
|
<context attribute="Normal Text" lineEndContext="#stay" name="<!--{command.name}-->_ctx_op_nested">
|
||||||
<IncludeRules context="EndCmdPop" />
|
<IncludeRules context="EndCmdPop" />
|
||||||
{%- if command.named_args and command.named_args.kw %}
|
<!--[- if command.named_args and command.named_args.kw ]-->
|
||||||
<keyword attribute="Named Args" context="#stay" String="{{command.name}}_nargs" />
|
<keyword attribute="Named Args" context="#stay" String="<!--{command.name}-->_nargs" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- if command.special_args and command.special_args.kw %}
|
<!--[- if command.special_args and command.special_args.kw ]-->
|
||||||
<keyword attribute="Special Args" context="#stay" String="{{command.name}}_sargs" />
|
<keyword attribute="Special Args" context="#stay" String="<!--{command.name}-->_sargs" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- if command.property_args and command.property_args.kw %}
|
<!--[- if command.property_args and command.property_args.kw ]-->
|
||||||
{%- for kind in command.property_args.kw %}
|
<!--[- for kind in command.property_args.kw ]-->
|
||||||
<keyword attribute="Property" context="#stay" String="{{kind}}" />
|
<keyword attribute="Property" context="#stay" String="<!--{kind}-->" />
|
||||||
{%- if properties[kind|replace('-', '_')].re %}
|
<!--[- if properties[kind|replace('-', '_')].re ]-->
|
||||||
<IncludeRules context="Detect More {{kind}}" />
|
<IncludeRules context="Detect More <!--{kind}-->" />
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{%- endfor %}
|
<!--[- endfor ]-->
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
<IncludeRules context="User Function Args" />
|
<IncludeRules context="User Function Args" />
|
||||||
</context>
|
</context>
|
||||||
{%- endif %}
|
<!--[- endif ]-->
|
||||||
{% endfor -%}
|
<!--[ endfor -]-->
|
||||||
|
|
||||||
{% for kind in properties.kinds if properties[kind].re -%}
|
<!--[ for kind in properties.kinds if properties[kind].re -]-->
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More {{ kind|replace('_', '-') }}">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More <!--{ kind|replace('_', '-') }-->">
|
||||||
{%- for prop in properties[kind].re %}
|
<RegExpr attribute="Property" context="#stay" String="<!--{properties[kind].re}-->" />
|
||||||
<RegExpr attribute="Property" context="#stay" String="{{prop}}" />
|
</context><!--{ '\n' }-->
|
||||||
{%- endfor %}
|
<!--[ endfor -]-->
|
||||||
</context>{{ '\n' }}
|
|
||||||
{% endfor -%}
|
|
||||||
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="EndCmdPop">
|
<context attribute="Normal Text" lineEndContext="#stay" name="EndCmdPop">
|
||||||
<DetectChar attribute="Normal Text" context="#pop" char=")" />
|
<DetectChar attribute="Normal Text" context="#pop" char=")" />
|
||||||
@@ -187,12 +186,12 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More Builtin Variables">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More Builtin Variables">
|
||||||
{%- for var in deprecated_or_internal_variables.re %}
|
<!--[- if deprecated_or_internal_variables.re ]-->
|
||||||
<RegExpr attribute="CMake Internal Variable" context="#stay" String="{{var}}" />
|
<RegExpr attribute="CMake Internal Variable" context="#stay" String="<!--{deprecated_or_internal_variables.re}-->" />
|
||||||
{%- endfor %}
|
<!--[- endif ]-->
|
||||||
{%- for var in variables.re %}
|
<!--[- if variables.re ]-->
|
||||||
<RegExpr attribute="Builtin Variable" context="#stay" String="{{var}}" />
|
<RegExpr attribute="Builtin Variable" context="#stay" String="<!--{variables.re}-->" />
|
||||||
{%- endfor %}
|
<!--[- endif ]-->
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Variable Substitutions">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Variable Substitutions">
|
||||||
@@ -204,9 +203,9 @@
|
|||||||
|
|
||||||
<context attribute="Environment Variable Substitution" lineEndContext="#pop" name="EnvVarSubst">
|
<context attribute="Environment Variable Substitution" lineEndContext="#pop" name="EnvVarSubst">
|
||||||
<keyword attribute="Standard Environment Variable" context="#stay" String="environment-variables" insensitive="false" />
|
<keyword attribute="Standard Environment Variable" context="#stay" String="environment-variables" insensitive="false" />
|
||||||
{%- for var in environment_variables.re %}
|
<!--[- if environment_variables.re ]-->
|
||||||
<RegExpr attribute="Standard Environment Variable" context="#stay" String="{{var}}" />
|
<RegExpr attribute="Standard Environment Variable" context="#stay" String="<!--{environment_variables.re}-->" />
|
||||||
{%- endfor %}
|
<!--[- endif ]-->
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<IncludeRules context="Detect Variable Substitutions" />
|
<IncludeRules context="Detect Variable Substitutions" />
|
||||||
<DetectChar attribute="Environment Variable Substitution" context="#pop" char="}" />
|
<DetectChar attribute="Environment Variable Substitution" context="#pop" char="}" />
|
||||||
@@ -248,10 +247,20 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Special Values">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Special Values">
|
||||||
<WordDetect attribute="True Special Arg" context="#stay" String="TRUE" />
|
<RegExpr attribute="Version Arg" context="#stay" String="\b[0-9]+(.[0-9]+)+\b" />
|
||||||
<WordDetect attribute="True Special Arg" context="#stay" String="ON" />
|
<!-- Source/cmStringAlgorithms.cxx: bool cmIsOff(cm::string_view val) -->
|
||||||
<WordDetect attribute="False Special Arg" context="#stay" String="FALSE" />
|
<WordDetect attribute="True Special Arg" context="#stay" String="TRUE" insensitive="true" />
|
||||||
<WordDetect attribute="False Special Arg" context="#stay" String="OFF" />
|
<WordDetect attribute="True Special Arg" context="#stay" String="ON" insensitive="true" />
|
||||||
|
<WordDetect attribute="True Special Arg" context="#stay" String="YES" insensitive="true" />
|
||||||
|
<WordDetect attribute="True Special Arg" context="#stay" String="Y" insensitive="true" />
|
||||||
|
<WordDetect attribute="True Special Arg" context="#stay" String="1" />
|
||||||
|
<!-- Source/cmStringAlgorithms.cxx: bool cmIsOff(cm::string_view val) -->
|
||||||
|
<WordDetect attribute="False Special Arg" context="#stay" String="FALSE" insensitive="true" />
|
||||||
|
<WordDetect attribute="False Special Arg" context="#stay" String="OFF" insensitive="true" />
|
||||||
|
<WordDetect attribute="False Special Arg" context="#stay" String="NO" insensitive="true" />
|
||||||
|
<WordDetect attribute="False Special Arg" context="#stay" String="N" insensitive="true" />
|
||||||
|
<WordDetect attribute="False Special Arg" context="#stay" String="IGNORE" insensitive="true" />
|
||||||
|
<WordDetect attribute="False Special Arg" context="#stay" String="0" />
|
||||||
<RegExpr attribute="False Special Arg" context="#stay" String="\b(?:&id_re;-)?NOTFOUND\b" />
|
<RegExpr attribute="False Special Arg" context="#stay" String="\b(?:&id_re;-)?NOTFOUND\b" />
|
||||||
<RegExpr attribute="Special Args" context="#stay" String="\bCMP[0-9][0-9][0-9]\b" />
|
<RegExpr attribute="Special Args" context="#stay" String="\bCMP[0-9][0-9][0-9]\b" />
|
||||||
</context>
|
</context>
|
||||||
@@ -273,8 +282,7 @@
|
|||||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||||
<LineContinue attribute="Comment" context="#pop" />
|
<LineContinue attribute="Comment" context="#pop" />
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context attribute="Comment" lineEndContext="#stay" name="RST Documentation" dynamic="true">
|
<context attribute="Comment" lineEndContext="#stay" name="RST Documentation" dynamic="true">
|
||||||
@@ -286,8 +294,7 @@
|
|||||||
<LineContinue attribute="Comment" context="#stay" />
|
<LineContinue attribute="Comment" context="#stay" />
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" endRegion="BracketedComment" />
|
<StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" endRegion="BracketedComment" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context attribute="Strings" lineEndContext="#stay" name="String">
|
<context attribute="Strings" lineEndContext="#stay" name="String">
|
||||||
@@ -331,6 +338,7 @@
|
|||||||
<itemData name="Special Args" defStyleNum="dsOthers" spellChecking="false" />
|
<itemData name="Special Args" defStyleNum="dsOthers" spellChecking="false" />
|
||||||
<itemData name="True Special Arg" defStyleNum="dsOthers" color="#30a030" selColor="#30a030" spellChecking="false" />
|
<itemData name="True Special Arg" defStyleNum="dsOthers" color="#30a030" selColor="#30a030" spellChecking="false" />
|
||||||
<itemData name="False Special Arg" defStyleNum="dsOthers" color="#e05050" selColor="#e05050" spellChecking="false" />
|
<itemData name="False Special Arg" defStyleNum="dsOthers" color="#e05050" selColor="#e05050" spellChecking="false" />
|
||||||
|
<itemData name="Version Arg" defStyleNum="dsDataType" spellChecking="false" />
|
||||||
<itemData name="Strings" defStyleNum="dsString" spellChecking="true" />
|
<itemData name="Strings" defStyleNum="dsString" spellChecking="true" />
|
||||||
<itemData name="Escapes" defStyleNum="dsSpecialChar" spellChecking="false" />
|
<itemData name="Escapes" defStyleNum="dsSpecialChar" spellChecking="false" />
|
||||||
<itemData name="Builtin Variable" defStyleNum="dsDecVal" color="#c09050" selColor="#c09050" spellChecking="false" />
|
<itemData name="Builtin Variable" defStyleNum="dsDecVal" color="#c09050" selColor="#c09050" spellChecking="false" />
|
||||||
@@ -354,7 +362,7 @@
|
|||||||
<comment name="singleLine" start="#" position="afterwhitespace" />
|
<comment name="singleLine" start="#" position="afterwhitespace" />
|
||||||
<comment name="multiLine" start="#[[" end="]]" region="BracketedComment"/>
|
<comment name="multiLine" start="#[[" end="]]" region="BracketedComment"/>
|
||||||
</comments>
|
</comments>
|
||||||
<keywords casesensitive="1" />
|
<keywords casesensitive="1" weakDeliminator="." />
|
||||||
</general>
|
</general>
|
||||||
</language>
|
</language>
|
||||||
|
|
||||||
|
@@ -232,6 +232,9 @@ target-properties:
|
|||||||
- INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
|
- INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
|
||||||
- INTERPROCEDURAL_OPTIMIZATION
|
- INTERPROCEDURAL_OPTIMIZATION
|
||||||
- IOS_INSTALL_COMBINED
|
- IOS_INSTALL_COMBINED
|
||||||
|
- ISPC_HEADER_DIRECTORY # Since 3.19
|
||||||
|
- ISPC_HEADER_SUFFIX # Since 3.19.2
|
||||||
|
- ISPC_INSTRUCTION_SETS # Since 3.19
|
||||||
- JOB_POOL_COMPILE
|
- JOB_POOL_COMPILE
|
||||||
- JOB_POOL_LINK
|
- JOB_POOL_LINK
|
||||||
- LABELS
|
- LABELS
|
||||||
@@ -274,6 +277,14 @@ target-properties:
|
|||||||
- NAME
|
- NAME
|
||||||
- NO_SONAME
|
- NO_SONAME
|
||||||
- NO_SYSTEM_FROM_IMPORTED
|
- NO_SYSTEM_FROM_IMPORTED
|
||||||
|
- OBJC_EXTENSIONS # Since 3.16
|
||||||
|
- OBJC_STANDARD # Since 3.16
|
||||||
|
- OBJC_STANDARD_REQUIRED # Since 3.16
|
||||||
|
- OBJCXX_EXTENSIONS # Since 3.16
|
||||||
|
- OBJCXX_STANDARD # Since 3.16
|
||||||
|
- OBJCXX_STANDARD_REQUIRED # Since 3.16
|
||||||
|
- OPTIMIZE_DEPENDENCIES # Since 3.19
|
||||||
|
- OBJC_STANDARD
|
||||||
- OSX_ARCHITECTURES_<CONFIG>
|
- OSX_ARCHITECTURES_<CONFIG>
|
||||||
- OSX_ARCHITECTURES
|
- OSX_ARCHITECTURES
|
||||||
- OSX_CURRENT_VERSION # Since 3.17
|
- OSX_CURRENT_VERSION # Since 3.17
|
||||||
@@ -281,6 +292,7 @@ target-properties:
|
|||||||
- OUTPUT_NAME_<CONFIG>
|
- OUTPUT_NAME_<CONFIG>
|
||||||
- OUTPUT_NAME
|
- OUTPUT_NAME
|
||||||
- PCH_WARN_INVALID # Since 3.18
|
- PCH_WARN_INVALID # Since 3.18
|
||||||
|
- PCH_INSTANTIATE_TEMPLATES # Since 3.19
|
||||||
- PDB_NAME_<CONFIG>
|
- PDB_NAME_<CONFIG>
|
||||||
- PDB_NAME
|
- PDB_NAME
|
||||||
- PDB_OUTPUT_DIRECTORY_<CONFIG>
|
- PDB_OUTPUT_DIRECTORY_<CONFIG>
|
||||||
@@ -362,6 +374,7 @@ target-properties:
|
|||||||
- XCODE_ATTRIBUTE_<an-attribute>
|
- XCODE_ATTRIBUTE_<an-attribute>
|
||||||
- XCODE_EXPLICIT_FILE_TYPE
|
- XCODE_EXPLICIT_FILE_TYPE
|
||||||
- XCODE_GENERATE_SCHEME # Since 3.15
|
- XCODE_GENERATE_SCHEME # Since 3.15
|
||||||
|
- XCODE_LINK_BUILD_PHASE_MODE # Since 3.19
|
||||||
- XCODE_PRODUCT_TYPE
|
- XCODE_PRODUCT_TYPE
|
||||||
- XCODE_SCHEME_ADDRESS_SANITIZER # Since 3.13
|
- XCODE_SCHEME_ADDRESS_SANITIZER # Since 3.13
|
||||||
- XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN # Since 3.13
|
- XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN # Since 3.13
|
||||||
@@ -669,9 +682,12 @@ variables:
|
|||||||
- CMAKE_VS_PLATFORM_TOOLSET_CUDA
|
- CMAKE_VS_PLATFORM_TOOLSET_CUDA
|
||||||
- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
|
- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
|
||||||
- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
|
- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
|
||||||
- CMAKE_XCODE_GENERATE_SCHEME
|
- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM # Since 3.19
|
||||||
|
- CMAKE_XCODE_BUILD_SYSTEM # Since 3.19
|
||||||
- CMAKE_XCODE_PLATFORM_TOOLSET
|
- CMAKE_XCODE_PLATFORM_TOOLSET
|
||||||
- <PROJECT-NAME>_BINARY_DIR
|
- <PROJECT-NAME>_BINARY_DIR
|
||||||
|
- <PROJECT-NAME>_DESCRIPTION # Since 3.12
|
||||||
|
- <PROJECT-NAME>_HOMEPAGE_URL # Since 3.12
|
||||||
- <PROJECT-NAME>_SOURCE_DIR
|
- <PROJECT-NAME>_SOURCE_DIR
|
||||||
- <PROJECT-NAME>_VERSION
|
- <PROJECT-NAME>_VERSION
|
||||||
- <PROJECT-NAME>_VERSION_MAJOR
|
- <PROJECT-NAME>_VERSION_MAJOR
|
||||||
@@ -679,7 +695,7 @@ variables:
|
|||||||
- <PROJECT-NAME>_VERSION_PATCH
|
- <PROJECT-NAME>_VERSION_PATCH
|
||||||
- <PROJECT-NAME>_VERSION_TWEAK
|
- <PROJECT-NAME>_VERSION_TWEAK
|
||||||
- PROJECT_BINARY_DIR
|
- PROJECT_BINARY_DIR
|
||||||
- PROJECT_DESCRIPTION
|
- PROJECT_DESCRIPTION # Since 3.9
|
||||||
- PROJECT_HOMEPAGE_URL # Since 3.12
|
- PROJECT_HOMEPAGE_URL # Since 3.12
|
||||||
- PROJECT_NAME
|
- PROJECT_NAME
|
||||||
- PROJECT_SOURCE_DIR
|
- PROJECT_SOURCE_DIR
|
||||||
@@ -695,6 +711,7 @@ variables:
|
|||||||
- CMAKE_AUTOMOC_RELAXED_MODE
|
- CMAKE_AUTOMOC_RELAXED_MODE
|
||||||
- CMAKE_BACKWARDS_COMPATIBILITY
|
- CMAKE_BACKWARDS_COMPATIBILITY
|
||||||
- CMAKE_BUILD_TYPE
|
- CMAKE_BUILD_TYPE
|
||||||
|
- CMAKE_CLANG_VFS_OVERLAY # Since 3.19
|
||||||
- CMAKE_CODEBLOCKS_COMPILER_ID # Since 3.11
|
- CMAKE_CODEBLOCKS_COMPILER_ID # Since 3.11
|
||||||
- CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES # Since 3.10
|
- CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES # Since 3.10
|
||||||
- CMAKE_CODELITE_USE_TARGETS
|
- CMAKE_CODELITE_USE_TARGETS
|
||||||
@@ -777,7 +794,9 @@ variables:
|
|||||||
- CMAKE_USER_MAKE_RULES_OVERRIDE
|
- CMAKE_USER_MAKE_RULES_OVERRIDE
|
||||||
- CMAKE_WARN_DEPRECATED
|
- CMAKE_WARN_DEPRECATED
|
||||||
- CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
|
- CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||||
|
- CMAKE_XCODE_GENERATE_SCHEME
|
||||||
- CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY # Since 3.13
|
- CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY # Since 3.13
|
||||||
|
- CMAKE_XCODE_LINK_BUILD_PHASE_MODE # Since 3.19
|
||||||
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER # Since 3.13
|
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER # Since 3.13
|
||||||
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN # Since 3.13
|
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN # Since 3.13
|
||||||
- CMAKE_XCODE_SCHEME_WORKING_DIRECTORY # Since 3.17
|
- CMAKE_XCODE_SCHEME_WORKING_DIRECTORY # Since 3.17
|
||||||
@@ -869,6 +888,7 @@ variables:
|
|||||||
- CMAKE_ANDROID_SKIP_ANT_STEP
|
- CMAKE_ANDROID_SKIP_ANT_STEP
|
||||||
- CMAKE_ANDROID_STANDALONE_TOOLCHAIN
|
- CMAKE_ANDROID_STANDALONE_TOOLCHAIN
|
||||||
- CMAKE_ANDROID_STL_TYPE
|
- CMAKE_ANDROID_STL_TYPE
|
||||||
|
- CMAKE_APPLE_SILICON_PROCESSOR # Since 3.19.2
|
||||||
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
||||||
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
|
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
|
||||||
- CMAKE_AUTOGEN_ORIGIN_DEPENDS # Since 3.14
|
- CMAKE_AUTOGEN_ORIGIN_DEPENDS # Since 3.14
|
||||||
@@ -951,10 +971,12 @@ variables:
|
|||||||
- CMAKE_NINJA_OUTPUT_PATH_PREFIX
|
- CMAKE_NINJA_OUTPUT_PATH_PREFIX
|
||||||
- CMAKE_NO_BUILTIN_CHRPATH
|
- CMAKE_NO_BUILTIN_CHRPATH
|
||||||
- CMAKE_NO_SYSTEM_FROM_IMPORTED
|
- CMAKE_NO_SYSTEM_FROM_IMPORTED
|
||||||
|
- CMAKE_OPTIMIZE_DEPENDENCIES # Since 3.19
|
||||||
- CMAKE_OSX_ARCHITECTURES
|
- CMAKE_OSX_ARCHITECTURES
|
||||||
- CMAKE_OSX_DEPLOYMENT_TARGET
|
- CMAKE_OSX_DEPLOYMENT_TARGET
|
||||||
- CMAKE_OSX_SYSROOT
|
- CMAKE_OSX_SYSROOT
|
||||||
- CMAKE_PCH_WARN_INVALID # Since 3.18
|
- CMAKE_PCH_WARN_INVALID # Since 3.18
|
||||||
|
- CMAKE_PCH_INSTANTIATE_TEMPLATES # Since 3.19
|
||||||
- CMAKE_PDB_OUTPUT_DIRECTORY
|
- CMAKE_PDB_OUTPUT_DIRECTORY
|
||||||
- CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>
|
- CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>
|
||||||
- CMAKE_POSITION_INDEPENDENT_CODE
|
- CMAKE_POSITION_INDEPENDENT_CODE
|
||||||
@@ -1015,6 +1037,9 @@ variables:
|
|||||||
- CMAKE_Fortran_MODDIR_DEFAULT
|
- CMAKE_Fortran_MODDIR_DEFAULT
|
||||||
- CMAKE_Fortran_MODDIR_FLAG
|
- CMAKE_Fortran_MODDIR_FLAG
|
||||||
- CMAKE_Fortran_MODOUT_FLAG
|
- CMAKE_Fortran_MODOUT_FLAG
|
||||||
|
- CMAKE_ISPC_HEADER_DIRECTORY # Since 3.19
|
||||||
|
- CMAKE_ISPC_HEADER_SUFFIX # Since 3.19.2
|
||||||
|
- CMAKE_ISPC_INSTRUCTION_SETS # Since 3.19
|
||||||
- CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
|
- CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
|
||||||
- CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX
|
- CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX
|
||||||
- CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX
|
- CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX
|
||||||
@@ -1063,6 +1088,12 @@ variables:
|
|||||||
- CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS
|
- CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS
|
||||||
- CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
|
- CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
|
||||||
- CMAKE_<LANG>_STANDARD_LIBRARIES
|
- CMAKE_<LANG>_STANDARD_LIBRARIES
|
||||||
|
- CMAKE_OBJC_EXTENSIONS # Since 3.16
|
||||||
|
- CMAKE_OBJC_STANDARD # Since 3.16
|
||||||
|
- CMAKE_OBJC_STANDARD_REQUIRED # Since 3.16
|
||||||
|
- CMAKE_OBJCXX_EXTENSIONS # Since 3.16
|
||||||
|
- CMAKE_OBJCXX_STANDARD # Since 3.16
|
||||||
|
- CMAKE_OBJCXX_STANDARD_REQUIRED # Since 3.16
|
||||||
- CMAKE_Swift_LANGUAGE_VERSION
|
- CMAKE_Swift_LANGUAGE_VERSION
|
||||||
- CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>
|
- CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>
|
||||||
# Variables for CTest
|
# Variables for CTest
|
||||||
@@ -1190,8 +1221,11 @@ variables:
|
|||||||
- <pfx>_UNPARSED_ARGUMENTS
|
- <pfx>_UNPARSED_ARGUMENTS
|
||||||
- <pfx>_KEYWORDS_MISSING_VALUES
|
- <pfx>_KEYWORDS_MISSING_VALUES
|
||||||
# Well known CMake's official module's variables
|
# Well known CMake's official module's variables
|
||||||
|
# - CheckCompilerFlag
|
||||||
# - CheckCCompilerFlag
|
# - CheckCCompilerFlag
|
||||||
|
# - CheckSourceCompiles
|
||||||
# - CheckCSourceCompiles
|
# - CheckCSourceCompiles
|
||||||
|
# - CheckSourceRuns
|
||||||
# - CheckCSourceRuns
|
# - CheckCSourceRuns
|
||||||
# - CheckCxxCompilerFlag
|
# - CheckCxxCompilerFlag
|
||||||
# - CheckCxxSourceCompiles
|
# - CheckCxxSourceCompiles
|
||||||
@@ -1337,6 +1371,7 @@ variables:
|
|||||||
- CPACK_EXTERNAL_REQUESTED_VERSIONS
|
- CPACK_EXTERNAL_REQUESTED_VERSIONS
|
||||||
- CPACK_EXTERNAL_ENABLE_STAGING
|
- CPACK_EXTERNAL_ENABLE_STAGING
|
||||||
- CPACK_EXTERNAL_PACKAGE_SCRIPT
|
- CPACK_EXTERNAL_PACKAGE_SCRIPT
|
||||||
|
- CPACK_EXTERNAL_BUILT_PACKAGES # Since 3.19
|
||||||
# - CPackIFW
|
# - CPackIFW
|
||||||
- CPACK_IFW_ROOT
|
- CPACK_IFW_ROOT
|
||||||
- QTIFWDIR
|
- QTIFWDIR
|
||||||
@@ -1597,6 +1632,9 @@ variables:
|
|||||||
- CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
- CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
||||||
- CPACK_CREATE_DESKTOP_LINKS
|
- CPACK_CREATE_DESKTOP_LINKS
|
||||||
- CPACK_BINARY_<GENNAME>
|
- CPACK_BINARY_<GENNAME>
|
||||||
|
- CPACK_PRE_BUILD_SCRIPTS # Since 3.19
|
||||||
|
- CPACK_POST_BUILD_SCRIPTS # Since 3.19
|
||||||
|
- CPACK_PACKAGE_FILES # Since 3.19
|
||||||
# - CPackWIX
|
# - CPackWIX
|
||||||
- CPACK_WIX_UPGRADE_GUID
|
- CPACK_WIX_UPGRADE_GUID
|
||||||
- CPACK_WIX_PRODUCT_GUID
|
- CPACK_WIX_PRODUCT_GUID
|
||||||
@@ -1621,6 +1659,7 @@ variables:
|
|||||||
- CPACK_WIX_SKIP_PROGRAM_FOLDER
|
- CPACK_WIX_SKIP_PROGRAM_FOLDER
|
||||||
- CPACK_WIX_ROOT_FOLDER_ID
|
- CPACK_WIX_ROOT_FOLDER_ID
|
||||||
- CPACK_WIX_ROOT
|
- CPACK_WIX_ROOT
|
||||||
|
- CPACK_WIX_CUSTOM_XMLNS # Since 3.19
|
||||||
# - CTest
|
# - CTest
|
||||||
# - Dart
|
# - Dart
|
||||||
- BUILD_TESTING
|
- BUILD_TESTING
|
||||||
@@ -1750,6 +1789,7 @@ deprecated-or-internal-variables:
|
|||||||
# NOTE Added to syntax file version 14 at 3.15.0 version of CMake
|
# NOTE Added to syntax file version 14 at 3.15.0 version of CMake
|
||||||
environment-variables:
|
environment-variables:
|
||||||
# Environment Variables that Control the Build
|
# Environment Variables that Control the Build
|
||||||
|
- CMAKE_APPLE_SILICON_PROCESSOR # Since 3.19.2
|
||||||
- CMAKE_BUILD_PARALLEL_LEVEL
|
- CMAKE_BUILD_PARALLEL_LEVEL
|
||||||
- CMAKE_CONFIG_TYPE
|
- CMAKE_CONFIG_TYPE
|
||||||
- CMAKE_EXPORT_COMPILE_COMMANDS # Since 3.17
|
- CMAKE_EXPORT_COMPILE_COMMANDS # Since 3.17
|
||||||
@@ -1837,7 +1877,19 @@ scripting-commands:
|
|||||||
]
|
]
|
||||||
-
|
-
|
||||||
name: cmake_language
|
name: cmake_language
|
||||||
named-args: [CALL, EVAL, CODE]
|
named-args: [
|
||||||
|
CALL
|
||||||
|
, EVAL
|
||||||
|
, CODE
|
||||||
|
# Since 3.19
|
||||||
|
, DEFER
|
||||||
|
, DIRECTORY
|
||||||
|
, ID
|
||||||
|
, ID_VAR
|
||||||
|
, GET_CALL_IDS
|
||||||
|
, GET_CALL
|
||||||
|
, CANCEL_CALL
|
||||||
|
]
|
||||||
-
|
-
|
||||||
name: cmake_minimum_required
|
name: cmake_minimum_required
|
||||||
named-args: [VERSION, FATAL_ERROR]
|
named-args: [VERSION, FATAL_ERROR]
|
||||||
@@ -1850,7 +1902,13 @@ scripting-commands:
|
|||||||
special-args: [OLD, NEW]
|
special-args: [OLD, NEW]
|
||||||
-
|
-
|
||||||
name: configure_file
|
name: configure_file
|
||||||
named-args: [COPYONLY, ESCAPE_QUOTES, "@ONLY", NEWLINE_STYLE]
|
named-args: [
|
||||||
|
COPYONLY
|
||||||
|
, ESCAPE_QUOTES
|
||||||
|
, NO_SOURCE_PERMISSIONS # Since 3.19
|
||||||
|
, "@ONLY"
|
||||||
|
, NEWLINE_STYLE
|
||||||
|
]
|
||||||
special-args: [UNIX, DOS, WIN32, LF, CRLF]
|
special-args: [UNIX, DOS, WIN32, LF, CRLF]
|
||||||
-
|
-
|
||||||
name: continue
|
name: continue
|
||||||
@@ -1934,6 +1992,7 @@ scripting-commands:
|
|||||||
, ENCODING
|
, ENCODING
|
||||||
, ECHO_OUTPUT_VARIABLE # Since 3.18
|
, ECHO_OUTPUT_VARIABLE # Since 3.18
|
||||||
, ECHO_ERROR_VARIABLE # Since 3.18
|
, ECHO_ERROR_VARIABLE # Since 3.18
|
||||||
|
, COMMAND_ERROR_IS_FATAL # Since 3.19
|
||||||
]
|
]
|
||||||
special-args: [
|
special-args: [
|
||||||
NONE
|
NONE
|
||||||
@@ -1943,6 +2002,8 @@ scripting-commands:
|
|||||||
, UTF8
|
, UTF8
|
||||||
, STDERR # Since 3.15: the value for `COMMAND_ECHO`
|
, STDERR # Since 3.15: the value for `COMMAND_ECHO`
|
||||||
, STDOUT # Since 3.15: the value for `COMMAND_ECHO`
|
, STDOUT # Since 3.15: the value for `COMMAND_ECHO`
|
||||||
|
, ANY # Since 3.19: the value for `COMMAND_ERROR_IS_FATAL`
|
||||||
|
, LAST # Since 3.19: the value for `COMMAND_ERROR_IS_FATAL`
|
||||||
]
|
]
|
||||||
nested-parentheses?: true
|
nested-parentheses?: true
|
||||||
-
|
-
|
||||||
@@ -2009,6 +2070,7 @@ scripting-commands:
|
|||||||
, INPUT
|
, INPUT
|
||||||
, CONTENT
|
, CONTENT
|
||||||
, CONDITION
|
, CONDITION
|
||||||
|
, TARGET # Since 3.19
|
||||||
, COPY
|
, COPY
|
||||||
, INSTALL
|
, INSTALL
|
||||||
, DESTINATION
|
, DESTINATION
|
||||||
@@ -2040,7 +2102,8 @@ scripting-commands:
|
|||||||
, ARCHIVE_CREATE
|
, ARCHIVE_CREATE
|
||||||
, FILES
|
, FILES
|
||||||
, FORMAT
|
, FORMAT
|
||||||
, TYPE
|
, COMPRESSION
|
||||||
|
, COMPRESSION_LEVEL # Since 3.19
|
||||||
, MTIME
|
, MTIME
|
||||||
, VERBOSE
|
, VERBOSE
|
||||||
, ARCHIVE_EXTRACT
|
, ARCHIVE_EXTRACT
|
||||||
@@ -2049,6 +2112,10 @@ scripting-commands:
|
|||||||
, ESCAPE_QUOTES
|
, ESCAPE_QUOTES
|
||||||
, "@ONLY"
|
, "@ONLY"
|
||||||
, NEWLINE_STYLE
|
, NEWLINE_STYLE
|
||||||
|
, CHMOD # Since 3.19
|
||||||
|
, CHMOD_RECURSE # Since 3.19
|
||||||
|
, REAL_PATH # Since 3.19
|
||||||
|
, BASE_DIRECTORY # Since 3.19
|
||||||
]
|
]
|
||||||
special-args: [
|
special-args: [
|
||||||
UTF-8
|
UTF-8
|
||||||
@@ -2345,7 +2412,13 @@ scripting-commands:
|
|||||||
nulary?: true
|
nulary?: true
|
||||||
-
|
-
|
||||||
name: separate_arguments
|
name: separate_arguments
|
||||||
named-args: [NATIVE_COMMAND, UNIX_COMMAND, WINDOWS_COMMAND]
|
named-args: [
|
||||||
|
NATIVE_COMMAND
|
||||||
|
, UNIX_COMMAND
|
||||||
|
, WINDOWS_COMMAND
|
||||||
|
, PROGRAM # Since 3.19
|
||||||
|
, SEPARATE_ARGS # Since 3.19
|
||||||
|
]
|
||||||
-
|
-
|
||||||
name: set_directory_properties
|
name: set_directory_properties
|
||||||
named-args: [PROPERTIES]
|
named-args: [PROPERTIES]
|
||||||
@@ -2429,6 +2502,16 @@ scripting-commands:
|
|||||||
, NAME
|
, NAME
|
||||||
, TYPE
|
, TYPE
|
||||||
, UPPER
|
, UPPER
|
||||||
|
# Since 3.19
|
||||||
|
, JSON
|
||||||
|
, ERROR_VARIABLE
|
||||||
|
, GET
|
||||||
|
, TYPE
|
||||||
|
, MEMBER
|
||||||
|
, LENGTH
|
||||||
|
, REMOVE
|
||||||
|
, SET
|
||||||
|
, EQUAL
|
||||||
]
|
]
|
||||||
-
|
-
|
||||||
name: unset
|
name: unset
|
||||||
@@ -2532,6 +2615,7 @@ project-commands:
|
|||||||
, CSharp
|
, CSharp
|
||||||
, CXX
|
, CXX
|
||||||
, CUDA
|
, CUDA
|
||||||
|
, ISPC # Since 3.19
|
||||||
, Java
|
, Java
|
||||||
, OBJC # Since 3.16
|
, OBJC # Since 3.16
|
||||||
, OBJCXX # Since 3.16
|
, OBJCXX # Since 3.16
|
||||||
@@ -2656,6 +2740,7 @@ project-commands:
|
|||||||
, CSharp
|
, CSharp
|
||||||
, CXX
|
, CXX
|
||||||
, CUDA
|
, CUDA
|
||||||
|
, ISPC # Since 3.19
|
||||||
, Java
|
, Java
|
||||||
, OBJC # Since 3.16
|
, OBJC # Since 3.16
|
||||||
, OBJCXX # Since 3.16
|
, OBJCXX # Since 3.16
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Generate Kate syntax file for CMake
|
# Generate Kate syntax file for CMake
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2017-2019 Alex Turbov <i.zaufi@gmail.com>
|
# SPDX-FileCopyrightText: 2017-2020 Alex Turbov <i.zaufi@gmail.com>
|
||||||
#
|
#
|
||||||
# To install prerequisites:
|
# To install prerequisites:
|
||||||
#
|
#
|
||||||
@@ -43,21 +43,29 @@ def try_transform_placeholder_string_to_regex(name):
|
|||||||
'''
|
'''
|
||||||
m = _TEMPLATED_NAME.split(name)
|
m = _TEMPLATED_NAME.split(name)
|
||||||
if 'CMAKE_MATCH_' in m:
|
if 'CMAKE_MATCH_' in m:
|
||||||
return '\\bCMAKE_MATCH_[0-9]+\\b'
|
return 'CMAKE_MATCH_[0-9]+'
|
||||||
|
|
||||||
if 'CMAKE_ARGV' in m:
|
if 'CMAKE_ARGV' in m:
|
||||||
return '\\bCMAKE_ARGV[0-9]+\\b'
|
return 'CMAKE_ARGV[0-9]+'
|
||||||
|
|
||||||
if 'CMAKE_POLICY_DEFAULT_CMP' in m:
|
if 'CMAKE_POLICY_DEFAULT_CMP' in m:
|
||||||
return '\\bCMAKE_POLICY_DEFAULT_CMP[0-9]{4}\\b'
|
return 'CMAKE_POLICY_DEFAULT_CMP[0-9]{4}'
|
||||||
|
|
||||||
if 'CMAKE_POLICY_WARNING_CMP' in m:
|
if 'CMAKE_POLICY_WARNING_CMP' in m:
|
||||||
return '\\bCMAKE_POLICY_WARNING_CMP[0-9]{4}\\b'
|
return 'CMAKE_POLICY_WARNING_CMP[0-9]{4}'
|
||||||
|
|
||||||
if 'ARGV' in m:
|
if 'ARGV' in m:
|
||||||
return '\\bARGV[0-9]+\\b'
|
return 'ARGV[0-9]+'
|
||||||
|
|
||||||
return '\\b{}\\b'.format('&id_re;'.join(list(m))) if 1 < len(m) else name
|
return '&id_re;'.join(m) if 1 < len(m) else name
|
||||||
|
|
||||||
|
|
||||||
|
def try_placeholders_to_regex(names):
|
||||||
|
if not names:
|
||||||
|
return None
|
||||||
|
l = map(try_transform_placeholder_string_to_regex, names)
|
||||||
|
l = sorted(l, reverse=True)
|
||||||
|
return '\\b(?:' + '|'.join(l) + ')\\b'
|
||||||
|
|
||||||
|
|
||||||
def partition_iterable(fn, iterable):
|
def partition_iterable(fn, iterable):
|
||||||
@@ -73,7 +81,7 @@ def _transform_command_set(cmd, list_name):
|
|||||||
list_name = list_name.replace('-', '_')
|
list_name = list_name.replace('-', '_')
|
||||||
|
|
||||||
cmd[list_name] = {k: sorted(set(v)) for k, v in zip(_KW_RE_LIST, [args, args_re])}
|
cmd[list_name] = {k: sorted(set(v)) for k, v in zip(_KW_RE_LIST, [args, args_re])}
|
||||||
cmd[list_name]['re'] = [*map(lambda x: try_transform_placeholder_string_to_regex(x), args_re)]
|
cmd[list_name]['re'] = try_placeholders_to_regex(args_re)
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
@@ -136,12 +144,7 @@ def cli(input_yaml, template):
|
|||||||
, [*partition_iterable(lambda x: _TEMPLATED_NAME.search(x) is None, data[var_key])]
|
, [*partition_iterable(lambda x: _TEMPLATED_NAME.search(x) is None, data[var_key])]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
data[var_key]['re'] = [
|
data[var_key]['re'] = try_placeholders_to_regex(data[var_key]['re'])
|
||||||
*map(
|
|
||||||
lambda x: try_transform_placeholder_string_to_regex(x)
|
|
||||||
, data[var_key]['re']
|
|
||||||
)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Transform properties and make all-properties list
|
# Transform properties and make all-properties list
|
||||||
data['properties'] = {}
|
data['properties'] = {}
|
||||||
@@ -153,18 +156,16 @@ def cli(input_yaml, template):
|
|||||||
data['properties'][python_prop_list_name] = {
|
data['properties'][python_prop_list_name] = {
|
||||||
k: sorted(set(v)) for k, v in zip(_KW_RE_LIST, [props, props_re])
|
k: sorted(set(v)) for k, v in zip(_KW_RE_LIST, [props, props_re])
|
||||||
}
|
}
|
||||||
data['properties'][python_prop_list_name]['re'] = [
|
data['properties'][python_prop_list_name]['re'] = try_placeholders_to_regex(props_re)
|
||||||
*map(lambda x: try_transform_placeholder_string_to_regex(x), props_re)
|
|
||||||
]
|
|
||||||
|
|
||||||
data['properties']['kinds'] = [*map(lambda name: name.replace('-', '_'), _PROPERTY_KEYS)]
|
data['properties']['kinds'] = list(map(lambda name: name.replace('-', '_'), _PROPERTY_KEYS))
|
||||||
|
|
||||||
# Make all commands list
|
# Make all commands list
|
||||||
data['commands'] = [
|
data['commands'] = list(
|
||||||
*map(
|
map(
|
||||||
lambda cmd: transform_command(cmd)
|
transform_command
|
||||||
, data['scripting-commands'] + data['project-commands'] + data['ctest-commands'])
|
, data['scripting-commands'] + data['project-commands'] + data['ctest-commands'])
|
||||||
]
|
)
|
||||||
|
|
||||||
# Fix node names to be accessible from Jinja template
|
# Fix node names to be accessible from Jinja template
|
||||||
data['generator_expressions'] = data['generator-expressions']
|
data['generator_expressions'] = data['generator-expressions']
|
||||||
@@ -177,6 +178,12 @@ def cli(input_yaml, template):
|
|||||||
env = jinja2.Environment(
|
env = jinja2.Environment(
|
||||||
keep_trailing_newline=True
|
keep_trailing_newline=True
|
||||||
)
|
)
|
||||||
|
env.block_start_string = '<!--['
|
||||||
|
env.block_end_string = ']-->'
|
||||||
|
env.variable_start_string = '<!--{'
|
||||||
|
env.variable_end_string = '}-->'
|
||||||
|
env.comment_start_string = '<!--#'
|
||||||
|
env.comment_end_string = '#-->'
|
||||||
|
|
||||||
# Register convenience filters
|
# Register convenience filters
|
||||||
env.tests['nulary'] = cmd_is_nulary
|
env.tests['nulary'] = cmd_is_nulary
|
||||||
|
@@ -19,7 +19,13 @@
|
|||||||
|
|
||||||
my $file = "";
|
my $file = "";
|
||||||
|
|
||||||
while (<>)
|
open(my $input, '<:encoding(UTF-8)', $ARGV[0])
|
||||||
|
or die "Could not open file '$ARGV[0]': $!";
|
||||||
|
|
||||||
|
open(my $output, '>:encoding(UTF-8)', $ARGV[1])
|
||||||
|
or die "Could not open file '$ARGV[1]': $!";
|
||||||
|
|
||||||
|
while (<$input>)
|
||||||
{
|
{
|
||||||
$file .= $_;
|
$file .= $_;
|
||||||
}
|
}
|
||||||
@@ -55,12 +61,17 @@ else
|
|||||||
$file =~ s/<language([^>]+)mimetype="[^"]*"/<language$1mimetype=""/s;
|
$file =~ s/<language([^>]+)mimetype="[^"]*"/<language$1mimetype=""/s;
|
||||||
}
|
}
|
||||||
|
|
||||||
$findphp = "<context name=\"FindPHP\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n<RegExpr context=\"##PHP/PHP\" String=\"<\\?(?:=|php)?\" lookAhead=\"true\" />\n</context>\n";
|
if ($root == 1 || $ARGV[0] =~ /mustache.xml$/)
|
||||||
|
{
|
||||||
|
$file =~ s/<(?:RegExpr (attribute="Processing Instruction" context="PI"|context="PI" attribute="Processing Instruction")|itemData name="Processing Instruction")[^\/]+\/>|<context name="PI".*?<\/context>//gs;
|
||||||
|
}
|
||||||
|
|
||||||
$file =~ s/<IncludeRules\s([^>]*)context="([^"#]*)##(?!Alerts|Doxygen|Modelines)([^"]+)"/<IncludeRules $1context="$2##$3\/PHP"/g;
|
$findphp = "<context name=\"FindPHP\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n<Detect2Chars context=\"##PHP/PHP\" char=\"<\" char1=\"?\" lookAhead=\"true\" />\n</context>\n";
|
||||||
|
|
||||||
|
$file =~ s/<IncludeRules\s([^>]*)context="([^"#]*)##(?!Alerts|Comments|Doxygen|Modelines)([^"]+)"/<IncludeRules $1context="$2##$3\/PHP"/g;
|
||||||
$file =~ s/(<context\s[^>]*[^>\/]>)/$1\n<IncludeRules context="FindPHP" \/>/g;
|
$file =~ s/(<context\s[^>]*[^>\/]>)/$1\n<IncludeRules context="FindPHP" \/>/g;
|
||||||
$file =~ s/(<context\s[^>]*[^>\/])\s*\/>/$1>\n<IncludeRules context="FindPHP" \/>\n<\/context>/g;
|
$file =~ s/(<context\s[^>]*[^>\/])\s*\/>/$1>\n<IncludeRules context="FindPHP" \/>\n<\/context>/g;
|
||||||
$file =~ s/(?=<\/contexts\s*>)/$findphp/;
|
$file =~ s/(?=<\/contexts\s*>)/$findphp/;
|
||||||
|
|
||||||
print $file;
|
print $output $file;
|
||||||
print $warning;
|
print $output $warning;
|
||||||
|
@@ -395,49 +395,61 @@
|
|||||||
commonAttributes: Common attributes
|
commonAttributes: Common attributes
|
||||||
insensitive: Is this list case-insensitive? [boolean, optional, see note]
|
insensitive: Is this list case-insensitive? [boolean, optional, see note]
|
||||||
String: Name of the list
|
String: Name of the list
|
||||||
weakDelimiter: Use weak deliminator
|
weakDeliminator: Add weak deliminators [optional, see note]
|
||||||
|
additionalDeliminator: Add deliminators [optional, see note]
|
||||||
|
|
||||||
By default, case sensitivity is determined from <keywords casesensitive> in
|
By default, case sensitivity is determined from <keywords casesensitive> in
|
||||||
<general> (default=true), but can be overridden per-list with 'insensitive'.
|
<general> (default=true), but can be overridden per-list with 'insensitive'.
|
||||||
|
|
||||||
TODO:
|
weakDeliminator and additionalDeliminator are accumulated to those defined in
|
||||||
- Should be weakDeliminator
|
<keywords weakDeliminator additionalDeliminator> in <general>.
|
||||||
- Explain deliminator
|
|
||||||
- Doesn't seem to be supported in highligh.cpp
|
|
||||||
-->
|
-->
|
||||||
<xs:element name="keyword">
|
<xs:element name="keyword">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attributeGroup ref="commonAttributes"/>
|
<xs:attributeGroup ref="commonAttributes"/>
|
||||||
<xs:attribute name="insensitive" type="xs:boolean"/>
|
<xs:attribute name="insensitive" type="xs:boolean"/>
|
||||||
<xs:attribute name="String" use="required"/>
|
<xs:attribute name="String" use="required"/>
|
||||||
<xs:attribute name="weakDelimiter"/>
|
<xs:attribute name="weakDeliminator"/>
|
||||||
|
<xs:attribute name="additionalDeliminator"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<!--
|
<!--
|
||||||
Detect a floating point number
|
Detect a floating point number
|
||||||
commonAttributes: Common attributes
|
commonAttributes: Common attributes
|
||||||
|
weakDeliminator: Add weak deliminators [optional]
|
||||||
|
additionalDeliminator: Add deliminators [optional]
|
||||||
-->
|
-->
|
||||||
<xs:element name="Float">
|
<xs:element name="Float">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attributeGroup ref="commonAttributes"/>
|
<xs:attributeGroup ref="commonAttributes"/>
|
||||||
|
<xs:attribute name="weakDeliminator"/>
|
||||||
|
<xs:attribute name="additionalDeliminator"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<!--
|
<!--
|
||||||
Detect an octal number
|
Detect an octal number
|
||||||
commonAttributes: Common attributes
|
commonAttributes: Common attributes
|
||||||
|
weakDeliminator: Add weak deliminators [optional]
|
||||||
|
additionalDeliminator: Add deliminators [optional]
|
||||||
-->
|
-->
|
||||||
<xs:element name="HlCOct">
|
<xs:element name="HlCOct">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attributeGroup ref="commonAttributes"/>
|
<xs:attributeGroup ref="commonAttributes"/>
|
||||||
|
<xs:attribute name="weakDeliminator"/>
|
||||||
|
<xs:attribute name="additionalDeliminator"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<!--
|
<!--
|
||||||
Detect a hexadecimal number
|
Detect a hexadecimal number
|
||||||
commonAttributes: Common attributes
|
commonAttributes: Common attributes
|
||||||
|
weakDeliminator: Add weak deliminators [optional]
|
||||||
|
additionalDeliminator: Add deliminators [optional]
|
||||||
-->
|
-->
|
||||||
<xs:element name="HlCHex">
|
<xs:element name="HlCHex">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attributeGroup ref="commonAttributes"/>
|
<xs:attributeGroup ref="commonAttributes"/>
|
||||||
|
<xs:attribute name="weakDeliminator"/>
|
||||||
|
<xs:attribute name="additionalDeliminator"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<!--
|
<!--
|
||||||
@@ -455,10 +467,14 @@
|
|||||||
<!--
|
<!--
|
||||||
Detect an integer number
|
Detect an integer number
|
||||||
commonAttributes: Common attributes
|
commonAttributes: Common attributes
|
||||||
|
weakDeliminator: Add weak deliminators [optional]
|
||||||
|
additionalDeliminator: Add deliminators [optional]
|
||||||
-->
|
-->
|
||||||
<xs:element name="Int">
|
<xs:element name="Int">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:attributeGroup ref="commonAttributes"/>
|
<xs:attributeGroup ref="commonAttributes"/>
|
||||||
|
<xs:attribute name="weakDeliminator"/>
|
||||||
|
<xs:attribute name="additionalDeliminator"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<!--
|
<!--
|
||||||
@@ -524,6 +540,8 @@
|
|||||||
commonAttributes: Common attributes
|
commonAttributes: Common attributes
|
||||||
String: The string to look for
|
String: The string to look for
|
||||||
insensitive: Whether the string is matched case INsensitive. [boolean, optional, default=false]
|
insensitive: Whether the string is matched case INsensitive. [boolean, optional, default=false]
|
||||||
|
weakDeliminator: Add weak deliminators [optional]
|
||||||
|
additionalDeliminator: Add deliminators [optional]
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
- What's default of insensitive? I'm not sure...
|
- What's default of insensitive? I'm not sure...
|
||||||
@@ -533,6 +551,8 @@
|
|||||||
<xs:attributeGroup ref="commonAttributes"/>
|
<xs:attributeGroup ref="commonAttributes"/>
|
||||||
<xs:attribute name="String" use="required"/>
|
<xs:attribute name="String" use="required"/>
|
||||||
<xs:attribute name="insensitive" type="xs:boolean"/>
|
<xs:attribute name="insensitive" type="xs:boolean"/>
|
||||||
|
<xs:attribute name="weakDeliminator"/>
|
||||||
|
<xs:attribute name="additionalDeliminator"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<!--
|
<!--
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd">
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
<language version="5" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhaumann@kde.org)" license="MIT" hidden="true">
|
<language version="6" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhaumann@kde.org)" license="MIT" hidden="true">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="alerts_hi">
|
<list name="alerts_hi">
|
||||||
<item>ALERT</item>
|
<item>ALERT</item>
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
<item>WARNING</item>
|
<item>WARNING</item>
|
||||||
<item>CAUTION</item>
|
<item>CAUTION</item>
|
||||||
<item>NOLINT</item>
|
<item>NOLINT</item>
|
||||||
|
<item>NOQA</item>
|
||||||
</list>
|
</list>
|
||||||
<list name="alerts_lo">
|
<list name="alerts_lo">
|
||||||
<item>###</item>
|
<item>###</item>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -38,7 +38,7 @@ Changelog:
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<language name="CSS" version="10" kateversion="5.0" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
<language name="CSS" version="12" kateversion="5.53" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
||||||
<!-- https://www.w3.org/Style/CSS/current-work -->
|
<!-- https://www.w3.org/Style/CSS/current-work -->
|
||||||
|
|
||||||
<highlighting>
|
<highlighting>
|
||||||
@@ -822,6 +822,7 @@ Changelog:
|
|||||||
<item>static</item>
|
<item>static</item>
|
||||||
<item>static-position</item>
|
<item>static-position</item>
|
||||||
<item>status-bar</item>
|
<item>status-bar</item>
|
||||||
|
<item>sticky</item>
|
||||||
<item>thick</item>
|
<item>thick</item>
|
||||||
<item>thin</item>
|
<item>thin</item>
|
||||||
<item>ultra-condensed</item>
|
<item>ultra-condensed</item>
|
||||||
@@ -1584,8 +1585,7 @@ Changelog:
|
|||||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" endRegion="comment" />
|
<Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" endRegion="comment" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd"
|
<!DOCTYPE language SYSTEM "language.dtd"
|
||||||
[
|
[
|
||||||
<!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord -->
|
<!ENTITY wordsep "(?:[][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord -->
|
||||||
<!ENTITY sl_word ".*?(?=&wordsep;)">
|
<!ENTITY sl_word ".*?(?=&wordsep;)">
|
||||||
<!ENTITY ml_word ".*?(?=&wordsep;|\*/)">
|
<!ENTITY ml_word ".*?(?=&wordsep;|\*/)">
|
||||||
]>
|
]>
|
||||||
<language name="Doxygen"
|
<language name="Doxygen"
|
||||||
version="9"
|
version="13"
|
||||||
kateversion="5.0"
|
kateversion="5.0"
|
||||||
section="Markup"
|
section="Markup"
|
||||||
extensions="*.dox;*.doxygen"
|
extensions="*.dox;*.doxygen"
|
||||||
@@ -230,19 +230,17 @@
|
|||||||
<context attribute="Comment" lineEndContext="#pop" name="LineComment">
|
<context attribute="Comment" lineEndContext="#pop" name="LineComment">
|
||||||
<LineContinue attribute="Comment" context="#stay" />
|
<LineContinue attribute="Comment" context="#stay" />
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<DetectChar attribute="Comment" context="SL_StartTag" char="\" lookAhead="true" />
|
<AnyChar attribute="Comment" context="SL_StartTag" String="\@" lookAhead="true" />
|
||||||
<DetectChar attribute="Comment" context="SL_StartTag" char="@" lookAhead="true" />
|
|
||||||
<DetectChar attribute="Comment" context="SL_StartHTMLTag" char="<" lookAhead="true" />
|
<DetectChar attribute="Comment" context="SL_StartHTMLTag" char="<" lookAhead="true" />
|
||||||
<DetectChar attribute="Comment" context="Entities" char="&" lookAhead="true" />
|
<DetectChar attribute="Comment" context="Entities" char="&" lookAhead="true" />
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Comment" lineEndContext="#stay" name="BlockComment">
|
<context attribute="Comment" lineEndContext="#stay" name="BlockComment">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<DetectChar attribute="Comment" context="ML_StartTag" char="\" lookAhead="true" />
|
<AnyChar attribute="Comment" context="ML_StartTag" String="\@" lookAhead="true" />
|
||||||
<DetectChar attribute="Comment" context="ML_StartTag" char="@" lookAhead="true" />
|
|
||||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="BlockComment" />
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="BlockComment" />
|
||||||
<DetectChar attribute="Comment" context="ML_StartHTMLTag" char="<" lookAhead="true" />
|
<DetectChar attribute="Comment" context="ML_StartHTMLTag" char="<" lookAhead="true" />
|
||||||
<DetectChar attribute="Comment" context="Entities" char="&" lookAhead="true" />
|
<DetectChar attribute="Comment" context="Entities" char="&" lookAhead="true" />
|
||||||
@@ -335,7 +333,7 @@
|
|||||||
<context name="ML_htmlcomment" attribute="HTML Comment" lineEndContext="#stay">
|
<context name="ML_htmlcomment" attribute="HTML Comment" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" endRegion="BlockComment" />
|
<Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" endRegion="BlockComment" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
||||||
</context>
|
</context>
|
||||||
@@ -354,7 +352,7 @@
|
|||||||
<DetectChar attribute="Types" context="#pop#pop" char=""" />
|
<DetectChar attribute="Types" context="#pop#pop" char=""" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="ML_FindNextLine" attribute="Comment" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="ML_FindNextLine" attribute="Comment" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Comment" context="#pop!ML_End_BlockComment" char="*" char1="/" endRegion="VerbatimBlock" lookAhead="1"/>
|
<Detect2Chars attribute="Comment" context="#pop!ML_End_BlockComment" char="*" char1="/" endRegion="VerbatimBlock" lookAhead="1"/>
|
||||||
<Detect2Chars attribute="Comment" context="ML_VerbatimPrefix" char="*" char1="*" lookAhead="true" />
|
<Detect2Chars attribute="Comment" context="ML_VerbatimPrefix" char="*" char1="*" lookAhead="true" />
|
||||||
@@ -498,7 +496,7 @@
|
|||||||
</context>
|
</context>
|
||||||
<context name="SL_htmlcomment" attribute="HTML Comment" lineEndContext="#pop">
|
<context name="SL_htmlcomment" attribute="HTML Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
||||||
</context>
|
</context>
|
||||||
@@ -590,8 +588,7 @@
|
|||||||
<RegExpr attribute="Error" context="#pop" String="[@\\]f[]}]" />
|
<RegExpr attribute="Error" context="#pop" String="[@\\]f[]}]" />
|
||||||
<RegExpr attribute="Tags" context="#pop" String="[@\\](?:[#$%&<>"@\\.]|::|---?)(?=&wordsep;)" />
|
<RegExpr attribute="Tags" context="#pop" String="[@\\](?:[#$%&<>"@\\.]|::|---?)(?=&wordsep;)" />
|
||||||
<RegExpr attribute="Custom Tags" context="#pop" String="[@\\](?:[^@\\ \t\*]|\*(?!/))+" />
|
<RegExpr attribute="Custom Tags" context="#pop" String="[@\\](?:[^@\\ \t\*]|\*(?!/))+" />
|
||||||
<DetectChar attribute="Comment" context="#pop" char="\" />
|
<AnyChar attribute="Comment" context="#pop" String="\@" />
|
||||||
<DetectChar attribute="Comment" context="#pop" char="@" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="LanguageId" attribute="Word" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="LanguageId" attribute="Word" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<!ENTITY nmtoken "[\-\w\d\.:_]+">
|
<!ENTITY nmtoken "[\-\w\d\.:_]+">
|
||||||
<!ENTITY entref "(#[0-9]+|#[xX][0-9A-Fa-f]+|&nmtoken;);">
|
<!ENTITY entref "(#[0-9]+|#[xX][0-9A-Fa-f]+|&nmtoken;);">
|
||||||
]>
|
]>
|
||||||
<language name="DTD" version="3" kateversion="3.4" section="Markup" extensions="*.dtd" mimetype="application/xml-dtd" author="Andriy Lesyuk (s-andy@in.if.ua)" license="LGPL">
|
<language name="DTD" version="4" kateversion="5.0" section="Markup" extensions="*.dtd" mimetype="application/xml-dtd" author="Andriy Lesyuk (s-andy@in.if.ua)" license="LGPL">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
|
|
||||||
<list name="Category">
|
<list name="Category">
|
||||||
@@ -45,8 +45,7 @@
|
|||||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -78,7 +77,7 @@
|
|||||||
<context name="InlineComment" attribute="Comment" lineEndContext="#pop">
|
<context name="InlineComment" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Comment" context="#pop" char="-" char1="-" />
|
<Detect2Chars attribute="Comment" context="#pop" char="-" char1="-" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*">
|
<!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*">
|
||||||
<!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
<!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
||||||
]>
|
]>
|
||||||
<language name="HTML" version="12" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
<language name="HTML" version="14" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
||||||
|
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<contexts>
|
<contexts>
|
||||||
@@ -79,8 +79,7 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="FindAttributes" attribute="Other Text" lineEndContext="#stay">
|
<context name="FindAttributes" attribute="Other Text" lineEndContext="#stay">
|
||||||
<RegExpr attribute="Attribute" context="#stay" String="&attributeName;" column="0"/>
|
<RegExpr attribute="Attribute" context="#stay" String="^&attributeName;|\s+&attributeName;" />
|
||||||
<RegExpr attribute="Attribute" context="#stay" String="\s+&attributeName;" />
|
|
||||||
<DetectChar attribute="Attribute" context="Value" char="=" />
|
<DetectChar attribute="Attribute" context="Value" char="=" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -92,8 +91,7 @@
|
|||||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||||
<DetectSpaces/>
|
<DetectSpaces/>
|
||||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier/>
|
<DetectIdentifier/>
|
||||||
<RegExpr attribute="Error" context="#stay" String="-(?:-(?!->))+" />
|
<RegExpr attribute="Error" context="#stay" String="-(?:-(?!->))+" />
|
||||||
</context>
|
</context>
|
||||||
@@ -195,7 +193,7 @@
|
|||||||
<context name="JS comment close" attribute="Comment" lineEndContext="#pop">
|
<context name="JS comment close" attribute="Comment" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Element" context="El Close 3" String="</script\b" insensitive="true" endRegion="script" />
|
<RegExpr attribute="Element" context="El Close 3" String="</script\b" insensitive="true" endRegion="script" />
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ">
|
<context name="Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ">
|
||||||
@@ -206,8 +204,7 @@
|
|||||||
|
|
||||||
<context name="Value NQ" attribute="Other Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
<context name="Value NQ" attribute="Other Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
||||||
<IncludeRules context="FindEntityRefs" />
|
<IncludeRules context="FindEntityRefs" />
|
||||||
<RegExpr attribute="Value" context="#stay" String="/(?!>)" />
|
<RegExpr attribute="Value" context="#stay" String="/(?!>)|[^/><"'\s]" />
|
||||||
<RegExpr attribute="Value" context="#stay" String="[^/><"'\s]" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd">
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
<language name="INI Files" section="Configuration" extensions="*.ini;*.pls;*.kcfgc" mimetype="" version="6" kateversion="2.4" author="Jan Janssen (medhefgo@web.de)" license="LGPL">
|
<language name="INI Files" section="Configuration" extensions="*.ini;*.pls;*.kcfgc" mimetype="" version="8" kateversion="5.0" author="Jan Janssen (medhefgo@web.de)" license="LGPL">
|
||||||
|
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="keywords">
|
<list name="keywords">
|
||||||
@@ -36,8 +36,7 @@
|
|||||||
<context name="ini" attribute="Normal Text" lineEndContext="#stay">
|
<context name="ini" attribute="Normal Text" lineEndContext="#stay">
|
||||||
<RangeDetect attribute="Section" context="#stay" char="[" char1="]" beginRegion="Section" endRegion="Section" />
|
<RangeDetect attribute="Section" context="#stay" char="[" char1="]" beginRegion="Section" endRegion="Section" />
|
||||||
<DetectChar attribute="Assignment" context="Value" char="=" />
|
<DetectChar attribute="Assignment" context="Value" char="=" />
|
||||||
<DetectChar char=";" attribute="Comment" context="Comment" firstNonSpace="true" />
|
<AnyChar String=";#" attribute="Comment" context="Comment" firstNonSpace="true" />
|
||||||
<DetectChar char="#" attribute="Comment" context="Comment" firstNonSpace="true" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Value" attribute="Value" lineEndContext="#pop" >
|
<context name="Value" attribute="Value" lineEndContext="#pop" >
|
||||||
@@ -48,8 +47,7 @@
|
|||||||
|
|
||||||
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
</contexts>
|
</contexts>
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd"
|
<!DOCTYPE language SYSTEM "language.dtd"
|
||||||
[
|
[
|
||||||
<!ENTITY int "[0-9]([0-9_]*[0-9])?">
|
<!ENTITY int "(?:[0-9]++(_++[0-9]++)*+)">
|
||||||
<!ENTITY hex "[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?">
|
<!ENTITY hex "(?:[0-9a-fA-F]++(_++[0-9a-fA-F]++)*+)">
|
||||||
|
<!ENTITY exp "(?:[eE][-+]?∫)">
|
||||||
|
<!ENTITY float "(\b∫(\.((∫&exp;?+|&exp;)[fFdD]?\b|[fFdD]\b)?|&exp;[fFdD]?\b|[fFdD]\b)|\.∫&exp;?[fFdD]?\b)">
|
||||||
|
<!ENTITY hexfloat "\b0[xX](&hex;\.?+&hex;?+|\.&hex;?)[pP][-+]?∫[fFdD]?\b">
|
||||||
]>
|
]>
|
||||||
<language name="Java" version="7" kateversion="5.0" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
<language name="Java" version="9" kateversion="5.62" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="java15">
|
<list name="java15">
|
||||||
<item>ACTIVE</item>
|
<item>ACTIVE</item>
|
||||||
@@ -3704,21 +3707,11 @@
|
|||||||
</list>
|
</list>
|
||||||
<list name="keywords">
|
<list name="keywords">
|
||||||
<item>abstract</item>
|
<item>abstract</item>
|
||||||
<item>break</item>
|
|
||||||
<item>case</item>
|
|
||||||
<item>catch</item>
|
|
||||||
<item>class</item>
|
<item>class</item>
|
||||||
<item>continue</item>
|
|
||||||
<item>default</item>
|
<item>default</item>
|
||||||
<item>do</item>
|
|
||||||
<item>else</item>
|
|
||||||
<item>enum</item>
|
<item>enum</item>
|
||||||
<item>extends</item>
|
<item>extends</item>
|
||||||
<item>false</item>
|
<item>false</item>
|
||||||
<item>finally</item>
|
|
||||||
<item>for</item>
|
|
||||||
<item>goto</item>
|
|
||||||
<item>if</item>
|
|
||||||
<item>implements</item>
|
<item>implements</item>
|
||||||
<item>instanceof</item>
|
<item>instanceof</item>
|
||||||
<item>@interface</item>
|
<item>@interface</item>
|
||||||
@@ -3729,18 +3722,30 @@
|
|||||||
<item>private</item>
|
<item>private</item>
|
||||||
<item>protected</item>
|
<item>protected</item>
|
||||||
<item>public</item>
|
<item>public</item>
|
||||||
<item>return</item>
|
|
||||||
<item>super</item>
|
<item>super</item>
|
||||||
<item>strictfp</item>
|
<item>strictfp</item>
|
||||||
<item>switch</item>
|
|
||||||
<item>synchronized</item>
|
<item>synchronized</item>
|
||||||
<item>this</item>
|
<item>this</item>
|
||||||
<item>throws</item>
|
<item>throws</item>
|
||||||
<item>throw</item>
|
|
||||||
<item>transient</item>
|
<item>transient</item>
|
||||||
<item>true</item>
|
<item>true</item>
|
||||||
<item>try</item>
|
|
||||||
<item>volatile</item>
|
<item>volatile</item>
|
||||||
|
</list>
|
||||||
|
<list name="control flow">
|
||||||
|
<item>break</item>
|
||||||
|
<item>case</item>
|
||||||
|
<item>catch</item>
|
||||||
|
<item>continue</item>
|
||||||
|
<item>do</item>
|
||||||
|
<item>else</item>
|
||||||
|
<item>finally</item>
|
||||||
|
<item>for</item>
|
||||||
|
<item>goto</item>
|
||||||
|
<item>if</item>
|
||||||
|
<item>return</item>
|
||||||
|
<item>switch</item>
|
||||||
|
<item>throw</item>
|
||||||
|
<item>try</item>
|
||||||
<item>while</item>
|
<item>while</item>
|
||||||
</list>
|
</list>
|
||||||
<list name="types">
|
<list name="types">
|
||||||
@@ -3759,87 +3764,127 @@
|
|||||||
</list>
|
</list>
|
||||||
<contexts>
|
<contexts>
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
||||||
<!-- Comment next line if you don't use Javadoc tool -->
|
<DetectSpaces context="#stay"/>
|
||||||
<IncludeRules context="##Javadoc"/>
|
|
||||||
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
<DetectChar attribute="Symbol" context="Dot" char="." lookAhead="1"/>
|
||||||
<keyword attribute="Data Type" context="#stay" String="types"/>
|
|
||||||
<keyword attribute="Java15" context="#stay" String="java15"/>
|
|
||||||
<RegExpr attribute="Float" context="#stay" String="(\b∫\.?|(\b∫)?\.∫)([eE][\-\+]?∫[fFdD]?|[fFdD])\b"/>
|
|
||||||
<RegExpr attribute="Float" context="#stay" String="(\b∫\.|(\b∫)?\.∫\b)"/>
|
|
||||||
<RegExpr attribute="Float" context="#stay" String="\b0[xX](&hex;\.?|(&hex;)?\.&hex;)[pP][\-\+]?∫[fFdD]?\b"/>
|
|
||||||
<RegExpr attribute="Hex" context="#stay" String="\b0[xX]&hex;[lL]?\b"/>
|
|
||||||
<RegExpr attribute="Binary" context="#stay" String="\b0[bB][01]([01_]*[01])?[lL]?\b"/>
|
|
||||||
<RegExpr attribute="Octal" context="#stay" String="\b0[0-7]([0-7_]*[0-7])?[lL]?\b"/>
|
|
||||||
<RegExpr attribute="Decimal" context="#stay" String="\b(0|[1-9]([0-9_]*[0-9])?)[lL]?\b"/>
|
|
||||||
<HlCChar attribute="Char" context="#stay"/>
|
|
||||||
<RegExpr attribute="Char" context="#stay" String="'\\u[0-9a-fA-F]{4}'"/>
|
|
||||||
<RegExpr attribute="Decimal" context="#stay" String="//\s*BEGIN.*$" beginRegion="Region1"/>
|
|
||||||
<RegExpr attribute="Decimal" context="#stay" String="//\s*END.*$" endRegion="Region1"/>
|
|
||||||
<DetectChar attribute="String" context="String" char="""/>
|
|
||||||
<RegExpr attribute="Function" context="EnterPrintf" String="\.(format|printf)\b"/>
|
|
||||||
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
|
|
||||||
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
|
|
||||||
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1"/>
|
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1"/>
|
||||||
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1"/>
|
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1"/>
|
||||||
<RegExpr attribute="Keyword" context="#stay" String="\.{3,3}\s+" />
|
<DetectChar attribute="Annotation" context="Annotation" char="@" />
|
||||||
<RegExpr attribute="Keyword" context="StaticImports" String="\b(import\s+static)\b" />
|
|
||||||
<RegExpr attribute="Keyword" context="Imports" String="\b(package|import)\b" />
|
|
||||||
<RegExpr attribute="Function" context="#stay" String="\b[_\w][_\w\d]*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[(])" />
|
|
||||||
<RegExpr attribute="Annotation" context="#stay" String="@[_\w][_\w\d]*" />
|
|
||||||
<DetectChar attribute="Symbol" context="Member" char="." />
|
|
||||||
<DetectChar attribute="Symbol" context="InFunctionCall" char="("/>
|
<DetectChar attribute="Symbol" context="InFunctionCall" char="("/>
|
||||||
<AnyChar attribute="Symbol" context="#stay" String=":!%&+,-/*<=>?[]|~^;"/>
|
|
||||||
|
<!-- Comment next line if you don't use Javadoc tool -->
|
||||||
|
<IncludeRules context="##Javadoc"/>
|
||||||
|
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
|
||||||
|
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
|
||||||
|
|
||||||
|
<AnyChar attribute="Symbol" context="#stay" String="[]&|+,-/*<=>;!%?:~^"/>
|
||||||
|
|
||||||
|
<AnyChar context="Number" String="0123456789" lookAhead="1"/>
|
||||||
|
|
||||||
|
<DetectChar attribute="String" context="String" char="""/>
|
||||||
|
<DetectChar context="Char" char="'" lookAhead="1"/>
|
||||||
|
|
||||||
|
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
||||||
|
<keyword attribute="Control Flow" context="#stay" String="control flow"/>
|
||||||
|
<keyword attribute="Data Type" context="#stay" String="types"/>
|
||||||
|
<keyword attribute="Java15" context="#stay" String="java15"/>
|
||||||
|
|
||||||
|
<WordDetect attribute="Keyword" context="Imports" String="package" />
|
||||||
|
<WordDetect attribute="Keyword" context="ImportsOrStaticImports" String="import" />
|
||||||
|
|
||||||
|
<RegExpr attribute="Function" context="#stay" String="\b[_a-zA-Z]\w*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[(])" />
|
||||||
|
<DetectIdentifier attribute="Normal Text"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context attribute="Normal Text" lineEndContext="#stay" name="Number">
|
||||||
|
<IncludeRules context="FindFloat"/>
|
||||||
|
<RegExpr attribute="Hex" context="#pop" String="\b0[xX]&hex;[lL]?\b"/>
|
||||||
|
<RegExpr attribute="Binary" context="#pop" String="\b0[bB][01]++(_++[01]++)*+[lL]?\b"/>
|
||||||
|
<RegExpr attribute="Octal" context="#pop" String="\b0_*+[0-7]++(_++[0-7_]++)*+[lL]?\b"/>
|
||||||
|
<RegExpr attribute="Decimal" context="#pop" String="\b(0|[1-9][0-9]*+(_++[0-9_]++)*+)[lL]?\b"/>
|
||||||
|
<AnyChar attribute="Error" context="#pop" String="0123456789"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="Normal Text" lineEndContext="#stay" name="FindFloat">
|
||||||
|
<RegExpr attribute="Float" context="#pop" String="&float;|&hexfloat;"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context attribute="Normal Text" lineEndContext="#stay" name="Char">
|
||||||
|
<HlCChar attribute="Char" context="#pop"/>
|
||||||
|
<RegExpr attribute="Char" context="#pop" String="'\\u+[0-9a-fA-F]{4}'"/>
|
||||||
|
<RegExpr attribute="Error" context="#pop" String="'(\\(u+[0-9a-fA-F]*|.))?'?"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="InFunctionCall">
|
<context attribute="Normal Text" lineEndContext="#stay" name="InFunctionCall">
|
||||||
<IncludeRules context="Normal"/>
|
<IncludeRules context="Normal"/>
|
||||||
<DetectChar attribute="Symbol" context="#pop" char=")"/>
|
<DetectChar attribute="Symbol" context="#pop" char=")"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context attribute="String" lineEndContext="#pop" name="String">
|
<context attribute="String" lineEndContext="#pop" name="String">
|
||||||
<LineContinue attribute="String" context="#stay"/>
|
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
|
||||||
<HlCStringChar attribute="String Char" context="#stay"/>
|
|
||||||
<RegExpr attribute="String Char" context="#stay" String="\\u[0-9a-fA-F]{4}"/>
|
|
||||||
<DetectChar attribute="String" context="#pop" char="""/>
|
<DetectChar attribute="String" context="#pop" char="""/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="EnterPrintf" fallthrough="true" fallthroughContext="#pop">
|
<context attribute="String" lineEndContext="#pop" name="StringEscapedChar">
|
||||||
<DetectChar attribute="Symbol" context="Printf" char="("/>
|
<HlCStringChar attribute="String Char" context="#pop"/>
|
||||||
|
<RegExpr attribute="String Char" context="#pop" String="\\u+[0-9a-fA-F]{4}"/>
|
||||||
|
<RegExpr attribute="Error" context="#pop" String="\\(u+[0-9a-fA-F]*|.)?"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context attribute="Normal Text" lineEndContext="#stay" name="Printf" fallthroughContext="#pop">
|
||||||
|
<DetectChar attribute="Symbol" context="#pop!InPrintf" char="("/>
|
||||||
<DetectSpaces attribute="Normal Text" context="#stay"/>
|
<DetectSpaces attribute="Normal Text" context="#stay"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="Printf">
|
<context attribute="Normal Text" lineEndContext="#stay" name="InPrintf">
|
||||||
<DetectChar attribute="String" context="PrintfString" char="""/>
|
<DetectChar attribute="String" context="PrintfString" char="""/>
|
||||||
<IncludeRules context="InFunctionCall"/>
|
<IncludeRules context="InFunctionCall"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="PrintfString" lineEndContext="#pop" name="PrintfString">
|
<context attribute="PrintfString" lineEndContext="#pop" name="PrintfString">
|
||||||
<LineContinue attribute="String" context="#stay"/>
|
<IncludeRules context="String"/>
|
||||||
<HlCStringChar attribute="String Char" context="#stay"/>
|
<RegExpr attribute="String Char" context="#stay" String="%((\d+\$)?[-#+ 0,(]*\d*((\.\d+)?[a-hosxA-CEGHSX]|[tT][aAbBcCdDeFhHIjklLmMNpPQrRsSTyYzZ])|[%n])" />
|
||||||
<DetectChar attribute="String" context="#pop" char="""/>
|
|
||||||
<RegExpr attribute="String Char" context="#stay" String="%(\d+\$)?(-|#|\+|\ |0|,|\()*\d*(\.\d+)?[a-hosxA-CEGHSX]" />
|
|
||||||
<RegExpr attribute="String Char" context="#stay" String="%(\d+\$)?(-|#|\+|\ |0|,|\()*\d*(t|T)(a|A|b|B|c|C|d|D|e|F|h|H|I|j|k|l|L|m|M|N|p|P|Q|r|R|s|S|T|y|Y|z|Z)" />
|
|
||||||
<RegExpr attribute="String Char" context="#stay" String="%(%|n)" />
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#pop" name="Member" fallthrough="true" fallthroughContext="#pop">
|
|
||||||
<RegExpr attribute="Function" context="#pop" String="\b[_a-zA-Z]\w*(?=[\s]*)" />
|
<context attribute="Normal Text" lineEndContext="#stay" name="Dot">
|
||||||
|
<StringDetect attribute="Keyword" context="#pop" String="..." />
|
||||||
|
<IncludeRules context="FindFloat"/>
|
||||||
|
<DetectChar attribute="Symbol" context="#pop!Member" char="." />
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#pop" name="StaticImports">
|
<context attribute="Normal Text" lineEndContext="#stay" name="Member" fallthroughContext="#pop">
|
||||||
<RegExpr attribute="StaticImports" context="#pop" String="\s*.*;" />
|
<DetectSpaces attribute="Normal Text" context="#stay"/>
|
||||||
|
<WordDetect attribute="Function" context="#pop!Printf" String="printf"/>
|
||||||
|
<WordDetect attribute="Function" context="#pop!Printf" String="format"/>
|
||||||
|
<DetectIdentifier attribute="Function" context="#pop"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#pop" name="Imports">
|
|
||||||
<RegExpr attribute="Imports" context="#pop" String="\s*.*;" />
|
<context attribute="Normal Text" lineEndContext="#pop" name="Annotation" fallthroughContext="#pop">
|
||||||
|
<DetectIdentifier attribute="Annotation" context="#pop"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context attribute="Normal Text" lineEndContext="#pop" name="ImportsOrStaticImports" fallthroughContext="#pop!Imports">
|
||||||
|
<DetectSpaces attribute="Normal Text"/>
|
||||||
|
<WordDetect attribute="Keyword" context="#pop!StaticImports" String="static"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="StaticImports" lineEndContext="#pop" name="StaticImports">
|
||||||
|
<IncludeRules context="Imports"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="Imports" lineEndContext="#pop" name="Imports">
|
||||||
|
<AnyChar attribute="Symbol" context="#stay" String=".*"/>
|
||||||
|
<DetectChar attribute="Symbol" context="#pop" char=";"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
|
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Comments"/>
|
||||||
<IncludeRules context="##Modelines"/>
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
||||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Comments"/>
|
||||||
<IncludeRules context="##Modelines"/>
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
</contexts>
|
</contexts>
|
||||||
<itemDatas>
|
<itemDatas>
|
||||||
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
|
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
|
||||||
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
|
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
|
||||||
|
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>
|
||||||
<itemData name="Annotation" defStyleNum="dsAttribute" spellChecking="false"/>
|
<itemData name="Annotation" defStyleNum="dsAttribute" spellChecking="false"/>
|
||||||
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
|
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
|
||||||
<itemData name="StaticImports" defStyleNum="dsImport" spellChecking="false"/>
|
<itemData name="StaticImports" defStyleNum="dsImport" spellChecking="false"/>
|
||||||
@@ -3855,8 +3900,9 @@
|
|||||||
<itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/>
|
<itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/>
|
||||||
<itemData name="PrintfString" defStyleNum="dsString"/>
|
<itemData name="PrintfString" defStyleNum="dsString"/>
|
||||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||||
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/>
|
<itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/>
|
||||||
<itemData name="Java15" defStyleNum="dsBuiltIn" spellChecking="false"/>
|
<itemData name="Java15" defStyleNum="dsBuiltIn" spellChecking="false"/>
|
||||||
|
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
|
||||||
</itemDatas>
|
</itemDatas>
|
||||||
</highlighting>
|
</highlighting>
|
||||||
<general>
|
<general>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd">
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
<language name="Javadoc" version="3" kateversion="5.0" section="Markup" extensions="" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
<language name="Javadoc" version="6" kateversion="5.62" section="Markup" extensions="" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<contexts>
|
<contexts>
|
||||||
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
|
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
|
||||||
@@ -12,74 +12,52 @@
|
|||||||
</context>
|
</context>
|
||||||
<context attribute="JavadocFS" lineEndContext="#stay" name="JavadocFSar">
|
<context attribute="JavadocFS" lineEndContext="#stay" name="JavadocFSar">
|
||||||
<Detect2Chars attribute="JavadocFS" context="#pop" char="*" char1="/" endRegion="Javadoc"/>
|
<Detect2Chars attribute="JavadocFS" context="#pop" char="*" char1="/" endRegion="Javadoc"/>
|
||||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="(!|\?)" />
|
<RegExpr attribute="JavadocFS" context="Javadocar" String="[!?.](\s*$|\s(?![\da-z]))|^\s*\**\s*(?=@(author|deprecated|exception|param|return|see|serial|serialData|serialField|since|throws|version)(\s|$))"/>
|
||||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="(\.\s*$)" />
|
<IncludeRules context="FindInlineTag"/>
|
||||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="(\.\s)(?![\da-z])" />
|
<IncludeRules context="##Comments"/>
|
||||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="\**\s*(?=@(author|deprecated|exception|param|return|see|serial|serialData|serialField|since|throws|version)(\s|$))" firstNonSpace="true"/>
|
<IncludeRules context="##HTML"/>
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code " />
|
</context>
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code	" />
|
<context attribute="Javadoc" lineEndContext="#stay" name="FindInlineTag">
|
||||||
|
<WordDetect attribute="InlineTag" context="LiteralTagar" String="{@code"/>
|
||||||
<StringDetect attribute="InlineTag" context="#stay" String="{@docRoot}"/>
|
<StringDetect attribute="InlineTag" context="#stay" String="{@docRoot}"/>
|
||||||
<StringDetect attribute="InlineTag" context="#stay" String="{@inheritDoc}"/>
|
<StringDetect attribute="InlineTag" context="#stay" String="{@inheritDoc}"/>
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link " />
|
<WordDetect attribute="InlineTag" context="InlineTagar" String="{@link"/>
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link	" />
|
<WordDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain"/>
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain " />
|
<WordDetect attribute="InlineTag" context="LiteralTagar" String="{@literal"/>
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal " />
|
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="#stay" String="{@value}"/>
|
<StringDetect attribute="InlineTag" context="#stay" String="{@value}"/>
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value " />
|
<WordDetect attribute="InlineTag" context="InlineTagar" String="{@value"/>
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value	" />
|
<WordDetect attribute="InlineTag" context="LiteralTagar" String="{@summary"/>
|
||||||
<IncludeRules context="##Alerts"/>
|
<WordDetect attribute="InlineTag" context="LiteralTagar" String="{@systemProperty"/>
|
||||||
<IncludeRules context="##HTML"/>
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Javadoc" lineEndContext="#stay" name="Javadocar">
|
<context attribute="Javadoc" lineEndContext="#stay" name="Javadocar">
|
||||||
<Detect2Chars attribute="JavadocFS" context="#pop#pop" char="*" char1="/" endRegion="Javadoc"/>
|
<Detect2Chars attribute="JavadocFS" context="#pop#pop" char="*" char1="/" endRegion="Javadoc"/>
|
||||||
<RegExpr attribute="JavadocFS" context="#stay" String="\*+(?!/)" firstNonSpace="true"/>
|
<DetectChar attribute="JavadocFS" context="JavadocFSStarPrefix" char="*" firstNonSpace="true"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@author " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@author"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@deprecated " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@deprecated"/>
|
||||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@exception " />
|
<WordDetect attribute="BlockTag" context="JavadocParam" String="@exception"/>
|
||||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@param " />
|
<WordDetect attribute="BlockTag" context="JavadocParam" String="@param"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@return " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@return"/>
|
||||||
<StringDetect attribute="BlockTag" context="SeeTag" String="@see "/>
|
<WordDetect attribute="BlockTag" context="SeeTag" String="@see"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@serial " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@serial"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialData " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@serialData"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialField " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@serialField"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@since " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@since"/>
|
||||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@throws " />
|
<WordDetect attribute="BlockTag" context="JavadocParam" String="@throws"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@version " />
|
<WordDetect attribute="BlockTag" context="#stay" String="@version"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@author	" />
|
<IncludeRules context="FindInlineTag"/>
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@deprecated	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@exception	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@param	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@return	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="SeeTag" String="@see	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@serial	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialData	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialField	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@since	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@throws	" />
|
|
||||||
<StringDetect attribute="BlockTag" context="#stay" String="@version	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code " />
|
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="#stay" String="{@docRoot}" />
|
|
||||||
<StringDetect attribute="InlineTag" context="#stay" String="{@inheritDoc}" />
|
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link " />
|
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain " />
|
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal " />
|
|
||||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal	" />
|
|
||||||
<StringDetect attribute="InlineTag" context="#stay" String="{@value}" />
|
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value " />
|
|
||||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value	" />
|
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Alerts"/>
|
||||||
<IncludeRules context="##HTML"/>
|
<IncludeRules context="##HTML"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Javadoc" lineEndContext="#pop" name="JavadocParam">
|
<context attribute="Javadoc" lineEndContext="#pop" name="JavadocFSStarPrefix" fallthroughContext="#pop">
|
||||||
<DetectSpaces />
|
<Detect2Chars attribute="JavadocFS" context="#pop#pop#pop" char="*" char1="/" endRegion="Javadoc"/>
|
||||||
<RegExpr attribute="JavadocParam" context="#pop#pop" String="\S*(?=\*/)" />
|
<DetectChar attribute="JavadocFS" context="#stay" char="*"/>
|
||||||
<RegExpr attribute="JavadocParam" context="#pop" String="\S*(\s|$)" />
|
</context>
|
||||||
<IncludeRules context="##Alerts"/>
|
<context attribute="Javadoc" lineEndContext="#pop" name="JavadocParam" fallthroughContext="JavadocParamIdent">
|
||||||
|
<DetectSpaces context="JavadocParamIdent"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="JavadocParam" lineEndContext="#pop#pop" name="JavadocParamIdent">
|
||||||
|
<DetectSpaces attribute="Javadoc" context="#pop#pop"/>
|
||||||
|
<Detect2Chars attribute="JavadocFS" context="#pop#pop#pop#pop" char="*" char1="/" endRegion="Javadoc"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="InlineTag" name="InlineTagar" lineEndContext="#stay">
|
<context attribute="InlineTag" name="InlineTagar" lineEndContext="#stay">
|
||||||
<DetectChar attribute="InlineTag" context="#pop" char="}" />
|
<DetectChar attribute="InlineTag" context="#pop" char="}" />
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
** http://tools.ietf.org/html/rfc4627
|
** http://tools.ietf.org/html/rfc4627
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
-->
|
-->
|
||||||
<language name="JSON" section="Markup" version="5" kateversion="2.4" extensions="*.json;.kateproject;.arcconfig;*.geojson;*.gltf;*.theme" mimetype="application/json" author="Sebastian Pipping (sebastian@pipping.org)" license="GPL">
|
<language name="JSON" section="Markup" version="6" kateversion="2.4" extensions="*.json;.kateproject;.arcconfig;*.geojson;*.gltf;*.theme" mimetype="application/json" author="Sebastian Pipping (sebastian@pipping.org)" license="GPL">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="Constants">
|
<list name="Constants">
|
||||||
<item>null</item>
|
<item>null</item>
|
||||||
@@ -46,8 +46,7 @@
|
|||||||
<DetectChar char=""" context="String_Value" attribute="Style_String_Value" />
|
<DetectChar char=""" context="String_Value" attribute="Style_String_Value" />
|
||||||
<DetectChar char="{" context="Pair" beginRegion="Region_Object" attribute="Style_Seperator_Pair" />
|
<DetectChar char="{" context="Pair" beginRegion="Region_Object" attribute="Style_Seperator_Pair" />
|
||||||
<DetectChar char="[" context="Array" beginRegion="Region_Array" attribute="Style_Seperator_Array" />
|
<DetectChar char="[" context="Array" beginRegion="Region_Array" attribute="Style_Seperator_Array" />
|
||||||
<DetectChar char="}" context="#pop" lookAhead="true" />
|
<AnyChar String="}," context="#pop" lookAhead="true" />
|
||||||
<DetectChar char="," context="#pop" lookAhead="true" />
|
|
||||||
|
|
||||||
<DetectSpaces context="#stay" attribute="Style_Normal" />
|
<DetectSpaces context="#stay" attribute="Style_Normal" />
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<!-- v10 by Peter J. Mello <admin@petermello.net>
|
<!-- v10 by Peter J. Mello <admin@petermello.net>
|
||||||
Add recognition of POSIX 2013 '::=' operator for variable assignment -->
|
Add recognition of POSIX 2013 '::=' operator for variable assignment -->
|
||||||
<language name="Makefile" section="Other"
|
<language name="Makefile" section="Other"
|
||||||
version="10" kateversion="3.4"
|
version="13" kateversion="5.0"
|
||||||
extensions="GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*;*.mk"
|
extensions="GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*;*.mk"
|
||||||
mimetype="text/x-makefile" priority="11"
|
mimetype="text/x-makefile" priority="11"
|
||||||
author="Per Wigren (wigren@home.se)" license="">
|
author="Per Wigren (wigren@home.se)" license="">
|
||||||
@@ -384,6 +384,8 @@
|
|||||||
TODO :[range]
|
TODO :[range]
|
||||||
-->
|
-->
|
||||||
<!-- Modifiers without arguments:-->
|
<!-- Modifiers without arguments:-->
|
||||||
|
<!-- :Ox Randomize words in variable. -->
|
||||||
|
<Detect2Chars attribute="Builtin" context="#pop!expect}" char="O" char1="x"/>
|
||||||
<!--
|
<!--
|
||||||
:E Replaces each word in the variable with its suffix.
|
:E Replaces each word in the variable with its suffix.
|
||||||
:H Replaces each word in the variable with everything but the last component.
|
:H Replaces each word in the variable with everything but the last component.
|
||||||
@@ -398,8 +400,6 @@
|
|||||||
<AnyChar attribute="Builtin" context="#pop!expect}" String="EHOQRTuLP"/>
|
<AnyChar attribute="Builtin" context="#pop!expect}" String="EHOQRTuLP"/>
|
||||||
<!-- :sh If the variable is non-empty it is run as a command and the output becomes the new value. -->
|
<!-- :sh If the variable is non-empty it is run as a command and the output becomes the new value. -->
|
||||||
<Detect2Chars attribute="Builtin" context="#pop!expect}" char="s" char1="h"/>
|
<Detect2Chars attribute="Builtin" context="#pop!expect}" char="s" char1="h"/>
|
||||||
<!-- :Ox Randomize words in variable. -->
|
|
||||||
<Detect2Chars attribute="Builtin" context="#pop!expect}" char="O" char1="x"/>
|
|
||||||
<!-- :tA Attempt to convert variable to an absolute path using realpath(3),-->
|
<!-- :tA Attempt to convert variable to an absolute path using realpath(3),-->
|
||||||
<Detect2Chars attribute="Builtin" context="#pop!expect}" char="t" char1="A"/>
|
<Detect2Chars attribute="Builtin" context="#pop!expect}" char="t" char1="A"/>
|
||||||
<!-- :tl Converts variable to lower-case letters.-->
|
<!-- :tl Converts variable to lower-case letters.-->
|
||||||
@@ -417,12 +417,11 @@
|
|||||||
:Dnewval If the variable is defined newval is the value.
|
:Dnewval If the variable is defined newval is the value.
|
||||||
:Unewval If the variable is undefined newval is the value.
|
:Unewval If the variable is undefined newval is the value.
|
||||||
-->
|
-->
|
||||||
<AnyChar attribute="Builtin" context="#pop!bmake_var_modifier_arg" String="MNDU"/>
|
|
||||||
<!-- TODO: add new context to highligh old_string and new_string differently
|
<!-- TODO: add new context to highligh old_string and new_string differently
|
||||||
:S/old_string/new_string/[1gW]
|
:S/old_string/new_string/[1gW]
|
||||||
:C/pattern/replacement/[1gW]
|
:C/pattern/replacement/[1gW]
|
||||||
-->
|
-->
|
||||||
<AnyChar attribute="Builtin" context="#pop!bmake_var_modifier_arg" String="SC"/>
|
<AnyChar attribute="Builtin" context="#pop!bmake_var_modifier_arg" String="MNDUSC"/>
|
||||||
<!-- ::=str The variable is assigned the value str after substitution. -->
|
<!-- ::=str The variable is assigned the value str after substitution. -->
|
||||||
<Detect2Chars attribute="Builtin" context="#pop!bmake_var_modifier_arg" char=":" char1="="/>
|
<Detect2Chars attribute="Builtin" context="#pop!bmake_var_modifier_arg" char=":" char1="="/>
|
||||||
<!-- ::?=str As for ::= but only if the variable does not already have a value. -->
|
<!-- ::?=str As for ::= but only if the variable does not already have a value. -->
|
||||||
@@ -477,8 +476,7 @@
|
|||||||
|
|
||||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||||
<LineContinue attribute="Comment" context="#stay" />
|
<LineContinue attribute="Comment" context="#stay" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
</contexts>
|
</contexts>
|
||||||
|
@@ -90,14 +90,14 @@
|
|||||||
<!ENTITY checkbox "\[[ x]\](?=\s)">
|
<!ENTITY checkbox "\[[ x]\](?=\s)">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<language name="Markdown" version="13" kateversion="5.53" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD">
|
<language name="Markdown" version="17" kateversion="5.79" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<contexts>
|
<contexts>
|
||||||
<!-- Start of the Markdown document: find metadata or code block -->
|
<!-- Start of the Markdown document: find metadata or code block -->
|
||||||
<context name="Start Document" attribute="Normal Text" lineEndContext="Normal Text" lineEmptyContext="Normal Text" fallthrough="true" fallthroughContext="Normal Text">
|
<context name="Start Document" attribute="Normal Text" lineEndContext="Normal Text" lineEmptyContext="Normal Text" fallthroughContext="Normal Text">
|
||||||
<!-- Some titles: (Title|Author|Date|Copyright|Revision|CSS|LaTeX\ XSLT|Categories|Tags|BaseName|Excerpt) -->
|
<!-- Some titles: (Title|Author|Date|Copyright|Revision|CSS|LaTeX\ XSLT|Categories|Tags|BaseName|Excerpt) -->
|
||||||
<!-- Metadata: Markdown format -->
|
<!-- Metadata: Markdown format -->
|
||||||
<RegExpr attribute="Metadata" context="metadata" String="\-{3}&end;" column="0" beginRegion="metadata"/>
|
<RegExpr attribute="Metadata" context="metadata" String="^\-{3}&end;" column="0" beginRegion="metadata"/>
|
||||||
<!-- Metadata: MultiMarkdown format -->
|
<!-- Metadata: MultiMarkdown format -->
|
||||||
<RegExpr attribute="Metadata Title" context="metadata-mm-value" String="^&metadatakey;(?=\s|$)" column="0"/>
|
<RegExpr attribute="Metadata Title" context="metadata-mm-value" String="^&metadatakey;(?=\s|$)" column="0"/>
|
||||||
<!-- Code Block -->
|
<!-- Code Block -->
|
||||||
@@ -109,12 +109,12 @@
|
|||||||
<RegExpr attribute="Metadata Title" String="^&metadatakey;(?=\s|$)" column="0"/>
|
<RegExpr attribute="Metadata Title" String="^&metadatakey;(?=\s|$)" column="0"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="metadata-mm-value" attribute="Metadata" lineEndContext="#pop!metadata-mm"/>
|
<context name="metadata-mm-value" attribute="Metadata" lineEndContext="#pop!metadata-mm"/>
|
||||||
<context name="metadata-mm" attribute="Metadata" lineEndContext="#stay" lineEmptyContext="#pop!Normal Text" fallthrough="true" fallthroughContext="#pop!Normal Text">
|
<context name="metadata-mm" attribute="Metadata" lineEndContext="#stay" lineEmptyContext="#pop!Normal Text" fallthroughContext="#pop!Normal Text">
|
||||||
<!-- Find Metadata key or value -->
|
<!-- Find Metadata key or value -->
|
||||||
<RegExpr attribute="Metadata Title" context="#pop!metadata-mm-value" String="^&metadatakey;(?=\s|$)" column="0"/>
|
<RegExpr attribute="Metadata Title" context="#pop!metadata-mm-value" String="^&metadatakey;(?=\s|$)" column="0"/>
|
||||||
<RegExpr attribute="Metadata" context="#pop!metadata-mm-value" String="^(?:\s{4}|\t)" column="0"/>
|
<RegExpr attribute="Metadata" context="#pop!metadata-mm-value" String="^(?:\s{4}|\t)" column="0"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="find-code-block-start" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#stay" fallthrough="true" fallthroughContext="#pop!Normal Text">
|
<context name="find-code-block-start" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#stay" fallthroughContext="#pop!Normal Text">
|
||||||
<IncludeRules context="find-code-block"/>
|
<IncludeRules context="find-code-block"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -130,9 +130,9 @@
|
|||||||
NOTE: The indentation of the lists is captured. -->
|
NOTE: The indentation of the lists is captured. -->
|
||||||
<RegExpr attribute="Horizontal Rule" context="find-code-block" String="^&rulerregex;" column="0"/>
|
<RegExpr attribute="Horizontal Rule" context="find-code-block" String="^&rulerregex;" column="0"/>
|
||||||
<DetectChar attribute="Blockquote" context="blockquote" char=">" firstNonSpace="true"/>
|
<DetectChar attribute="Blockquote" context="blockquote" char=">" firstNonSpace="true"/>
|
||||||
<RegExpr attribute="List" context="list" String="(\s*)&listbullet;(\s+)" column="0"/>
|
<RegExpr attribute="List" context="list" String="^(\s*)&listbullet;(\s+)" column="0"/>
|
||||||
<RegExpr attribute="Number List" context="numlist" String="(\s*)\d\.(\s+)" column="0"/>
|
<RegExpr attribute="Number List" context="numlist" String="^(\s*)\d\.(\s+)" column="0"/>
|
||||||
<RegExpr attribute="Number List" context="numlist2" String="(\s*)\d\d+\.(\s+)" column="0"/>
|
<RegExpr attribute="Number List" context="numlist2" String="^(\s*)\d\d+\.(\s+)" column="0"/>
|
||||||
<!-- Find Strong, Emphasis and Strikethrough Text -->
|
<!-- Find Strong, Emphasis and Strikethrough Text -->
|
||||||
<DetectChar context="find-strong-normal" char="*" lookAhead="true"/>
|
<DetectChar context="find-strong-normal" char="*" lookAhead="true"/>
|
||||||
<DetectChar context="find-emphasis-normal" char="_" lookAhead="true"/>
|
<DetectChar context="find-emphasis-normal" char="_" lookAhead="true"/>
|
||||||
@@ -142,33 +142,30 @@
|
|||||||
<RegExpr attribute="Normal Text: Link" String="&implicitlink;"/>
|
<RegExpr attribute="Normal Text: Link" String="&implicitlink;"/>
|
||||||
</context>
|
</context>
|
||||||
<!-- Find indented code blocks. These are only allowed after an empty line or on the first line -->
|
<!-- Find indented code blocks. These are only allowed after an empty line or on the first line -->
|
||||||
<context name="find-code-block" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#stay" fallthrough="true" fallthroughContext="#pop">
|
<context name="find-code-block" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#stay" fallthroughContext="#pop">
|
||||||
<RegExpr attribute="Code" String="^&indentedcodeblock;" column="0"/>
|
<RegExpr attribute="Code" String="^&indentedcodeblock;" column="0"/>
|
||||||
<RegExpr attribute="Normal Text" String="&end;" />
|
<RegExpr attribute="Normal Text" String="&end;" />
|
||||||
<RegExpr attribute="Comment" context="comment" String="\s*&startcomment;" column="0" beginRegion="comment"/>
|
<RegExpr attribute="Comment" context="comment" String="^\s*&startcomment;|\s*&startcomment;(?=.*&endcomment;)" beginRegion="comment"/>
|
||||||
<RegExpr attribute="Comment" context="comment" String="\s*&startcomment;(?=.*&endcomment;)" beginRegion="comment"/>
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="find-header" attribute="Normal Text" lineEndContext="#pop">
|
<context name="find-header" attribute="Normal Text" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Header H1" context="#pop" String="^#\s.*[#]?$"/>
|
<RegExpr attribute="Header H1" context="#pop" String="^#\s.*[#]?$" column="0"/>
|
||||||
<RegExpr attribute="Header H2" context="#pop" String="^##\s.*[#]?$"/>
|
<RegExpr attribute="Header H2" context="#pop" String="^##\s.*[#]?$" column="0"/>
|
||||||
<RegExpr attribute="Header H3" context="#pop" String="^###\s.*[#]?$"/>
|
<RegExpr attribute="Header H3" context="#pop" String="^###\s.*[#]?$" column="0"/>
|
||||||
<RegExpr attribute="Header H4" context="#pop" String="^####\s.*[#]?$"/>
|
<RegExpr attribute="Header H4" context="#pop" String="^####\s.*[#]?$" column="0"/>
|
||||||
<RegExpr attribute="Header H5" context="#pop" String="^#####\s.*[#]?$"/>
|
<RegExpr attribute="Header H5" context="#pop" String="^#####\s.*[#]?$" column="0"/>
|
||||||
<RegExpr attribute="Header H6" context="#pop" String="^######\s.*[#]?$"/>
|
<RegExpr attribute="Header H6" context="#pop" String="^######\s.*[#]?$" column="0"/>
|
||||||
<DetectChar attribute="Normal Text" context="#pop" char="#"/>
|
<DetectChar attribute="Normal Text" context="#pop" char="#"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="find-strong-normal" attribute="Normal Text" lineEndContext="#pop">
|
<context name="find-strong-normal" attribute="Normal Text" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;"/>
|
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;|&strongemphasisregex_ast_und2;"/>
|
||||||
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und2;"/>
|
|
||||||
<RegExpr attribute="Strong Text" context="#pop" minimal="true" String="&strongregex_ast;"/>
|
<RegExpr attribute="Strong Text" context="#pop" minimal="true" String="&strongregex_ast;"/>
|
||||||
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;"/>
|
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;"/>
|
||||||
<RegExpr attribute="Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;"/>
|
<RegExpr attribute="Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;"/>
|
||||||
<DetectChar attribute="Normal Text" context="#pop" char="*"/>
|
<DetectChar attribute="Normal Text" context="#pop" char="*"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="find-emphasis-normal" attribute="Normal Text" lineEndContext="#pop">
|
<context name="find-emphasis-normal" attribute="Normal Text" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast;"/>
|
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast;|&strongemphasisregex_und_ast2;"/>
|
||||||
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast2;"/>
|
|
||||||
<RegExpr attribute="Strong Text" context="#pop" minimal="true" String="&strongregex_und;"/>
|
<RegExpr attribute="Strong Text" context="#pop" minimal="true" String="&strongregex_und;"/>
|
||||||
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und;"/>
|
<RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und;"/>
|
||||||
<RegExpr attribute="Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_und;"/>
|
<RegExpr attribute="Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_und;"/>
|
||||||
@@ -195,7 +192,7 @@
|
|||||||
<context name="default-blockquote-1" attribute="Blockquote: Normal Text" lineEndContext="#stay">
|
<context name="default-blockquote-1" attribute="Blockquote: Normal Text" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Blockquote" char=">" firstNonSpace="true"/>
|
<DetectChar attribute="Blockquote" char=">" firstNonSpace="true"/>
|
||||||
<!-- End with header, horizontal rule or list/numlist -->
|
<!-- End with header, horizontal rule or list/numlist -->
|
||||||
<RegExpr context="#pop" String="(?:\s*(?:&listbullet;|[\d]+\.)\s|#{1,6}\s|&rulerregex;)" column="0" lookAhead="true"/>
|
<RegExpr context="#pop" String="^(?:\s*(?:&listbullet;|[\d]+\.)\s|#{1,6}\s|&rulerregex;)" column="0" lookAhead="true"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="default-blockquote-2" attribute="Blockquote: Normal Text" lineEndContext="#stay">
|
<context name="default-blockquote-2" attribute="Blockquote: Normal Text" lineEndContext="#stay">
|
||||||
<!-- Strong, emphasis, strong-emphasis and strikethrough text -->
|
<!-- Strong, emphasis, strong-emphasis and strikethrough text -->
|
||||||
@@ -206,16 +203,10 @@
|
|||||||
<RegExpr attribute="Blockquote: Link" String="&implicitlink;"/>
|
<RegExpr attribute="Blockquote: Link" String="&implicitlink;"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="find-strong-emphasis-blockquote" attribute="Blockquote: Normal Text" lineEndContext="#pop">
|
<context name="find-strong-emphasis-blockquote" attribute="Blockquote: Normal Text" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;"/>
|
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;|&strongemphasisregex_und_ast;|&strongemphasisregex_ast_und2;|&strongemphasisregex_und_ast2;"/>
|
||||||
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast;"/>
|
<RegExpr attribute="Blockquote: Strong Text" context="#pop" minimal="true" String="&strongregex_ast;|&strongregex_und;"/>
|
||||||
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und2;"/>
|
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;|&strongemphasisregex_und;"/>
|
||||||
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast2;"/>
|
<RegExpr attribute="Blockquote: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;|&emphasisregex_und;"/>
|
||||||
<RegExpr attribute="Blockquote: Strong Text" context="#pop" minimal="true" String="&strongregex_ast;"/>
|
|
||||||
<RegExpr attribute="Blockquote: Strong Text" context="#pop" minimal="true" String="&strongregex_und;"/>
|
|
||||||
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;"/>
|
|
||||||
<RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und;"/>
|
|
||||||
<RegExpr attribute="Blockquote: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;" />
|
|
||||||
<RegExpr attribute="Blockquote: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_und;"/>
|
|
||||||
<AnyChar attribute="Blockquote: Normal Text" context="#pop" String="*_"/>
|
<AnyChar attribute="Blockquote: Normal Text" context="#pop" String="*_"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -223,40 +214,40 @@
|
|||||||
<!-- NOTE: The indentation of the lists is captured. New paragraphs, code blocks, blockquotes or
|
<!-- NOTE: The indentation of the lists is captured. New paragraphs, code blocks, blockquotes or
|
||||||
horizontal rules must have an indentation equal to or greater than the list, to be part of it. -->
|
horizontal rules must have an indentation equal to or greater than the list, to be part of it. -->
|
||||||
<!-- * list -->
|
<!-- * list -->
|
||||||
<context name="list" attribute="List: Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="content-list">
|
<context name="list" attribute="List: Normal Text" lineEndContext="#stay" fallthroughContext="content-list">
|
||||||
<!-- Find indented code blocks, blockquotes and horizontal rules -->
|
<!-- Find indented code blocks, blockquotes and horizontal rules -->
|
||||||
<RegExpr attribute="Code" String="%1%2\s&indentedcodeblock;" column="0" dynamic="true"/>
|
<RegExpr attribute="Code" String="^%1%2\s&indentedcodeblock;" column="0" dynamic="true"/>
|
||||||
<RegExpr attribute="Blockquote" context="blockquote-list" String="%1%2\s+>" column="0" dynamic="true"/>
|
<RegExpr attribute="Blockquote" context="blockquote-list" String="^%1%2\s+>" column="0" dynamic="true"/>
|
||||||
<RegExpr attribute="Horizontal Rule" String="%1%2\s+&rulerregex;" column="0" dynamic="true"/>
|
<RegExpr attribute="Horizontal Rule" String="^%1%2\s+&rulerregex;" column="0" dynamic="true"/>
|
||||||
<RegExpr String="&emptyline;" column="0"/>
|
<RegExpr String="&emptyline;" column="0"/>
|
||||||
<!-- Text with the same indentation captured corresponds to the item list -->
|
<!-- Text with the same indentation captured corresponds to the item list -->
|
||||||
<RegExpr context="content-list" String="%1%2\s" column="0" lookAhead="true" dynamic="true"/>
|
<RegExpr context="content-list" String="^%1%2\s" column="0" lookAhead="true" dynamic="true"/>
|
||||||
<!-- Finish when the text has a lower indentation than the list -->
|
<!-- Finish when the text has a lower indentation than the list -->
|
||||||
<RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
|
<RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
|
||||||
<!-- Highlight checkbox at the start of the item (task list) -->
|
<!-- Highlight checkbox at the start of the item (task list) -->
|
||||||
<RegExpr attribute="List: Checkbox" context="content-list" String="\s*&checkbox;"/>
|
<RegExpr attribute="List: Checkbox" context="content-list" String="\s*&checkbox;"/>
|
||||||
</context>
|
</context>
|
||||||
<!-- 1. numlist (one digit) -->
|
<!-- 1. numlist (one digit) -->
|
||||||
<context name="numlist" attribute="List: Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="content-list">
|
<context name="numlist" attribute="List: Normal Text" lineEndContext="#stay" fallthroughContext="content-list">
|
||||||
<!-- Find indented code blocks, blockquotes and horizontal rules -->
|
<!-- Find indented code blocks, blockquotes and horizontal rules -->
|
||||||
<RegExpr attribute="Code" String="%1%2\s{2}&indentedcodeblock;" column="0" dynamic="true"/>
|
<RegExpr attribute="Code" String="^%1%2\s{2}&indentedcodeblock;" column="0" dynamic="true"/>
|
||||||
<RegExpr attribute="Blockquote" context="blockquote-list" String="%1%2\s{2,}>" column="0" dynamic="true"/>
|
<RegExpr attribute="Blockquote" context="blockquote-list" String="^%1%2\s{2,}>" column="0" dynamic="true"/>
|
||||||
<RegExpr attribute="Horizontal Rule" String="%1%2\s{2,}&rulerregex;" column="0" dynamic="true"/>
|
<RegExpr attribute="Horizontal Rule" String="^%1%2\s{2,}&rulerregex;" column="0" dynamic="true"/>
|
||||||
<RegExpr String="&emptyline;" column="0"/>
|
<RegExpr String="&emptyline;" column="0"/>
|
||||||
<!-- Text with the same indentation captured -->
|
<!-- Text with the same indentation captured -->
|
||||||
<RegExpr context="content-list" String="%1%2\s{2}" column="0" lookAhead="true" dynamic="true"/>
|
<RegExpr context="content-list" String="^%1%2\s{2}" column="0" lookAhead="true" dynamic="true"/>
|
||||||
<!-- Finish when the text has a lower indentation than the list -->
|
<!-- Finish when the text has a lower indentation than the list -->
|
||||||
<RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
|
<RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
|
||||||
</context>
|
</context>
|
||||||
<!-- 10. numlist (two or more digits) -->
|
<!-- 10. numlist (two or more digits) -->
|
||||||
<context name="numlist2" attribute="List: Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="content-list">
|
<context name="numlist2" attribute="List: Normal Text" lineEndContext="#stay" fallthroughContext="content-list">
|
||||||
<!-- Find indented code blocks, blockquotes and horizontal rules -->
|
<!-- Find indented code blocks, blockquotes and horizontal rules -->
|
||||||
<RegExpr attribute="Code" String="%1%2\s{3}&indentedcodeblock;" column="0" dynamic="true"/>
|
<RegExpr attribute="Code" String="^%1%2\s{3}&indentedcodeblock;" column="0" dynamic="true"/>
|
||||||
<RegExpr attribute="Blockquote" context="blockquote-list" String="%1%2\s{3,}>" column="0" dynamic="true"/>
|
<RegExpr attribute="Blockquote" context="blockquote-list" String="^%1%2\s{3,}>" column="0" dynamic="true"/>
|
||||||
<RegExpr attribute="Horizontal Rule" String="%1%2\s{3,}&rulerregex;" column="0" dynamic="true"/>
|
<RegExpr attribute="Horizontal Rule" String="^%1%2\s{3,}&rulerregex;" column="0" dynamic="true"/>
|
||||||
<RegExpr String="&emptyline;" column="0"/>
|
<RegExpr String="&emptyline;" column="0"/>
|
||||||
<!-- Text with the same indentation captured -->
|
<!-- Text with the same indentation captured -->
|
||||||
<RegExpr context="content-list" String="%1%2\s{3}" column="0" lookAhead="true" dynamic="true"/>
|
<RegExpr context="content-list" String="^%1%2\s{3}" column="0" lookAhead="true" dynamic="true"/>
|
||||||
<!-- Finish when the text has a lower indentation than the list -->
|
<!-- Finish when the text has a lower indentation than the list -->
|
||||||
<RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
|
<RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
|
||||||
</context>
|
</context>
|
||||||
@@ -268,7 +259,7 @@
|
|||||||
<!-- Blockquote and horzontal rule (check indentation) -->
|
<!-- Blockquote and horzontal rule (check indentation) -->
|
||||||
<RegExpr context="#pop" String="^\s*(?:>|&rulerregex;)" column="0" lookAhead="true"/>
|
<RegExpr context="#pop" String="^\s*(?:>|&rulerregex;)" column="0" lookAhead="true"/>
|
||||||
<!-- End with header or new list/numlist -->
|
<!-- End with header or new list/numlist -->
|
||||||
<RegExpr context="#pop#pop" String="(?:\s*(?:&listbullet;|[\d]+\.)\s|#{1,6}\s)" column="0" lookAhead="true"/>
|
<RegExpr context="#pop#pop" String="^(?:\s*(?:&listbullet;|[\d]+\.)\s|#{1,6}\s)" column="0" lookAhead="true"/>
|
||||||
<!-- Strong, emphasis, strong-emphasis and strikethrough text -->
|
<!-- Strong, emphasis, strong-emphasis and strikethrough text -->
|
||||||
<AnyChar context="find-strong-emphasis-list" String="*_" lookAhead="true"/>
|
<AnyChar context="find-strong-emphasis-list" String="*_" lookAhead="true"/>
|
||||||
<RegExpr attribute="List: Strikethrough Text" minimal="true" String="&strikeoutregex;"/>
|
<RegExpr attribute="List: Strikethrough Text" minimal="true" String="&strikeoutregex;"/>
|
||||||
@@ -277,24 +268,17 @@
|
|||||||
<RegExpr attribute="List: Link" String="&implicitlink;"/>
|
<RegExpr attribute="List: Link" String="&implicitlink;"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="find-strong-emphasis-list" attribute="List: Normal Text" lineEndContext="#pop">
|
<context name="find-strong-emphasis-list" attribute="List: Normal Text" lineEndContext="#pop">
|
||||||
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;"/>
|
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;|&strongemphasisregex_und_ast;|&strongemphasisregex_ast_und2;|&strongemphasisregex_und_ast2;"/>
|
||||||
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast;"/>
|
<RegExpr attribute="List: Strong Text" context="#pop" minimal="true" String="&strongregex_ast;|&strongregex_und;"/>
|
||||||
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und2;"/>
|
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;|&strongemphasisregex_und;"/>
|
||||||
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast2;"/>
|
<RegExpr attribute="List: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;|&emphasisregex_und;"/>
|
||||||
<RegExpr attribute="List: Strong Text" context="#pop" minimal="true" String="&strongregex_ast;"/>
|
|
||||||
<RegExpr attribute="List: Strong Text" context="#pop" minimal="true" String="&strongregex_und;"/>
|
|
||||||
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;"/>
|
|
||||||
<RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und;"/>
|
|
||||||
<RegExpr attribute="List: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;" />
|
|
||||||
<RegExpr attribute="List: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_und;"/>
|
|
||||||
<AnyChar attribute="List: Normal Text" context="#pop" String="*_"/>
|
<AnyChar attribute="List: Normal Text" context="#pop" String="*_"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Comments -->
|
<!-- Comments -->
|
||||||
<context name="comment" attribute="Comment" lineEndContext="#stay">
|
<context name="comment" attribute="Comment" lineEndContext="#stay">
|
||||||
<StringDetect attribute="Comment" context="#pop" String="&endcomment;" endRegion="comment"/>
|
<StringDetect attribute="Comment" context="#pop" String="&endcomment;" endRegion="comment"/>
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Comments"/>
|
||||||
<IncludeRules context="##Modelines"/>
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Fenced Code Blocks -->
|
<!-- Fenced Code Blocks -->
|
||||||
@@ -337,7 +321,7 @@
|
|||||||
<context name="code" attribute="Code" lineEndContext="#stay"> <!-- Unknown language -->
|
<context name="code" attribute="Code" lineEndContext="#stay"> <!-- Unknown language -->
|
||||||
<RegExpr attribute="Fenced Code" context="#pop" String="%1[~`]*(?=&end;)" firstNonSpace="true" dynamic="true" endRegion="code-block"/>
|
<RegExpr attribute="Fenced Code" context="#pop" String="%1[~`]*(?=&end;)" firstNonSpace="true" dynamic="true" endRegion="code-block"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Normal Text" lineEndContext="#stay" name="bash-code">
|
<context attribute="Normal Text" lineEndContext="#stay" name="bash-code" fallthroughContext="Command##Bash">
|
||||||
<IncludeRules context="code"/>
|
<IncludeRules context="code"/>
|
||||||
<IncludeRules context="##Bash" includeAttrib="true"/>
|
<IncludeRules context="##Bash" includeAttrib="true"/>
|
||||||
</context>
|
</context>
|
||||||
@@ -465,14 +449,9 @@
|
|||||||
<!-- Common -->
|
<!-- Common -->
|
||||||
<context name="inc" attribute="Normal Text" lineEndContext="#stay">
|
<context name="inc" attribute="Normal Text" lineEndContext="#stay">
|
||||||
<!-- Code -->
|
<!-- Code -->
|
||||||
<RegExpr attribute="Code" String="`[^`]+`(?!`)"/>
|
<RegExpr attribute="Code" String="`[^`]+`(?!`)|`{2}[^`](?:.*?[^`])?`{2}(?!`)|`{3}[^`](?:.*?[^`])?`{3}(?!`)|`{4}[^`](?:.*?[^`])?`{4}(?!`)|`{5,}[^`](?:.*?[^`])?`{5,}"/>
|
||||||
<RegExpr attribute="Code" minimal="true" String="`{2}[^`](?:.*[^`])?`{2}(?!`)"/>
|
|
||||||
<RegExpr attribute="Code" minimal="true" String="`{3}[^`](?:.*[^`])?`{3}(?!`)"/>
|
|
||||||
<RegExpr attribute="Code" minimal="true" String="`{4}[^`](?:.*[^`])?`{4}(?!`)"/>
|
|
||||||
<RegExpr attribute="Code" minimal="true" String="`{5,}[^`](?:.*[^`])?`{5,}"/>
|
|
||||||
<!-- Find Fenced Code Block -->
|
<!-- Find Fenced Code Block -->
|
||||||
<RegExpr attribute="Fenced Code" context="find-lang-fenced-code" String="`{3,}(?=[^`]*$)" firstNonSpace="true" lookAhead="true" beginRegion="code-block"/>
|
<RegExpr attribute="Fenced Code" context="find-lang-fenced-code" String="`{3,}(?=[^`]*$)|~{3,}(?=[^~]*$)" firstNonSpace="true" lookAhead="true" beginRegion="code-block"/>
|
||||||
<RegExpr attribute="Fenced Code" context="find-lang-fenced-code" String="~{3,}(?=[^~]*$)" firstNonSpace="true" lookAhead="true" beginRegion="code-block"/>
|
|
||||||
<!-- Comment -->
|
<!-- Comment -->
|
||||||
<StringDetect attribute="Comment" context="comment" String="&startcomment;" beginRegion="comment"/>
|
<StringDetect attribute="Comment" context="comment" String="&startcomment;" beginRegion="comment"/>
|
||||||
<!-- Links and References -->
|
<!-- Links and References -->
|
||||||
@@ -508,13 +487,13 @@
|
|||||||
<RegExpr attribute="EntityRef" String="&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&htmlname;);"/>
|
<RegExpr attribute="EntityRef" String="&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&htmlname;);"/>
|
||||||
<RegExpr context="find-html-block" String="</?&htmlname;(?:[\s>]|/>|$)" lookAhead="true"/>
|
<RegExpr context="find-html-block" String="</?&htmlname;(?:[\s>]|/>|$)" lookAhead="true"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="find-html-block" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="find-html-block" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
|
||||||
<IncludeRules context="FindSpecialHTMLTags##HTML"/>
|
<IncludeRules context="FindSpecialHTMLTags##HTML"/>
|
||||||
<IncludeRules context="FindHTMLTags##HTML"/>
|
<IncludeRules context="FindHTMLTags##HTML"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Links and email: <https://example.com>, <example@kde.org> -->
|
<!-- Links and email: <https://example.com>, <example@kde.org> -->
|
||||||
<context name="autolink" attribute="Auto-Link" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="autolink" attribute="Auto-Link" lineEndContext="#pop" fallthroughContext="#pop">
|
||||||
<DetectChar attribute="Auto-Link" char="<"/>
|
<DetectChar attribute="Auto-Link" char="<"/>
|
||||||
<DetectChar attribute="Auto-Link" context="#pop" char=">"/>
|
<DetectChar attribute="Auto-Link" context="#pop" char=">"/>
|
||||||
<RegExpr attribute="Link" String="&startlink;[^">\s]+"/>
|
<RegExpr attribute="Link" String="&startlink;[^">\s]+"/>
|
||||||
@@ -552,25 +531,23 @@
|
|||||||
<RegExpr attribute="Reference-Link: Link" String="\b&startlink;(?:\\.|[^">\s\]\\])+"/>
|
<RegExpr attribute="Reference-Link: Link" String="\b&startlink;(?:\\.|[^">\s\]\\])+"/>
|
||||||
</context>
|
</context>
|
||||||
<!-- [an example][id] "title" -->
|
<!-- [an example][id] "title" -->
|
||||||
<context name="reflink-title" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="reflink-title" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
|
||||||
<RegExpr attribute="Reference-Link" context="#pop" String="\s+"(?:\\.|[^"\\])*""/>
|
<RegExpr attribute="Reference-Link" context="#pop" String="\s+"(?:\\.|[^"\\])*""/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Target Ref.: [foo]: http://example.com/ "Optional Title Here" -->
|
<!-- Target Ref.: [foo]: http://example.com/ "Optional Title Here" -->
|
||||||
<context name="reflinktarget" attribute="Reference-Link Target" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="reflinktarget" attribute="Reference-Link Target" lineEndContext="#pop" fallthroughContext="#pop">
|
||||||
<RegExpr attribute="Reference-Link Target: Link" context="#pop!reflinktarget-title" String="\s*&link;(?=\s|$)"/>
|
<RegExpr attribute="Reference-Link Target: Link" context="#pop!reflinktarget-title" String="\s*&link;(?=\s|$)"/>
|
||||||
<RegExpr attribute="Reference-Link Target" context="#pop!reflinktarget-link" String="\s*<(?=&link;>(?:\s|$))"/>
|
<RegExpr attribute="Reference-Link Target" context="#pop!reflinktarget-link" String="\s*<(?=&link;>(?:\s|$))"/>
|
||||||
<RegExpr attribute="Reference-Link Target" context="#pop!reflinktarget-title" String="\s*#[\w\.\:\-]+\b"/>
|
<RegExpr attribute="Reference-Link Target" context="#pop!reflinktarget-title" String="\s*#[\w\.\:\-]+\b"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="reflinktarget-link" attribute="Reference-Link Target" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="reflinktarget-link" attribute="Reference-Link Target" lineEndContext="#pop" fallthroughContext="#pop">
|
||||||
<DetectChar attribute="Reference-Link Target" context="#pop!reflinktarget-title" char=">"/>
|
<DetectChar attribute="Reference-Link Target" context="#pop!reflinktarget-title" char=">"/>
|
||||||
<RegExpr attribute="Reference-Link Target: Link" String="&link;"/>
|
<RegExpr attribute="Reference-Link Target: Link" String="&link;"/>
|
||||||
</context>
|
</context>
|
||||||
<context name="reflinktarget-title" attribute="Reference-Link Target" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="reflinktarget-title" attribute="Reference-Link Target" lineEndContext="#pop" fallthroughContext="#pop">
|
||||||
<DetectSpaces attribute="Reference-Link Target"/>
|
<DetectSpaces attribute="Reference-Link Target"/>
|
||||||
<RegExpr attribute="Reference-Link Target" context="#pop" String=""(?:\\.|[^"\\])*""/>
|
<RegExpr attribute="Reference-Link Target" context="#pop" String=""(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^\)\\])*\)"/>
|
||||||
<RegExpr attribute="Reference-Link Target" context="#pop" String="'(?:\\.|[^'\\])*'"/>
|
|
||||||
<RegExpr attribute="Reference-Link Target" context="#pop" String="\((?:\\.|[^\)\\])*\)"/>
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Image -->
|
<!-- Image -->
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
Enhance tr/// and y/// support.
|
Enhance tr/// and y/// support.
|
||||||
-->
|
-->
|
||||||
<language name="Perl" version="13" kateversion="5.0" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
|
<language name="Perl" version="17" kateversion="5.0" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="keywords">
|
<list name="keywords">
|
||||||
<item>if</item>
|
<item>if</item>
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
</list>
|
</list>
|
||||||
<contexts>
|
<contexts>
|
||||||
<context name="normal" attribute="Normal Text" lineEndContext="#stay">
|
<context name="normal" attribute="Normal Text" lineEndContext="#stay">
|
||||||
<RegExpr attribute="Keyword" context="#stay" String="^#!\/.*" />
|
<RegExpr attribute="Keyword" context="#stay" String="^#!\/.*" column="0" />
|
||||||
<StringDetect attribute="Keyword" context="data_handle" String="__DATA__" firstNonSpace="true" />
|
<StringDetect attribute="Keyword" context="data_handle" String="__DATA__" firstNonSpace="true" />
|
||||||
<StringDetect attribute="Keyword" context="#stay" String="__END__" firstNonSpace="true"/>
|
<StringDetect attribute="Keyword" context="#stay" String="__END__" firstNonSpace="true"/>
|
||||||
<RegExpr attribute="Keyword" context="sub_name_def" String="\bsub\s+" />
|
<RegExpr attribute="Keyword" context="sub_name_def" String="\bsub\s+" />
|
||||||
@@ -347,7 +347,7 @@
|
|||||||
<keyword attribute="Operator" context="#stay" String="operators" />
|
<keyword attribute="Operator" context="#stay" String="operators" />
|
||||||
<keyword attribute="Function" context="#stay" String="functions" />
|
<keyword attribute="Function" context="#stay" String="functions" />
|
||||||
<keyword attribute="Pragma" context="#stay" String="pragmas" />
|
<keyword attribute="Pragma" context="#stay" String="pragmas" />
|
||||||
<RegExpr attribute="Pod" context="pod" String="\=\w+(\s|$)" column="0" beginRegion="POD"/>
|
<RegExpr attribute="Pod" context="pod" String="^\=\w+(\s|$)" column="0" beginRegion="POD"/>
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<DetectChar attribute="Comment" context="comment" char="#" />
|
<DetectChar attribute="Comment" context="comment" char="#" />
|
||||||
|
|
||||||
@@ -384,8 +384,7 @@
|
|||||||
|
|
||||||
<RegExpr attribute="Operator" context="find_pattern" String="\b(?:m|qr)(?=\s*[^\w\s\]})])" />
|
<RegExpr attribute="Operator" context="find_pattern" String="\b(?:m|qr)(?=\s*[^\w\s\]})])" />
|
||||||
|
|
||||||
<RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*//?\=?" />
|
<RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*//?\=?|[<>"':]//?\=?" />
|
||||||
<RegExpr attribute="Normal Text" context="#stay" String="[<>"':]//?\=?" />
|
|
||||||
<!-- Avoid conflicts between operators / and // -->
|
<!-- Avoid conflicts between operators / and // -->
|
||||||
<StringDetect attribute="Normal Text" context="#stay" String="//=" />
|
<StringDetect attribute="Normal Text" context="#stay" String="//=" />
|
||||||
<Detect2Chars attribute="Normal Text" context="#stay" char="/" char1="/" />
|
<Detect2Chars attribute="Normal Text" context="#stay" char="/" char1="/" />
|
||||||
@@ -428,15 +427,7 @@
|
|||||||
<!-- ====== Contexts for strings ===== -->
|
<!-- ====== Contexts for strings ===== -->
|
||||||
<context name="ipstring_internal" attribute="String (interpolated)" lineEndContext="#stay">
|
<context name="ipstring_internal" attribute="String (interpolated)" lineEndContext="#stay">
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\c[^\s\\]" />
|
<RegExpr attribute="String Special Character" context="#stay" String="\\c[^\s\\]|\\g(\{(\w+|\-\d+)\}|\d+)|\\k(\{\w+\}|<\w+>|'\w+')|\\N\{[^\{\}]*\}|\\o\{[0-7]+\}|\\[pP](\{\w+\}|P)|\\x([0-9a-fA-F]{2}|\{[0-9a-fA-F]+\})|\\[0-7]{3}|\\[1aAbBdDeEfFGhHKlLnNQrRsStuUvVwWXzZ]" />
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\g(\{(\w+|\-\d+)\}|\d+)" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\k(\{\w+\}|<\w+>|'\w+')" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\N\{[^\{\}]*\}" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\o\{[0-7]+\}" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\[pP](\{\w+\}|P)" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\x([0-9a-fA-F]{2}|\{[0-9a-fA-F]+\})" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\[0-7]{3}" />
|
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\\[1aAbBdDeEfFGhHKlLnNQrRsStuUvVwWXzZ]" />
|
|
||||||
<RegExpr attribute="String (interpolated)" context="#stay" String="\\." />
|
<RegExpr attribute="String (interpolated)" context="#stay" String="\\." />
|
||||||
<RegExpr attribute="Normal Text" context="find_variable_unsafe" String="(?:[\$@]\S|%([\w\{\-\+!]|\^H))" lookAhead="true" />
|
<RegExpr attribute="Normal Text" context="find_variable_unsafe" String="(?:[\$@]\S|%([\w\{\-\+!]|\^H))" lookAhead="true" />
|
||||||
</context>
|
</context>
|
||||||
@@ -465,7 +456,7 @@
|
|||||||
<IncludeRules context="ipstring_internal" />
|
<IncludeRules context="ipstring_internal" />
|
||||||
</context>
|
</context>
|
||||||
<context name="ip_string_6" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
<context name="ip_string_6" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
||||||
<RegExpr attribute="String (interpolated)" context="#stay" String="\%1" dynamic="true" />
|
<StringDetect attribute="String (interpolated)" context="#stay" String="\%1" dynamic="true" />
|
||||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="String"/>
|
<DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="String"/>
|
||||||
<IncludeRules context="ipstring_internal" />
|
<IncludeRules context="ipstring_internal" />
|
||||||
</context>
|
</context>
|
||||||
@@ -508,7 +499,7 @@
|
|||||||
<context name="string_6" attribute="String" lineEndContext="#stay" dynamic="true">
|
<context name="string_6" attribute="String" lineEndContext="#stay" dynamic="true">
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||||
<RegExpr attribute="String Special Character" context="#stay" String="\%1" dynamic="true"/>
|
<StringDetect attribute="String Special Character" context="#stay" String="\%1" dynamic="true"/>
|
||||||
<DetectChar attribute="Operator" context="#pop#pop" char="1" dynamic="true" endRegion="String" />
|
<DetectChar attribute="Operator" context="#pop#pop" char="1" dynamic="true" endRegion="String" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -605,10 +596,7 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="tr" attribute="Pattern" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
<context name="tr" attribute="Pattern" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
||||||
<RegExpr attribute="Pattern" context="#pop" String="\([^)]*\)\s*\(?:[^)]*\)" />
|
<RegExpr attribute="Pattern" context="#pop" String="\([^)]*\)\s*\(?:[^)]*\)|\{[^}]*\}\s*\{[^}]*\}|\[[^]]*\]\s*\[[^\]]*\]|([^a-zA-Z0-9_\s[\]{}()]).*?\1.*?\1"/>
|
||||||
<RegExpr attribute="Pattern" context="#pop" String="\{[^}]*\}\s*\{[^}]*\}" />
|
|
||||||
<RegExpr attribute="Pattern" context="#pop" String="\[[^]]*\]\s*\[[^\]]*\]" />
|
|
||||||
<RegExpr attribute="Pattern" context="#pop" String="([^a-zA-Z0-9_\s[\]{}()]).*\1.*\1" minimal="true"/>
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- ====== PATTERNs ====== -->
|
<!-- ====== PATTERNs ====== -->
|
||||||
@@ -629,7 +617,6 @@
|
|||||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=%1)" dynamic="true" />
|
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=%1)" dynamic="true" />
|
||||||
<RegExpr attribute="Operator" context="#pop#pop" String="%1[cgimosx]*" dynamic="true" endRegion="Pattern" />
|
<RegExpr attribute="Operator" context="#pop#pop" String="%1[cgimosx]*" dynamic="true" endRegion="Pattern" />
|
||||||
<IncludeRules context="regex_pattern_internal_ip" />
|
<IncludeRules context="regex_pattern_internal_ip" />
|
||||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=\%1)" dynamic="true" />
|
|
||||||
</context>
|
</context>
|
||||||
<context name="pattern_brace" attribute="Pattern" lineEndContext="#stay">
|
<context name="pattern_brace" attribute="Pattern" lineEndContext="#stay">
|
||||||
<RegExpr attribute="Operator" context="#pop#pop" String="\}[cgimosx]*" endRegion="Pattern" />
|
<RegExpr attribute="Operator" context="#pop#pop" String="\}[cgimosx]*" endRegion="Pattern" />
|
||||||
@@ -663,13 +650,7 @@
|
|||||||
<!-- rules internal stuff wrt regex patterns -->
|
<!-- rules internal stuff wrt regex patterns -->
|
||||||
<context name="regex_pattern_internal_rules_1" attribute="Pattern" lineEndContext="#stay">
|
<context name="regex_pattern_internal_rules_1" attribute="Pattern" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Comment" context="comment" char="#" firstNonSpace="true" />
|
<DetectChar attribute="Comment" context="comment" char="#" firstNonSpace="true" />
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\c[^\s\\]" />
|
<RegExpr attribute="Special Variable" context="#stay" String="\\c[^\s\\]|\\g(\{(\w+|\-\d+)\}|\d+)|\\k(\{\w+\}|<\w+>|'\w+')|\\N\{[^\{\}]*\}|\\o\{[0-7]+\}|\\[pP](\{\w+\}|P)|\\x([0-9a-fA-F]{2}|\{[0-9a-fA-F]+\})" />
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\g(\{(\w+|\-\d+)\}|\d+)" />
|
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\k(\{\w+\}|<\w+>|'\w+')" />
|
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\N\{[^\{\}]*\}" />
|
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\o\{[0-7]+\}" />
|
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\[pP](\{\w+\}|P)" />
|
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\x([0-9a-fA-F]{2}|\{[0-9a-fA-F]+\})" />
|
|
||||||
<RegExpr attribute="Pattern Character Class" context="#stay" String="\\[anDdSsWw]" />
|
<RegExpr attribute="Pattern Character Class" context="#stay" String="\\[anDdSsWw]" />
|
||||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\[ABbEGLlNUuQdQZz]" /> <!-- Also?: efFhHKrRtvVX -->
|
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\[ABbEGLlNUuQdQZz]" /> <!-- Also?: efFhHKrRtvVX -->
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\\[\d]+" />
|
<RegExpr attribute="Special Variable" context="#stay" String="\\[\d]+" />
|
||||||
@@ -713,17 +694,10 @@
|
|||||||
<!-- ====== Variables ====== -->
|
<!-- ====== Variables ====== -->
|
||||||
<context name="find_variable" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
<context name="find_variable" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
||||||
<RegExpr attribute="Data Type" context="var_detect" String="\$[#_][\w_]" />
|
<RegExpr attribute="Data Type" context="var_detect" String="\$[#_][\w_]" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="\$[0-9]+" />
|
<RegExpr attribute="Special Variable" context="var_detect" String="\$[0-9]+|[@\$](?:[\+\-_]\B|ARGV\b|INC\b)|[%\$](?:INC\b|ENV\b|SIG\b)|\$\^[A-Z_\]\[\^\?\\]|%([\-\+!]|\^H)" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="[@\$](?:[\+\-_]\B|ARGV\b|INC\b)" />
|
<RegExpr attribute="Data Type" context="var_detect" String="\$\$[\$\w_]|\$+::" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="[%\$](?:INC\b|ENV\b|SIG\b)" />
|
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="\$\^[A-Z_\]\[\^\?\\]" />
|
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="%([\-\+!]|\^H)" />
|
|
||||||
<RegExpr attribute="Data Type" context="var_detect" String="\$\$[\$\w_]" />
|
|
||||||
<RegExpr attribute="Data Type" context="var_detect" String="\$+::" />
|
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
|
<RegExpr attribute="Special Variable" context="var_detect" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
|
||||||
<RegExpr attribute="Data Type" context="var_detect" String="[\$@%]\{\^?[\w_]+\}" />
|
<RegExpr attribute="Data Type" context="var_detect" String="[\$@%]\{\^?[\w_]+\}|[$@%]|\*[a-zA-Z_]+" />
|
||||||
<AnyChar attribute="Data Type" context="var_detect" String="$@%" />
|
|
||||||
<RegExpr attribute="Data Type" context="var_detect" String="\*[a-zA-Z_]+" />
|
|
||||||
<!-- Do not highlight brackets after *, Ex: (... @*) (see bug #391577) -->
|
<!-- Do not highlight brackets after *, Ex: (... @*) (see bug #391577) -->
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\*[^a-zA-Z0-9\s\{\(\)\[\]\}][A-Z]?" />
|
<RegExpr attribute="Special Variable" context="#stay" String="\*[^a-zA-Z0-9\s\{\(\)\[\]\}][A-Z]?" />
|
||||||
<!-- this should be a rare case! -->
|
<!-- this should be a rare case! -->
|
||||||
@@ -732,17 +706,11 @@
|
|||||||
<!-- This does not check fo a trailing slash, for usage in strings. -->
|
<!-- This does not check fo a trailing slash, for usage in strings. -->
|
||||||
<context name="find_variable_unsafe" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
<context name="find_variable_unsafe" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
||||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$[#_][\w_]" />
|
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$[#_][\w_]" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="\$[0-9]+" />
|
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="\$[0-9]+|[@\$](?:[\+\-_]\B|ARGV\b|INC\b)|[%\$](?:INC\b|ENV\b|SIG\b)" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="[@\$](?:[\+\-_]\B|ARGV\b|INC\b)" />
|
<RegExpr attribute="Special Variable" context="var_detect" String="\$\^[A-Z_\]\[\^\?\\]|%([\-\+!]|\^H)" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="[%\$](?:INC\b|ENV\b|SIG\b)" />
|
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$\$[\$\w_]|\$+::" />
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="\$\^[A-Z_\]\[\^\?\\]" />
|
|
||||||
<RegExpr attribute="Special Variable" context="var_detect" String="%([\-\+!]|\^H)" />
|
|
||||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$\$[\$\w_]" />
|
|
||||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$+::" />
|
|
||||||
<RegExpr attribute="Special Variable" context="#stay" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
|
<RegExpr attribute="Special Variable" context="#stay" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
|
||||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="[\$@%]\{\^?[\w_]+\}" />
|
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="[\$@%]\{\^?[\w_]+\}|[$@%]|\*\w+" />
|
||||||
<AnyChar attribute="Data Type" context="var_detect_unsafe" String="$@%" />
|
|
||||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\*\w+" />
|
|
||||||
<AnyChar attribute="Operator" context="#pop" String="$@%*" />
|
<AnyChar attribute="Operator" context="#pop" String="$@%*" />
|
||||||
</context>
|
</context>
|
||||||
<context name="var_detect" attribute="Data Type" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
<context name="var_detect" attribute="Data Type" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
||||||
@@ -767,7 +735,7 @@
|
|||||||
<context name="quote_word" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
<context name="quote_word" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<RegExpr attribute="Normal Text" context="#stay" String="\\%1" dynamic="true" />
|
<StringDetect attribute="Normal Text" context="#stay" String="\%1" dynamic="true" />
|
||||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="Wordlist" />
|
<DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="Wordlist" />
|
||||||
</context>
|
</context>
|
||||||
<context name="quote_word_paren" attribute="Normal Text" lineEndContext="#stay">
|
<context name="quote_word_paren" attribute="Normal Text" lineEndContext="#stay">
|
||||||
@@ -791,26 +759,24 @@
|
|||||||
|
|
||||||
<!-- ====== Here Documents ====== -->
|
<!-- ====== Here Documents ====== -->
|
||||||
<context name="find_here_document" attribute="Normal Text" lineEndContext="#pop" >
|
<context name="find_here_document" attribute="Normal Text" lineEndContext="#pop" >
|
||||||
<RegExpr attribute="Keyword" context="here_document" String="(\w+)\s*;?" />
|
<RegExpr attribute="Keyword" context="here_document" String="(?|(\w+)\s*;?|\s*"([^"]+)"\s*;?|\s*`([^`]+)`\s*;?)" />
|
||||||
<RegExpr attribute="Keyword" context="here_document" String="\s*"([^"]+)"\s*;?" />
|
|
||||||
<RegExpr attribute="Keyword" context="here_document" String="\s*`([^`]+)`\s*;?" />
|
|
||||||
<RegExpr attribute="Keyword" context="here_document_dumb" String="\s*'([^']+)'\s*;?" />
|
<RegExpr attribute="Keyword" context="here_document_dumb" String="\s*'([^']+)'\s*;?" />
|
||||||
</context>
|
</context>
|
||||||
<context name="here_document" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
<context name="here_document" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
||||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
|
<RegExpr attribute="Keyword" context="#pop#pop" String="^%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||||
<RegExpr attribute="Keyword" context="here_document" String="\=\s*<<\s*["']?([A-Z0-9_\-]+)["']?" beginRegion="HEREDoc" />
|
<RegExpr attribute="Keyword" context="here_document" String="\=\s*<<\s*["']?([A-Z0-9_\-]+)["']?" beginRegion="HEREDoc" />
|
||||||
<IncludeRules context="ipstring_internal" />
|
<IncludeRules context="ipstring_internal" />
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
</context>
|
</context>
|
||||||
<context name="here_document_dumb" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
<context name="here_document_dumb" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
||||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
|
<StringDetect attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- ====== Misc ====== -->
|
<!-- ====== Misc ====== -->
|
||||||
<context name="data_handle" attribute="Data" lineEndContext="#stay">
|
<context name="data_handle" attribute="Data" lineEndContext="#stay">
|
||||||
<RegExpr attribute="Pod" context="pod" String="\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s+.*" column="0" beginRegion="POD"/>
|
<RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s+.*" column="0" beginRegion="POD"/>
|
||||||
<StringDetect attribute="Keyword" context="normal" String="__END__" firstNonSpace="true" />
|
<StringDetect attribute="Keyword" context="normal" String="__END__" firstNonSpace="true" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -841,14 +807,13 @@
|
|||||||
<context name="pod" attribute="Pod" lineEndContext="#stay">
|
<context name="pod" attribute="Pod" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<RegExpr attribute="Pod" context="#stay" String="\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" column="0" beginRegion="POD" endRegion="POD"/>
|
<RegExpr attribute="Pod" context="#stay" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" column="0" beginRegion="POD" endRegion="POD"/>
|
||||||
<StringDetect attribute="Pod" context="Pod" String="=cut" column="0" endRegion="POD"/>
|
<StringDetect attribute="Pod" context="Pod" String="=cut" column="0" endRegion="POD"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="comment" attribute="Comment" lineEndContext="#pop">
|
<context name="comment" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<!DOCTYPE language SYSTEM "language.dtd">
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
<language
|
<language
|
||||||
name="PowerShell"
|
name="PowerShell"
|
||||||
version="7"
|
version="11"
|
||||||
kateversion="5.0"
|
kateversion="5.0"
|
||||||
extensions="*.ps1;*.ps1m;*.ps1d"
|
extensions="*.ps1;*.psm1;*.psd1"
|
||||||
section="Scripts"
|
section="Scripts"
|
||||||
author="Motoki Kashihara (motoki8791@gmail.com); Michael Lombardi (Michael.T.Lombardi@outlook.com)"
|
author="Motoki Kashihara (motoki8791@gmail.com); Michael Lombardi (Michael.T.Lombardi@outlook.com)"
|
||||||
casesensitive="0"
|
casesensitive="0"
|
||||||
@@ -884,16 +884,14 @@
|
|||||||
<Detect2Chars attribute="Comment" context="Commentar 2" char="<" char1="#" beginRegion="CommentRegion"/>
|
<Detect2Chars attribute="Comment" context="Commentar 2" char="<" char1="#" beginRegion="CommentRegion"/>
|
||||||
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="block1"/>
|
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="block1"/>
|
||||||
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="block1"/>
|
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="block1"/>
|
||||||
<RegExpr attribute="Keyword" context="#stay" String="\b\$global(?=\s+(:))"/>
|
<RegExpr attribute="Keyword" context="#stay" String="\b\$(global|script)(?=\s+(:))"/>
|
||||||
<RegExpr attribute="Keyword" context="#stay" String="\b\$script(?=\s+(:))"/>
|
|
||||||
<RegExpr attribute="Variable" context="#stay" String="\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" />
|
<RegExpr attribute="Variable" context="#stay" String="\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" />
|
||||||
<keyword attribute="Special Variable" context="#stay" String="special-variables"/>
|
<keyword attribute="Special Variable" context="#stay" String="special-variables"/>
|
||||||
<DetectChar attribute="Symbol" context="Member" char="." />
|
<DetectChar attribute="Symbol" context="Member" char="." />
|
||||||
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/*<=>?[]|~^;"/>
|
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/*<=>?[]|~^;"/>
|
||||||
</context>
|
</context>
|
||||||
<context attribute="String Char" lineEndContext="#stay" name="StringEscape">
|
<context attribute="String Char" lineEndContext="#stay" name="StringEscape">
|
||||||
<RegExpr attribute="String Char" String="`[`"0abefnrtv]" context="#stay"/>
|
<RegExpr attribute="String Char" String="`[`"0abefnrtv]|`u\{[0-9A-Fa-f]+\}" context="#stay"/>
|
||||||
<RegExpr attribute="String Char" String="`u\{[0-9A-Fa-f]+\}" context="#stay"/>
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="String" lineEndContext="#pop" name="String">
|
<context attribute="String" lineEndContext="#pop" name="String">
|
||||||
<IncludeRules context="StringEscape"/>
|
<IncludeRules context="StringEscape"/>
|
||||||
@@ -908,14 +906,12 @@
|
|||||||
</context>
|
</context>
|
||||||
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
|
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Comments"/>
|
||||||
<IncludeRules context="##Modelines"/>
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Comment" context="#pop" char="#" char1=">" endRegion="CommentRegion"/>
|
<Detect2Chars attribute="Comment" context="#pop" char="#" char1=">" endRegion="CommentRegion"/>
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Comments"/>
|
||||||
<IncludeRules context="##Modelines"/>
|
|
||||||
</context>
|
</context>
|
||||||
<context attribute="Cmdlets" lineEndContext="#stay" name="Cmdlet">
|
<context attribute="Cmdlets" lineEndContext="#stay" name="Cmdlet">
|
||||||
<keyword attribute="Function" context="#stay" String="cmdlets"/>
|
<keyword attribute="Function" context="#stay" String="cmdlets"/>
|
||||||
@@ -931,7 +927,7 @@
|
|||||||
<itemData name="HereString" defStyleNum="dsVerbatimString"/>
|
<itemData name="HereString" defStyleNum="dsVerbatimString"/>
|
||||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||||
<itemData name="Cmdlets" defStyleNum="dsBuiltIn" spellChecking="false"/>
|
<itemData name="Cmdlets" defStyleNum="dsBuiltIn" spellChecking="false"/>
|
||||||
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/>
|
<itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/>
|
||||||
<itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>
|
<itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>
|
||||||
<itemData name="Special Variable" defStyleNum="dsVariable" bold="1" spellChecking="false"/>
|
<itemData name="Special Variable" defStyleNum="dsVariable" bold="1" spellChecking="false"/>
|
||||||
</itemDatas>
|
</itemDatas>
|
||||||
|
@@ -4,6 +4,35 @@
|
|||||||
<!ENTITY digitPart "[0-9](?:_?[0-9])*">
|
<!ENTITY digitPart "[0-9](?:_?[0-9])*">
|
||||||
<!ENTITY beforeDigit "(?<![\.\w[:^ascii:]])">
|
<!ENTITY beforeDigit "(?<![\.\w[:^ascii:]])">
|
||||||
<!ENTITY beforePointFloat "(?<![\w[:^ascii:]])">
|
<!ENTITY beforePointFloat "(?<![\w[:^ascii:]])">
|
||||||
|
|
||||||
|
<!-- Python 2 style. Syntax:
|
||||||
|
1. start character '%'
|
||||||
|
2. [optional] Mapping key, e.g. '(foo)'
|
||||||
|
3. [optional] Conversion flags, one of '#0- +'
|
||||||
|
4. [optional] Minimum width, integer or '*'
|
||||||
|
5. [optional] Precision, '.' followed by integer or '*'
|
||||||
|
6. [optional] Length modifier, one of 'hlL'
|
||||||
|
7. conversion type, one of 'crsdiouxXeEfFgG%'
|
||||||
|
[Special cases: %prog and %default - see http://docs.python.org/library/optparse.html]
|
||||||
|
-->
|
||||||
|
<!ENTITY strsubstitution_py2 "%(?:(?:\([a-zA-Z0-9_]+\))?[#0\- +]?(?:[1-9][0-9]*|\*)?(?:\.(?:[1-9][0-9]*|\*))?[hlL]?[crsdiouxXeEfFgG%]|prog|default)">
|
||||||
|
<!-- http://docs.python.org/2/library/string.html#format-string-syntax:
|
||||||
|
replacement_field ::= "{" [field_name] ["!" conversion] [":" format_spec] "}"
|
||||||
|
field_name ::= arg_name ("." attribute_name | "[" element_index "]")*
|
||||||
|
arg_name ::= [identifier | integer]
|
||||||
|
attribute_name ::= identifier
|
||||||
|
element_index ::= integer | index_string
|
||||||
|
index_string ::= <any source character except "]"> +
|
||||||
|
conversion ::= "r" | "s"
|
||||||
|
format_spec ::= [[fill]align][sign][#][0][width][,][.precision][type]
|
||||||
|
fill ::= <any character>
|
||||||
|
align ::= "<" | ">" | "=" | "^"
|
||||||
|
sign ::= "+" | "-" | " "
|
||||||
|
width ::= integer
|
||||||
|
precision ::= integer
|
||||||
|
type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
|
||||||
|
-->
|
||||||
|
<!ENTITY strsubstitution_py3 "\{(?:(?:[a-zA-Z0-9_]+|[0-9]+)(?:\.[a-zA-Z0-9_]+|\[[^ \]]+\])*)?(?:![rs])?(?::(?:[^}]?[<>=^])?[ +-]?#?0?[0-9]*(?:\.[0-9]+)?[bcdeEfFgGnosxX%]?)?\}">
|
||||||
]>
|
]>
|
||||||
<!-- Python syntax highlightning v0.9 by Per Wigren -->
|
<!-- Python syntax highlightning v0.9 by Per Wigren -->
|
||||||
<!-- Python syntax highlighting v1.9 by Michael Bueker (improved keyword differentiation) -->
|
<!-- Python syntax highlighting v1.9 by Michael Bueker (improved keyword differentiation) -->
|
||||||
@@ -19,7 +48,7 @@
|
|||||||
<!-- v2.07 add support for %prog and co, see bug 142832 -->
|
<!-- v2.07 add support for %prog and co, see bug 142832 -->
|
||||||
<!-- v2.08 add missing overloaders, new Python 3 statements, builtins, and keywords -->
|
<!-- v2.08 add missing overloaders, new Python 3 statements, builtins, and keywords -->
|
||||||
<!-- v2.29 recognize escape sequenzes correctly -->
|
<!-- v2.29 recognize escape sequenzes correctly -->
|
||||||
<language name="Python" version="12" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license="">
|
<language name="Python" version="14" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license="">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="import">
|
<list name="import">
|
||||||
<item>import</item>
|
<item>import</item>
|
||||||
@@ -355,8 +384,7 @@
|
|||||||
<RegExpr attribute="Binary" String="&beforeDigit;0[bB](?:_?[01])+\b" context="#stay"/>
|
<RegExpr attribute="Binary" String="&beforeDigit;0[bB](?:_?[01])+\b" context="#stay"/>
|
||||||
<RegExpr attribute="Octal" String="&beforeDigit;0[oO](?:_?[0-7])+\b" context="#stay"/>
|
<RegExpr attribute="Octal" String="&beforeDigit;0[oO](?:_?[0-7])+\b" context="#stay"/>
|
||||||
<!-- Float: 1.1 ; 1. ; .1 ; 1e3 ; 1.1e3 ; 1.e3 ; .1e3 -->
|
<!-- Float: 1.1 ; 1. ; .1 ; 1e3 ; 1.1e3 ; 1.e3 ; .1e3 -->
|
||||||
<RegExpr attribute="Float" String="(?:&beforeDigit;&digitPart;(?:\.(?:&digitPart;)?)?|&beforePointFloat;\.&digitPart;)[eE][\+\-]?&digitPart;\b" context="#stay"/>
|
<RegExpr attribute="Float" String="(?:&beforeDigit;&digitPart;(?:\.(?:&digitPart;)?)?|&beforePointFloat;\.&digitPart;)[eE][\+\-]?&digitPart;\b|(?:&beforeDigit;&digitPart;\.(?:&digitPart;\b)?|&beforePointFloat;\.&digitPart;\b)" context="#stay"/>
|
||||||
<RegExpr attribute="Float" String="(?:&beforeDigit;&digitPart;\.(?:&digitPart;\b)?|&beforePointFloat;\.&digitPart;\b)" context="#stay"/>
|
|
||||||
<!-- Decimal: 123 ; 000 -->
|
<!-- Decimal: 123 ; 000 -->
|
||||||
<RegExpr attribute="Int" String="&beforeDigit;(?:[1-9](?:_?\d)*|0(?:_?0)*)[lL]?\b" context="#stay"/>
|
<RegExpr attribute="Int" String="&beforeDigit;(?:[1-9](?:_?\d)*|0(?:_?0)*)[lL]?\b" context="#stay"/>
|
||||||
|
|
||||||
@@ -393,20 +421,20 @@
|
|||||||
<RegExpr attribute="String" String="u?'" insensitive="true" context="Single A-string"/>
|
<RegExpr attribute="String" String="u?'" insensitive="true" context="Single A-string"/>
|
||||||
<RegExpr attribute="String" String="u?"" insensitive="true" context="Single Q-string"/>
|
<RegExpr attribute="String" String="u?"" insensitive="true" context="Single Q-string"/>
|
||||||
|
|
||||||
<RegExpr attribute="Raw String" String="(u?r|ru)'''" insensitive="true" context="Raw Triple A-string" beginRegion="Triple A-region"/>
|
<RegExpr attribute="Raw String" String="(?:u?r|ru)'''" insensitive="true" context="Raw Triple A-string" beginRegion="Triple A-region"/>
|
||||||
<RegExpr attribute="Raw String" String="(u?r|ru)"""" insensitive="true" context="Raw Triple Q-string" beginRegion="Triple Q-region"/>
|
<RegExpr attribute="Raw String" String="(?:u?r|ru)"""" insensitive="true" context="Raw Triple Q-string" beginRegion="Triple Q-region"/>
|
||||||
<RegExpr attribute="Raw String" String="(u?r|ru)'" insensitive="true" context="Raw A-string"/>
|
<RegExpr attribute="Raw String" String="(?:u?r|ru)'" insensitive="true" context="Raw A-string"/>
|
||||||
<RegExpr attribute="Raw String" String="(u?r|ru)"" insensitive="true" context="Raw Q-string"/>
|
<RegExpr attribute="Raw String" String="(?:u?r|ru)"" insensitive="true" context="Raw Q-string"/>
|
||||||
|
|
||||||
<StringDetect attribute="F-String" String="f'''" insensitive="true" context="Triple A-F-String" beginRegion="Triple A-region"/>
|
<StringDetect attribute="F-String" String="f'''" insensitive="true" context="Triple A-F-String" beginRegion="Triple A-region"/>
|
||||||
<StringDetect attribute="F-String" String="f"""" insensitive="true" context="Triple Q-F-String" beginRegion="Triple Q-region"/>
|
<StringDetect attribute="F-String" String="f"""" insensitive="true" context="Triple Q-F-String" beginRegion="Triple Q-region"/>
|
||||||
<StringDetect attribute="F-String" String="f'" insensitive="true" context="Single A-F-String"/>
|
<StringDetect attribute="F-String" String="f'" insensitive="true" context="Single A-F-String"/>
|
||||||
<StringDetect attribute="F-String" String="f"" insensitive="true" context="Single Q-F-String"/>
|
<StringDetect attribute="F-String" String="f"" insensitive="true" context="Single Q-F-String"/>
|
||||||
|
|
||||||
<RegExpr attribute="Raw F-String" String="(fr|rf)'''" insensitive="true" context="Raw Triple A-F-String" beginRegion="Triple A-region"/>
|
<RegExpr attribute="Raw F-String" String="(?:fr|rf)'''" insensitive="true" context="Raw Triple A-F-String" beginRegion="Triple A-region"/>
|
||||||
<RegExpr attribute="Raw F-String" String="(fr|rf)"""" insensitive="true" context="Raw Triple Q-F-String" beginRegion="Triple Q-region"/>
|
<RegExpr attribute="Raw F-String" String="(?:fr|rf)"""" insensitive="true" context="Raw Triple Q-F-String" beginRegion="Triple Q-region"/>
|
||||||
<RegExpr attribute="Raw F-String" String="(fr|rf)'" insensitive="true" context="Raw A-F-String"/>
|
<RegExpr attribute="Raw F-String" String="(?:fr|rf)'" insensitive="true" context="Raw A-F-String"/>
|
||||||
<RegExpr attribute="Raw F-String" String="(fr|rf)"" insensitive="true" context="Raw Q-F-String"/>
|
<RegExpr attribute="Raw F-String" String="(?:fr|rf)"" insensitive="true" context="Raw Q-F-String"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="CommentVariants" attribute="Normal Text" lineEndContext="#stay">
|
<context name="CommentVariants" attribute="Normal Text" lineEndContext="#stay">
|
||||||
@@ -417,10 +445,10 @@
|
|||||||
<RegExpr attribute="Comment" String="u?'" insensitive="true" firstNonSpace="true" context="Single A-comment"/>
|
<RegExpr attribute="Comment" String="u?'" insensitive="true" firstNonSpace="true" context="Single A-comment"/>
|
||||||
<RegExpr attribute="Comment" String="u?"" insensitive="true" firstNonSpace="true" context="Single Q-comment"/>
|
<RegExpr attribute="Comment" String="u?"" insensitive="true" firstNonSpace="true" context="Single Q-comment"/>
|
||||||
|
|
||||||
<RegExpr attribute="Comment" String="(u?r|ru)'''" insensitive="true" firstNonSpace="true" context="Triple A-comment" beginRegion="Triple A-region"/>
|
<RegExpr attribute="Comment" String="(?:u?r|ru)'''" insensitive="true" firstNonSpace="true" context="Triple A-comment" beginRegion="Triple A-region"/>
|
||||||
<RegExpr attribute="Comment" String="(u?r|ru)"""" insensitive="true" firstNonSpace="true" context="Triple Q-comment" beginRegion="Triple Q-region"/>
|
<RegExpr attribute="Comment" String="(?:u?r|ru)"""" insensitive="true" firstNonSpace="true" context="Triple Q-comment" beginRegion="Triple Q-region"/>
|
||||||
<RegExpr attribute="Comment" String="(u?r|ru)'" insensitive="true" firstNonSpace="true" context="Single A-comment"/>
|
<RegExpr attribute="Comment" String="(?:u?r|ru)'" insensitive="true" firstNonSpace="true" context="Single A-comment"/>
|
||||||
<RegExpr attribute="Comment" String="(u?r|ru)"" insensitive="true" firstNonSpace="true" context="Single Q-comment"/>
|
<RegExpr attribute="Comment" String="(?:u?r|ru)"" insensitive="true" firstNonSpace="true" context="Single Q-comment"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Dictionary" attribute="Normal Text" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Dictionary" attribute="Normal Text" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
@@ -448,66 +476,38 @@
|
|||||||
|
|
||||||
<context name="Hash comment" attribute="Comment" lineEndContext="#pop">
|
<context name="Hash comment" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Triple A-comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Triple A-comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<StringDetect attribute="Comment" String="'''" context="#pop" endRegion="Triple A-region"/>
|
<StringDetect attribute="Comment" String="'''" context="#pop" endRegion="Triple A-region"/>
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Triple Q-comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Triple Q-comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<StringDetect attribute="Comment" String=""""" context="#pop" endRegion="Triple Q-region"/>
|
<StringDetect attribute="Comment" String=""""" context="#pop" endRegion="Triple Q-region"/>
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Single A-comment" attribute="Comment" lineEndContext="#stay">
|
<context name="Single A-comment" attribute="Comment" lineEndContext="#stay">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<DetectChar attribute="Comment" char="'" context="#pop"/>
|
<DetectChar attribute="Comment" char="'" context="#pop"/>
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Single Q-comment" attribute="Comment" lineEndContext="#stay">
|
<context name="Single Q-comment" attribute="Comment" lineEndContext="#stay">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<DetectChar attribute="Comment" char=""" context="#pop"/>
|
<DetectChar attribute="Comment" char=""" context="#pop"/>
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Strings -->
|
<!-- Strings -->
|
||||||
|
|
||||||
<!-- format characters -->
|
<!-- format characters -->
|
||||||
<context name="stringformat" attribute="String Substitution" lineEndContext="#stay">
|
<context name="stringformat" attribute="String Substitution" lineEndContext="#stay">
|
||||||
<!-- Python 2 style. Syntax:
|
<RegExpr attribute="String Substitution" String="&strsubstitution_py2;|&strsubstitution_py3;" context="#stay"/>
|
||||||
1. start character '%'
|
|
||||||
2. [optional] Mapping key, e.g. '(foo)'
|
|
||||||
3. [optional] Conversion flags, one of '#0- +'
|
|
||||||
4. [optional] Minimum width, integer or '*'
|
|
||||||
5. [optional] Precision, '.' followed by integer or '*'
|
|
||||||
6. [optional] Length modifier, one of 'hlL'
|
|
||||||
7. conversion type, one of 'crsdiouxXeEfFgG%'
|
|
||||||
[Special cases: %prog and %default - see http://docs.python.org/library/optparse.html]
|
|
||||||
-->
|
|
||||||
<RegExpr attribute="String Substitution" String="%((\([a-zA-Z0-9_]+\))?[#0\- +]?([1-9][0-9]*|\*)?(\.([1-9][0-9]*|\*))?[hlL]?[crsdiouxXeEfFgG%]|prog|default)" context="#stay"/>
|
|
||||||
<!-- http://docs.python.org/2/library/string.html#format-string-syntax:
|
|
||||||
replacement_field ::= "{" [field_name] ["!" conversion] [":" format_spec] "}"
|
|
||||||
field_name ::= arg_name ("." attribute_name | "[" element_index "]")*
|
|
||||||
arg_name ::= [identifier | integer]
|
|
||||||
attribute_name ::= identifier
|
|
||||||
element_index ::= integer | index_string
|
|
||||||
index_string ::= <any source character except "]"> +
|
|
||||||
conversion ::= "r" | "s"
|
|
||||||
format_spec ::= [[fill]align][sign][#][0][width][,][.precision][type]
|
|
||||||
fill ::= <any character>
|
|
||||||
align ::= "<" | ">" | "=" | "^"
|
|
||||||
sign ::= "+" | "-" | " "
|
|
||||||
width ::= integer
|
|
||||||
precision ::= integer
|
|
||||||
type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
|
|
||||||
-->
|
|
||||||
<RegExpr attribute="String Substitution" String="\{(([a-zA-Z0-9_]+|[0-9]+)(\.[a-zA-Z0-9_]+|\[[^ \]]+\])*)?(![rs])?(:([^}]?[<>=^])?[ +-]?#?0?[0-9]*(\.[0-9]+)?[bcdeEfFgGnosxX%]?)?\}" context="#stay"/>
|
|
||||||
<Detect2Chars attribute="String Substitution" char="{" char1="{" context="#stay" />
|
<Detect2Chars attribute="String Substitution" char="{" char1="{" context="#stay" />
|
||||||
<Detect2Chars attribute="String Substitution" char="}" char1="}" context="#stay" />
|
<Detect2Chars attribute="String Substitution" char="}" char1="}" context="#stay" />
|
||||||
</context>
|
</context>
|
||||||
@@ -517,12 +517,7 @@
|
|||||||
<!-- As this highlighting style is for both, Python 2 and 3,
|
<!-- As this highlighting style is for both, Python 2 and 3,
|
||||||
we do not know if a normal string is “unicode” or not. So we
|
we do not know if a normal string is “unicode” or not. So we
|
||||||
-->
|
-->
|
||||||
<RegExpr attribute="String Char" String="\\[\\'"abfnrtv]" context="#stay"/>
|
<RegExpr attribute="String Char" String="\\[\\'"abfnrtv]|\\[0-7]{1,3}|\\x[0-9A-Fa-f]{2}|\\u[0-9A-Fa-f]{4}|\\U[0-9A-Fa-f]{8}|\\N\{[a-zA-Z0-9\- ]+\}" context="#stay"/>
|
||||||
<RegExpr attribute="String Char" String="\\[0-7]{1,3}" context="#stay"/>
|
|
||||||
<RegExpr attribute="String Char" String="\\x[0-9A-Fa-f]{2}" context="#stay"/>
|
|
||||||
<RegExpr attribute="String Char" String="\\u[0-9A-Fa-f]{4}" context="#stay"/>
|
|
||||||
<RegExpr attribute="String Char" String="\\U[0-9A-Fa-f]{8}" context="#stay"/>
|
|
||||||
<RegExpr attribute="String Char" String="\\N\{[a-zA-Z0-9\- ]+\}" context="#stay"/>
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- f-literals -->
|
<!-- f-literals -->
|
||||||
@@ -532,7 +527,7 @@
|
|||||||
</context>
|
</context>
|
||||||
<context name="String Interpolation" attribute="String Substitution" lineEndContext="#stay">
|
<context name="String Interpolation" attribute="String Substitution" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Error" char="\" context="#pop"/>
|
<DetectChar attribute="Error" char="\" context="#pop"/>
|
||||||
<RegExpr attribute="String Substitution" String="(![rs])?(:([^}]?[<>=^])?[ +-]?#?0?[0-9]*(\.[0-9]+)?[bcdeEfFgGnosxX%]?)?\}" context="#pop"/>
|
<RegExpr attribute="String Substitution" String="(?:![rs])?(?::(?:[^}]?[<>=^])?[ +-]?#?0?[0-9]*(?:\.[0-9]+)?[bcdeEfFgGnosxX%]?)?\}" context="#pop"/>
|
||||||
<IncludeRules context="Normal"/> <!-- TODO: create expression context instead -->
|
<IncludeRules context="Normal"/> <!-- TODO: create expression context instead -->
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -552,50 +547,50 @@
|
|||||||
<context name="Triple A-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Triple A-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<StringDetect attribute="String" String="'''" context="#pop#CheckForString" endRegion="Triple A-region"/>
|
<StringDetect attribute="String" String="'''" context="#pop!#CheckForString" endRegion="Triple A-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw Triple A-string" attribute="Raw String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Raw Triple A-string" attribute="Raw String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<HlCStringChar attribute="Raw String" context="#stay"/>
|
<HlCStringChar attribute="Raw String" context="#stay"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<StringDetect attribute="Raw String" String="'''" context="#pop#CheckForString" endRegion="Triple A-region"/>
|
<StringDetect attribute="Raw String" String="'''" context="#pop!#CheckForString" endRegion="Triple A-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Triple A-F-String" attribute="F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Triple A-F-String" attribute="F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<StringDetect attribute="F-String" String="'''" context="#pop#CheckForString" endRegion="Triple A-region"/>
|
<StringDetect attribute="F-String" String="'''" context="#pop!#CheckForString" endRegion="Triple A-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw Triple A-F-String" attribute="Raw F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Raw Triple A-F-String" attribute="Raw F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<StringDetect attribute="Raw F-String" String="'''" context="#pop#CheckForString" endRegion="Triple A-region"/>
|
<StringDetect attribute="Raw F-String" String="'''" context="#pop!#CheckForString" endRegion="Triple A-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Triple-quoted Q-strings -->
|
<!-- Triple-quoted Q-strings -->
|
||||||
<context name="Triple Q-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Triple Q-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<StringDetect attribute="String" String=""""" context="#pop#CheckForString" endRegion="Triple Q-region"/>
|
<StringDetect attribute="String" String=""""" context="#pop!#CheckForString" endRegion="Triple Q-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw Triple Q-string" attribute="Raw String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Raw Triple Q-string" attribute="Raw String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<HlCStringChar attribute="Raw String" context="#stay"/>
|
<HlCStringChar attribute="Raw String" context="#stay"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<StringDetect attribute="Raw String" String=""""" context="#pop#CheckForString" endRegion="Triple Q-region"/>
|
<StringDetect attribute="Raw String" String=""""" context="#pop!#CheckForString" endRegion="Triple Q-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Triple Q-F-String" attribute="F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Triple Q-F-String" attribute="F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<StringDetect attribute="F-String" String=""""" context="#pop#CheckForString" endRegion="Triple Q-region"/>
|
<StringDetect attribute="F-String" String=""""" context="#pop!#CheckForString" endRegion="Triple Q-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw Triple Q-F-String" attribute="Raw F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
<context name="Raw Triple Q-F-String" attribute="Raw F-String" lineEndContext="#stay" noIndentationBasedFolding="true">
|
||||||
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<StringDetect attribute="Raw F-String" String=""""" context="#pop#CheckForString" endRegion="Triple Q-region"/>
|
<StringDetect attribute="Raw F-String" String=""""" context="#pop!#CheckForString" endRegion="Triple Q-region"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
|
||||||
@@ -603,50 +598,50 @@
|
|||||||
<context name="Single A-string" attribute="String" lineEndContext="#stay">
|
<context name="Single A-string" attribute="String" lineEndContext="#stay">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<DetectChar attribute="String" char="'" context="#pop#CheckForString"/>
|
<DetectChar attribute="String" char="'" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw A-string" attribute="Raw String" lineEndContext="#stay">
|
<context name="Raw A-string" attribute="Raw String" lineEndContext="#stay">
|
||||||
<HlCStringChar attribute="Raw String" context="#stay"/>
|
<HlCStringChar attribute="Raw String" context="#stay"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<DetectChar attribute="Raw String" char="'" context="#pop#CheckForString"/>
|
<DetectChar attribute="Raw String" char="'" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Single A-F-String" attribute="F-String" lineEndContext="#stay">
|
<context name="Single A-F-String" attribute="F-String" lineEndContext="#stay">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<DetectChar attribute="F-String" char="'" context="#pop#CheckForString"/>
|
<DetectChar attribute="F-String" char="'" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw A-F-String" attribute="Raw F-String" lineEndContext="#stay">
|
<context name="Raw A-F-String" attribute="Raw F-String" lineEndContext="#stay">
|
||||||
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<DetectChar attribute="Raw F-String" char="'" context="#pop#CheckForString"/>
|
<DetectChar attribute="Raw F-String" char="'" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Single-quoted Q-strings -->
|
<!-- Single-quoted Q-strings -->
|
||||||
<context name="Single Q-string" attribute="String" lineEndContext="#stay">
|
<context name="Single Q-string" attribute="String" lineEndContext="#stay">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<DetectChar attribute="String" char=""" context="#pop#CheckForString"/>
|
<DetectChar attribute="String" char=""" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw Q-string" attribute="Raw String" lineEndContext="#stay">
|
<context name="Raw Q-string" attribute="Raw String" lineEndContext="#stay">
|
||||||
<HlCStringChar attribute="Raw String" context="#stay"/>
|
<HlCStringChar attribute="Raw String" context="#stay"/>
|
||||||
<IncludeRules context="stringformat"/>
|
<IncludeRules context="stringformat"/>
|
||||||
<DetectChar attribute="Raw String" char=""" context="#pop#CheckForString"/>
|
<DetectChar attribute="Raw String" char=""" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Single Q-F-String" attribute="F-String" lineEndContext="#stay">
|
<context name="Single Q-F-String" attribute="F-String" lineEndContext="#stay">
|
||||||
<IncludeRules context="stringescape"/>
|
<IncludeRules context="stringescape"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<DetectChar attribute="F-String" char=""" context="#pop#CheckForString"/>
|
<DetectChar attribute="F-String" char=""" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Raw Q-F-String" attribute="Raw F-String" lineEndContext="#stay">
|
<context name="Raw Q-F-String" attribute="Raw F-String" lineEndContext="#stay">
|
||||||
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
<HlCStringChar attribute="Raw F-String" context="#stay"/>
|
||||||
<IncludeRules context="stringinterpolation"/>
|
<IncludeRules context="stringinterpolation"/>
|
||||||
<DetectChar attribute="Raw F-String" char=""" context="#pop#CheckForString"/>
|
<DetectChar attribute="Raw F-String" char=""" context="#pop!#CheckForString"/>
|
||||||
</context>
|
</context>
|
||||||
</contexts>
|
</contexts>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd">
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
<language name="QDoc Configuration"
|
<language name="QDoc Configuration"
|
||||||
version="2"
|
version="3"
|
||||||
kateversion="5.0"
|
kateversion="5.0"
|
||||||
section="Configuration"
|
section="Configuration"
|
||||||
extensions="*.qdocconf"
|
extensions="*.qdocconf"
|
||||||
@@ -113,8 +113,7 @@
|
|||||||
|
|
||||||
<context name="comment-context" attribute="Comment" lineEndContext="#pop">
|
<context name="comment-context" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts"/>
|
<IncludeRules context="##Comments"/>
|
||||||
<IncludeRules context="##Modelines"/>
|
|
||||||
</context>
|
</context>
|
||||||
</contexts>
|
</contexts>
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
|
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
|
||||||
<language name="Ruby" section="Scripts"
|
<language name="Ruby" section="Scripts"
|
||||||
version="12" kateversion="3.3"
|
version="16" kateversion="5.0"
|
||||||
extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile"
|
extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile"
|
||||||
mimetype="application/x-ruby"
|
mimetype="application/x-ruby"
|
||||||
style="ruby" indenter="ruby"
|
style="ruby" indenter="ruby"
|
||||||
@@ -191,19 +191,17 @@
|
|||||||
<LineContinue attribute="Normal Text" context="Line Continue"/>
|
<LineContinue attribute="Normal Text" context="Line Continue"/>
|
||||||
|
|
||||||
<!-- __END__ token on own line. -->
|
<!-- __END__ token on own line. -->
|
||||||
<RegExpr attribute="Keyword" String="__END__$" context="DATA" column="0"/>
|
<RegExpr attribute="Keyword" String="^__END__$" context="DATA" column="0"/>
|
||||||
|
|
||||||
<!-- "shebang" line -->
|
<!-- "shebang" line -->
|
||||||
<RegExpr attribute="Keyword" String="#!\/.*" context="#stay" column="0"/>
|
<RegExpr attribute="Keyword" String="^#!\/.*" context="#stay" column="0"/>
|
||||||
|
|
||||||
<!-- "def" - "end" blocks -->
|
<!-- "def" - "end" blocks -->
|
||||||
<!-- check for statement modifiers with regexes -->
|
<!-- check for statement modifiers with regexes -->
|
||||||
<DetectChar attribute="Operator" char="{" context="Find closing block brace" beginRegion="def block"/>
|
<DetectChar attribute="Operator" char="{" context="Find closing block brace" beginRegion="def block"/>
|
||||||
<RegExpr attribute="Keyword" String="(\=|\(|\[|\{)\s*(if|unless|while|until)\b" context="#stay" beginRegion="def block"/>
|
<DetectChar attribute="Delimiter" char="}" context="check_div_1" endRegion="def block"/>
|
||||||
<RegExpr attribute="Keyword" String="(while|until)\b(?!.*\bdo\b)" context="#stay" beginRegion="def block" />
|
<RegExpr attribute="Keyword" String="[=([]\s*(if|unless|while|until)\b|(while|until)\b(?!.*\bdo\b)|\;\s*(while|until)\b(?!.*\bdo\b)|\;\s*(if|unless)\b" context="#stay" beginRegion="def block"/>
|
||||||
<RegExpr attribute="Keyword" String="\;\s*(while|until)\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
|
|
||||||
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" beginRegion="def block" firstNonSpace="true"/>
|
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" beginRegion="def block" firstNonSpace="true"/>
|
||||||
<RegExpr attribute="Keyword" String="\;\s*(if|unless)\b" context="#stay" beginRegion="def block"/>
|
|
||||||
<WordDetect attribute="Keyword" String="class" context="no_heredoc" beginRegion="def block"/>
|
<WordDetect attribute="Keyword" String="class" context="no_heredoc" beginRegion="def block"/>
|
||||||
<WordDetect attribute="Keyword" String="module" context="#stay" beginRegion="def block"/>
|
<WordDetect attribute="Keyword" String="module" context="#stay" beginRegion="def block"/>
|
||||||
<WordDetect attribute="Keyword" String="begin" context="#stay" beginRegion="def block"/>
|
<WordDetect attribute="Keyword" String="begin" context="#stay" beginRegion="def block"/>
|
||||||
@@ -236,8 +234,7 @@
|
|||||||
<!-- (global) vars starting with $
|
<!-- (global) vars starting with $
|
||||||
Match them before $_.
|
Match them before $_.
|
||||||
-->
|
-->
|
||||||
<RegExpr attribute="Global Variable" String="\$[a-zA-Z_0-9]+" context="check_div_1"/>
|
<RegExpr attribute="Global Variable" String="\$[a-zA-Z_0-9]+|\$\-[a-zA-Z_]\b" context="check_div_1"/>
|
||||||
<RegExpr attribute="Global Variable" String="\$\-[a-zA-Z_]\b" context="check_div_1"/>
|
|
||||||
<!-- special-character globals -->
|
<!-- special-character globals -->
|
||||||
<RegExpr attribute="Default globals" String="\$[\d_*`+@;,.~=\!\$:?'/\\\-\&"><]" context="check_div_1"/>
|
<RegExpr attribute="Default globals" String="\$[\d_*`+@;,.~=\!\$:?'/\\\-\&"><]" context="check_div_1"/>
|
||||||
<RegExpr attribute="Global Constant" String="\b[_A-Z]+[A-Z_0-9]+\b" context="check_div_2"/>
|
<RegExpr attribute="Global Constant" String="\b[_A-Z]+[A-Z_0-9]+\b" context="check_div_2"/>
|
||||||
@@ -269,21 +266,16 @@
|
|||||||
<DetectChar attribute="Operator" char="." context="#stay"/>
|
<DetectChar attribute="Operator" char="." context="#stay"/>
|
||||||
<Detect2Chars attribute="Operator" char="&" char1="&" context="#stay"/>
|
<Detect2Chars attribute="Operator" char="&" char1="&" context="#stay"/>
|
||||||
<Detect2Chars attribute="Operator" char="|" char1="|" context="#stay"/>
|
<Detect2Chars attribute="Operator" char="|" char1="|" context="#stay"/>
|
||||||
<RegExpr attribute="Operator" String="\s[\?\:\%]\s" context="#stay"/>
|
<!-- \s! is regexp hack -->
|
||||||
<RegExpr attribute="Operator" String="[|&<>\^\+*~\-=]+" context="#stay"/>
|
<RegExpr attribute="Operator" String="\s[\?\:\%]\s|[|&<>\^\+*~\-=]+|\s!|/=\s" context="#stay"/>
|
||||||
<!-- regexp hack -->
|
|
||||||
<RegExpr attribute="Operator" String="\s!" context="#stay"/>
|
|
||||||
<RegExpr attribute="Operator" String="/=\s" context="#stay" insensitive="0"/>
|
|
||||||
<Detect2Chars attribute="Operator" char="%" char1="=" context="#stay"/>
|
<Detect2Chars attribute="Operator" char="%" char1="=" context="#stay"/>
|
||||||
<Detect2Chars attribute="Operator" char=":" char1=":" context="Member Access"/>
|
<Detect2Chars attribute="Operator" char=":" char1=":" context="Member Access"/>
|
||||||
|
|
||||||
<RegExpr attribute="Symbol" String=":(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?" context="check_div_1"/>
|
<RegExpr attribute="Symbol" String=":(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?|:\[\]=?" context="check_div_1"/>
|
||||||
<RegExpr attribute="Symbol" String=":\[\]=?" context="check_div_1"/>
|
|
||||||
|
|
||||||
<!-- Do not send to "check_div_1" context!:
|
<!-- Do not send to "check_div_1" context!:
|
||||||
after detecting these rules (": ") there can be a regular expression (see bug: #361875) -->
|
after detecting these rules (": ") there can be a regular expression (see bug: #361875) -->
|
||||||
<RegExpr attribute="Symbol" String="(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?: " context="#stay"/>
|
<RegExpr attribute="Symbol" String="(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?: |\[\]=?: " context="#stay"/>
|
||||||
<RegExpr attribute="Symbol" String="\[\]=?: " context="#stay"/>
|
|
||||||
|
|
||||||
<DetectChar attribute="String" char=""" context="Quoted String"/>
|
<DetectChar attribute="String" char=""" context="Quoted String"/>
|
||||||
<DetectChar attribute="Raw String" char="'" context="Apostrophed String"/>
|
<DetectChar attribute="Raw String" char="'" context="Apostrophed String"/>
|
||||||
@@ -291,14 +283,12 @@
|
|||||||
|
|
||||||
<Detect2Chars attribute="Normal Text" char="?" char1="#" context="#stay"/>
|
<Detect2Chars attribute="Normal Text" char="?" char1="#" context="#stay"/>
|
||||||
|
|
||||||
<RegExpr attribute="Comment" String="#\s*BEGIN.*$" context="#stay" beginRegion="marker" column="0"/>
|
<RegExpr attribute="Comment" String="^#\s*BEGIN.*$" context="#stay" beginRegion="marker" column="0"/>
|
||||||
<RegExpr attribute="Comment" String="#\s*END.*$" context="#stay" endRegion="marker" column="0"/>
|
<RegExpr attribute="Comment" String="^#\s*END.*$" context="#stay" endRegion="marker" column="0"/>
|
||||||
<DetectChar attribute="Comment" char="#" context="General Comment"/>
|
<DetectChar attribute="Comment" char="#" context="General Comment"/>
|
||||||
|
|
||||||
<DetectChar attribute="Delimiter" char="[" context="#stay"/>
|
<DetectChar attribute="Delimiter" char="[" context="#stay"/>
|
||||||
<DetectChar attribute="Delimiter" char="]" context="check_div_1"/>
|
<DetectChar attribute="Delimiter" char="]" context="check_div_1"/>
|
||||||
<DetectChar attribute="Delimiter" char="{" context="#stay" beginRegion="def block"/>
|
|
||||||
<DetectChar attribute="Delimiter" char="}" context="check_div_1" endRegion="def block"/>
|
|
||||||
|
|
||||||
<RegExpr attribute="Instance Variable" String="@[a-zA-Z_0-9]+" context="check_div_1"/>
|
<RegExpr attribute="Instance Variable" String="@[a-zA-Z_0-9]+" context="check_div_1"/>
|
||||||
<RegExpr attribute="Class Variable" String="@@[a-zA-Z_0-9]+" context="check_div_1"/>
|
<RegExpr attribute="Class Variable" String="@@[a-zA-Z_0-9]+" context="check_div_1"/>
|
||||||
@@ -320,20 +310,20 @@
|
|||||||
|
|
||||||
<!-- A slash is always a division operator, even if preceeded by whitespace -->
|
<!-- A slash is always a division operator, even if preceeded by whitespace -->
|
||||||
<context name="check_div_1" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
|
<context name="check_div_1" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Normal Text" String="\s*" context="#stay"/>
|
<DetectSpaces attribute="Normal Text" context="#stay"/>
|
||||||
<AnyChar attribute="Operator" String="/%" context="#pop"/>
|
<AnyChar attribute="Operator" String="/%" context="#pop"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Same as check_div_1, but with double pop to exit the surrounding context -->
|
<!-- Same as check_div_1, but with double pop to exit the surrounding context -->
|
||||||
<context name="check_div_1_pop" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
<context name="check_div_1_pop" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
||||||
<RegExpr attribute="Normal Text" String="\s*" context="#stay"/>
|
<DetectSpaces attribute="Normal Text" context="#stay"/>
|
||||||
<AnyChar attribute="Operator" String="/%" context="#pop#pop"/>
|
<AnyChar attribute="Operator" String="/%" context="#pop#pop"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- A slash is division operator if it's the first character, or if preceeded and followed by whitespace -->
|
<!-- A slash is division operator if it's the first character, or if preceeded and followed by whitespace -->
|
||||||
<context name="check_div_2" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
|
<context name="check_div_2" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
|
||||||
<AnyChar attribute="Operator" String="/%" context="#pop"/>
|
<AnyChar attribute="Operator" String="/%" context="#pop"/>
|
||||||
<RegExpr attribute="Normal Text" String="\s+" context="check_div_2_internal"/>
|
<DetectSpaces attribute="Normal Text" context="check_div_2_internal"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Internal context used by check_div_2 -->
|
<!-- Internal context used by check_div_2 -->
|
||||||
@@ -345,7 +335,7 @@
|
|||||||
<!-- Same as check_div_2, but with double pop to exit the surrounding context -->
|
<!-- Same as check_div_2, but with double pop to exit the surrounding context -->
|
||||||
<context name="check_div_2_pop" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
<context name="check_div_2_pop" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
||||||
<AnyChar attribute="Operator" String="/%" context="#pop#pop"/>
|
<AnyChar attribute="Operator" String="/%" context="#pop#pop"/>
|
||||||
<RegExpr attribute="Normal Text" String="\s+" context="check_div_2_pop_internal"/>
|
<DetectSpaces attribute="Normal Text" context="check_div_2_pop_internal"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- Internal context used by check_div_2_pop -->
|
<!-- Internal context used by check_div_2_pop -->
|
||||||
@@ -355,8 +345,7 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Line Continue" attribute="Normal Text" lineEndContext="#pop">
|
<context name="Line Continue" attribute="Normal Text" lineEndContext="#pop">
|
||||||
<RegExpr attribute="Keyword" String="(while|until)\b(?!.*\bdo\b)" context="#stay" firstNonSpace="true"/>
|
<RegExpr attribute="Keyword" String="(while|until)\b(?!.*\bdo\b)|(if|unless)\b" context="#stay" firstNonSpace="true"/>
|
||||||
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" firstNonSpace="true"/>
|
|
||||||
<IncludeRules context="Normal"/>
|
<IncludeRules context="Normal"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -390,7 +379,7 @@
|
|||||||
<context name="Embedded documentation" attribute="Blockcomment" lineEndContext="#stay">
|
<context name="Embedded documentation" attribute="Blockcomment" lineEndContext="#stay">
|
||||||
<RegExpr attribute="Comment" String="^=end(?:\s.*|$)" context="#pop" endRegion="comment block" column="0"/>
|
<RegExpr attribute="Comment" String="^=end(?:\s.*|$)" context="#pop" endRegion="comment block" column="0"/>
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="RegEx 1" attribute="Regular Expression" lineEndContext="#stay">
|
<context name="RegEx 1" attribute="Regular Expression" lineEndContext="#stay">
|
||||||
@@ -433,8 +422,7 @@
|
|||||||
|
|
||||||
<context name="General Comment" attribute="Comment" lineEndContext="#pop">
|
<context name="General Comment" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- HEREDOC support
|
<!-- HEREDOC support
|
||||||
@@ -443,15 +431,11 @@
|
|||||||
<!-- here we markup the heredoc markers -->
|
<!-- here we markup the heredoc markers -->
|
||||||
<context name="find_heredoc" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="find_heredoc" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
<RegExpr attribute="Keyword" context="apostrophed_normal_heredoc" String="'(\w+)'" />
|
<RegExpr attribute="Keyword" context="apostrophed_normal_heredoc" String="'(\w+)'" />
|
||||||
<RegExpr attribute="Keyword" context="normal_heredoc" String="(\w+)" />
|
<RegExpr attribute="Keyword" context="normal_heredoc" String="(?|(\w+)|"(\w+)"|`(\w+)`)" />
|
||||||
<RegExpr attribute="Keyword" context="normal_heredoc" String=""(\w+)"" />
|
|
||||||
<RegExpr attribute="Keyword" context="normal_heredoc" String="`(\w+)`" />
|
|
||||||
</context>
|
</context>
|
||||||
<context name="find_indented_heredoc" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
<context name="find_indented_heredoc" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
<RegExpr attribute="Keyword" context="apostrophed_indented_heredoc" String="'(\w+)'" />
|
<RegExpr attribute="Keyword" context="apostrophed_indented_heredoc" String="'(\w+)'" />
|
||||||
<RegExpr attribute="Keyword" context="indented_heredoc" String="(\w+)" />
|
<RegExpr attribute="Keyword" context="indented_heredoc" String="(?|(\w+)|"(\w+)"|`(\w+)`)" />
|
||||||
<RegExpr attribute="Keyword" context="indented_heredoc" String=""(\w+)"" />
|
|
||||||
<RegExpr attribute="Keyword" context="indented_heredoc" String="`(\w+)`" />
|
|
||||||
</context>
|
</context>
|
||||||
<!-- these are the real heredoc contexts -->
|
<!-- these are the real heredoc contexts -->
|
||||||
<context name="indented_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
<context name="indented_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||||
@@ -463,11 +447,11 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="normal_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
<context name="normal_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1$" dynamic="true" endRegion="HereDocument" column="0"/>
|
<RegExpr attribute="Keyword" context="#pop#pop" String="^%1$" dynamic="true" endRegion="HereDocument" column="0"/>
|
||||||
<IncludeRules context="heredoc_rules" />
|
<IncludeRules context="heredoc_rules" />
|
||||||
</context>
|
</context>
|
||||||
<context name="apostrophed_normal_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
<context name="apostrophed_normal_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1$" dynamic="true" endRegion="HereDocument" column="0"/>
|
<RegExpr attribute="Keyword" context="#pop#pop" String="^%1$" dynamic="true" endRegion="HereDocument" column="0"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<!-- rules for heredoc types -->
|
<!-- rules for heredoc types -->
|
||||||
@@ -481,8 +465,8 @@
|
|||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Operator" char="<" char1="<" context="#pop"/>
|
<Detect2Chars attribute="Operator" char="<" char1="<" context="#pop"/>
|
||||||
<!-- comments -->
|
<!-- comments -->
|
||||||
<RegExpr attribute="Comment" String="#\s*BEGIN.*$" context="#stay" beginRegion="marker" column="0"/>
|
<RegExpr attribute="Comment" String="^#\s*BEGIN.*$" context="#stay" beginRegion="marker" column="0"/>
|
||||||
<RegExpr attribute="Comment" String="#\s*END.*$" context="#stay" endRegion="marker" column="0"/>
|
<RegExpr attribute="Comment" String="^#\s*END.*$" context="#stay" endRegion="marker" column="0"/>
|
||||||
<DetectChar attribute="Comment" char="#" context="General Comment"/>
|
<DetectChar attribute="Comment" char="#" context="General Comment"/>
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -602,7 +586,7 @@
|
|||||||
-->
|
-->
|
||||||
<context name="gdl_dq_string_5" attribute="String" lineEndContext="#stay" dynamic="true">
|
<context name="gdl_dq_string_5" attribute="String" lineEndContext="#stay" dynamic="true">
|
||||||
<IncludeRules context="dq_string_rules" />
|
<IncludeRules context="dq_string_rules" />
|
||||||
<RegExpr attribute="String" String="\\%1" context="#stay" dynamic="true" />
|
<StringDetect attribute="String" String="\%1" context="#stay" dynamic="true" />
|
||||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||||
</context>
|
</context>
|
||||||
<!-- rules to be included in all dq_string contexts -->
|
<!-- rules to be included in all dq_string contexts -->
|
||||||
@@ -667,7 +651,7 @@
|
|||||||
-->
|
-->
|
||||||
<context name="gdl_token_array_5" attribute="String" lineEndContext="#stay" dynamic="true">
|
<context name="gdl_token_array_5" attribute="String" lineEndContext="#stay" dynamic="true">
|
||||||
<IncludeRules context="token_array_rules" />
|
<IncludeRules context="token_array_rules" />
|
||||||
<RegExpr attribute="String" String="\\%1" context="#stay" dynamic="true"/>
|
<StringDetect attribute="String" String="\%1" context="#stay" dynamic="true"/>
|
||||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -731,7 +715,7 @@
|
|||||||
-->
|
-->
|
||||||
<context name="gdl_apostrophed_5" attribute="Raw String" lineEndContext="#stay" dynamic="true">
|
<context name="gdl_apostrophed_5" attribute="Raw String" lineEndContext="#stay" dynamic="true">
|
||||||
<IncludeRules context="apostrophed_rules" />
|
<IncludeRules context="apostrophed_rules" />
|
||||||
<RegExpr attribute="Raw String" String="\\%1" context="#stay" dynamic="true"/>
|
<StringDetect attribute="Raw String" String="\%1" context="#stay" dynamic="true"/>
|
||||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -795,7 +779,7 @@
|
|||||||
-->
|
-->
|
||||||
<context name="gdl_shell_command_5" attribute="Command" lineEndContext="#stay" dynamic="true">
|
<context name="gdl_shell_command_5" attribute="Command" lineEndContext="#stay" dynamic="true">
|
||||||
<IncludeRules context="shell_command_rules" />
|
<IncludeRules context="shell_command_rules" />
|
||||||
<RegExpr attribute="Command" String="\\%1" context="#stay" dynamic="true" />
|
<StringDetect attribute="Command" String="\%1" context="#stay" dynamic="true" />
|
||||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -861,7 +845,7 @@
|
|||||||
-->
|
-->
|
||||||
<context name="gdl_regexpr_5" attribute="Regular Expression" lineEndContext="#stay" dynamic="true">
|
<context name="gdl_regexpr_5" attribute="Regular Expression" lineEndContext="#stay" dynamic="true">
|
||||||
<IncludeRules context="regexpr_rules" />
|
<IncludeRules context="regexpr_rules" />
|
||||||
<RegExpr attribute="Regular Expression" String="\\%1" context="#stay" dynamic="true" />
|
<StringDetect attribute="Regular Expression" String="\%1" context="#stay" dynamic="true" />
|
||||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1[uiomxn]*" dynamic="true" endRegion="GdlInput" />
|
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1[uiomxn]*" dynamic="true" endRegion="GdlInput" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE language SYSTEM "language.dtd">
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
<language name="Valgrind Suppression" section="Other" extensions="*.supp;" mimetype="" version="3" kateversion="2.4" author="Milian Wolff (mail@milianw.de)" license="LGPL">
|
<language name="Valgrind Suppression" section="Other" extensions="*.supp;" mimetype="" version="4" kateversion="5.0" author="Milian Wolff (mail@milianw.de)" license="LGPL">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<contexts>
|
<contexts>
|
||||||
<context name="File" attribute="Normal Text" lineEndContext="#stay">
|
<context name="File" attribute="Normal Text" lineEndContext="#stay">
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Rule" attribute="Normal Text" lineEndContext="#stay" >
|
<context name="Rule" attribute="Normal Text" lineEndContext="#stay" >
|
||||||
<RegExpr attribute="RuleName" String="^[^\}]+$" context="Rule2" />
|
<RegExpr attribute="RuleName" String="^[^\}]+$" context="Rule2" column="0" />
|
||||||
<DetectChar char="}" attribute="Normal Text" context="#pop" firstNonSpace="true" />
|
<DetectChar char="}" attribute="Normal Text" context="#pop" firstNonSpace="true" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -25,8 +25,7 @@
|
|||||||
|
|
||||||
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
</contexts>
|
</contexts>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<!ENTITY name "(?![0-9])[\w_:][\w.:_-]*">
|
<!ENTITY name "(?![0-9])[\w_:][\w.:_-]*">
|
||||||
<!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
<!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
||||||
]>
|
]>
|
||||||
<language name="XML" version="10" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel;*.dae;*.sch;*.brd" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml" casesensitive="1" indenter="xml" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
<language name="XML" version="12" kateversion="5.0" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel;*.dae;*.sch;*.brd" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml" casesensitive="1" indenter="xml" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||||
|
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<contexts>
|
<contexts>
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
<context name="FindXML" attribute="Normal Text" lineEndContext="#stay">
|
<context name="FindXML" attribute="Normal Text" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||||
<StringDetect attribute="CDATA" context="CDATA" String="<![CDATA[" beginRegion="cdata" />
|
<StringDetect attribute="CDATA" context="CDATAStart" String="<![CDATA[" lookAhead="true" />
|
||||||
<RegExpr attribute="Doctype" context="Doctype" String="<!DOCTYPE\s+" beginRegion="doctype" />
|
<RegExpr attribute="Doctype Symbols" context="DoctypeTagName" String="<!(?=DOCTYPE\s+)" beginRegion="doctype" />
|
||||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:_-]*" beginRegion="pi" />
|
<IncludeRules context="FindProcessingInstruction" />
|
||||||
<RegExpr attribute="Element" context="Element" String="<&name;" beginRegion="element" />
|
<RegExpr attribute="Element Symbols" context="ElementTagName" String="<(?=(&name;))" beginRegion="element" />
|
||||||
<IncludeRules context="FindEntityRefs" />
|
<IncludeRules context="FindEntityRefs" />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
@@ -41,37 +41,67 @@
|
|||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||||
<RegExpr attribute="Error" context="#stay" String="-(?:\-(?!->))+" />
|
<RegExpr attribute="Error" context="#stay" String="-(?:\-(?!->))+" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="CDATAStart" attribute="Other Text" lineEndContext="#pop">
|
||||||
|
<StringDetect attribute="CDATA Symbols" context="#stay" String="<![" beginRegion="cdata" />
|
||||||
|
<StringDetect attribute="CDATA" context="#stay" String="CDATA" />
|
||||||
|
<DetectChar attribute="CDATA Symbols" context="#pop!CDATA" char="[" />
|
||||||
|
</context>
|
||||||
<context name="CDATA" attribute="Other Text" lineEndContext="#stay">
|
<context name="CDATA" attribute="Other Text" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<DetectIdentifier />
|
<DetectIdentifier />
|
||||||
<StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" />
|
<StringDetect attribute="CDATA Symbols" context="#pop" String="]]>" endRegion="cdata" />
|
||||||
<StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" />
|
<StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="FindProcessingInstruction" attribute="Other Text" lineEndContext="#stay">
|
||||||
|
<RegExpr attribute="PI Symbols" context="PI TagName" String="<\?(?=([\w:_-]*))" beginRegion="pi" />
|
||||||
|
</context>
|
||||||
|
<context name="PI TagName" attribute="Other Text" lineEndContext="#pop!PI" fallthrough="true" fallthroughContext="#pop!PI">
|
||||||
|
<RegExpr attribute="Processing Instruction" context="#pop!PI-XML" String="xml(?=\s|$)" insensitive="true" />
|
||||||
|
<StringDetect attribute="Processing Instruction" context="#pop!PI" String="%1" dynamic="true" />
|
||||||
|
</context>
|
||||||
<context name="PI" attribute="Other Text" lineEndContext="#stay">
|
<context name="PI" attribute="Other Text" lineEndContext="#stay">
|
||||||
<Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" />
|
<Detect2Chars attribute="PI Symbols" context="#pop" char="?" char1=">" endRegion="pi" />
|
||||||
|
</context>
|
||||||
|
<context name="PI-XML" attribute="Other Text" lineEndContext="#stay">
|
||||||
|
<IncludeRules context="PI" />
|
||||||
|
<RegExpr attribute="Attribute" context="#stay" String="(?:^|\s+)&name;" />
|
||||||
|
<DetectChar attribute="Attribute" context="Value" char="=" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="DoctypeTagName" attribute="Other Text" lineEndContext="#pop">
|
||||||
|
<StringDetect attribute="Doctype" context="#pop!DoctypeVariableName" String="DOCTYPE" />
|
||||||
|
</context>
|
||||||
|
<context name="DoctypeVariableName" attribute="Other Text" lineEndContext="#pop!Doctype" fallthrough="true" fallthroughContext="#pop!Doctype">
|
||||||
|
<DetectSpaces />
|
||||||
|
<RegExpr attribute="Doctype Name" context="#pop!Doctype" String="&name;" />
|
||||||
|
</context>
|
||||||
<context name="Doctype" attribute="Other Text" lineEndContext="#stay">
|
<context name="Doctype" attribute="Other Text" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" />
|
<DetectChar attribute="Doctype Symbols" context="#pop" char=">" endRegion="doctype" />
|
||||||
<DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
|
<DetectChar attribute="Doctype Symbols" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay">
|
<context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
|
<DetectChar attribute="Doctype Symbols" context="#pop" char="]" endRegion="int_subset" />
|
||||||
<RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(?:ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
|
<RegExpr attribute="Doctype Symbols" context="Doctype Markupdecl TagName" String="<!(?=(ELEMENT|ENTITY|ATTLIST|NOTATION)\b)" />
|
||||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:_-]*" beginRegion="pi" />
|
<IncludeRules context="FindProcessingInstruction" />
|
||||||
<IncludeRules context="FindPEntityRefs" />
|
<IncludeRules context="FindPEntityRefs" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="Doctype Markupdecl TagName" attribute="Other Text" lineEndContext="#pop">
|
||||||
|
<StringDetect attribute="Doctype" context="#pop!Doctype Markupdecl VariableName" String="%1" dynamic="true" />
|
||||||
|
</context>
|
||||||
|
<context name="Doctype Markupdecl VariableName" attribute="Other Text" lineEndContext="#pop!Doctype Markupdecl" fallthrough="true" fallthroughContext="#pop!Doctype Markupdecl">
|
||||||
|
<DetectSpaces />
|
||||||
|
<RegExpr attribute="Doctype Name" context="#pop!Doctype Markupdecl" String="&name;" />
|
||||||
|
</context>
|
||||||
<context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay">
|
<context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Doctype" context="#pop" char=">" />
|
<DetectChar attribute="Doctype Symbols" context="#pop" char=">" />
|
||||||
<DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" />
|
<DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" />
|
||||||
<DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" />
|
<DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" />
|
||||||
</context>
|
</context>
|
||||||
@@ -86,25 +116,31 @@
|
|||||||
<IncludeRules context="FindPEntityRefs" />
|
<IncludeRules context="FindPEntityRefs" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="ElementTagName" attribute="Other Text" lineEndContext="#pop!Element" fallthrough="true" fallthroughContext="#pop!Element">
|
||||||
|
<StringDetect attribute="Element" context="#pop!Element" String="%1" dynamic="true" />
|
||||||
|
</context>
|
||||||
<context name="Element" attribute="Other Text" lineEndContext="#stay">
|
<context name="Element" attribute="Other Text" lineEndContext="#stay">
|
||||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="element" />
|
<Detect2Chars attribute="Element Symbols" context="#pop" char="/" char1=">" endRegion="element" />
|
||||||
<DetectChar attribute="Element" context="El Content" char=">" />
|
<DetectChar attribute="Element Symbols" context="El Content" char=">" />
|
||||||
<RegExpr attribute="Attribute" context="Attribute" String="(?:^|\s+)&name;" />
|
<RegExpr attribute="Attribute" context="Attribute" String="(?:^|\s+)&name;" />
|
||||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="El Content" attribute="Other Text" lineEndContext="#stay">
|
<context name="El Content" attribute="Other Text" lineEndContext="#stay">
|
||||||
<RegExpr attribute="Element" context="El End" String="</&name;" />
|
<RegExpr attribute="Element Symbols" context="El End TagName" String="</(?=(&name;))" />
|
||||||
<IncludeRules context="FindXML" />
|
<IncludeRules context="FindXML" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="El End TagName" attribute="Other Text" lineEndContext="#pop!El End" fallthrough="true" fallthroughContext="#pop!El End">
|
||||||
|
<StringDetect attribute="Element" context="#pop!El End" String="%1" dynamic="true" />
|
||||||
|
</context>
|
||||||
<context name="El End" attribute="Other Text" lineEndContext="#stay">
|
<context name="El End" attribute="Other Text" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Element" context="#pop#pop#pop" char=">" endRegion="element" />
|
<DetectChar attribute="Element Symbols" context="#pop#pop#pop" char=">" endRegion="element" />
|
||||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Attribute" attribute="Other Text" lineEndContext="#stay">
|
<context name="Attribute" attribute="Other Text" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Attribute" context="Value" char="=" />
|
<DetectChar attribute="Attribute" context="#pop!Value" char="=" />
|
||||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -115,12 +151,12 @@
|
|||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Value" context="#pop#pop#pop" char=""" />
|
<DetectChar attribute="Value" context="#pop#pop" char=""" />
|
||||||
<IncludeRules context="FindEntityRefs" />
|
<IncludeRules context="FindEntityRefs" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="Value SQ" attribute="Value" lineEndContext="#stay">
|
<context name="Value SQ" attribute="Value" lineEndContext="#stay">
|
||||||
<DetectChar attribute="Value" context="#pop#pop#pop" char="'" />
|
<DetectChar attribute="Value" context="#pop#pop" char="'" />
|
||||||
<IncludeRules context="FindEntityRefs" />
|
<IncludeRules context="FindEntityRefs" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
@@ -129,10 +165,15 @@
|
|||||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||||
<itemData name="Other Text" defStyleNum="dsNormal" />
|
<itemData name="Other Text" defStyleNum="dsNormal" />
|
||||||
<itemData name="Comment" defStyleNum="dsComment" spellChecking="false" />
|
<itemData name="Comment" defStyleNum="dsComment" spellChecking="false" />
|
||||||
<itemData name="CDATA" defStyleNum="dsBaseN" bold="1" spellChecking="false" />
|
<itemData name="CDATA" defStyleNum="dsBaseN" bold="1" italic="0" spellChecking="false" />
|
||||||
<itemData name="Processing Instruction" defStyleNum="dsKeyword" spellChecking="false" />
|
<itemData name="CDATA Symbols" defStyleNum="dsBaseN" bold="0" italic="0" spellChecking="false" />
|
||||||
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" spellChecking="false" />
|
<itemData name="Processing Instruction" defStyleNum="dsFunction" bold="1" italic="0" spellChecking="false" />
|
||||||
|
<itemData name="PI Symbols" defStyleNum="dsFunction" bold="0" italic="0" spellChecking="false" />
|
||||||
|
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" italic="0" spellChecking="false" />
|
||||||
|
<itemData name="Doctype Name" defStyleNum="dsDataType" bold="0" italic="0" spellChecking="false" />
|
||||||
|
<itemData name="Doctype Symbols" defStyleNum="dsDataType" bold="0" italic="0" spellChecking="false" />
|
||||||
<itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" />
|
<itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" />
|
||||||
|
<itemData name="Element Symbols" defStyleNum="dsNormal" spellChecking="false" />
|
||||||
<itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
|
<itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
|
||||||
<itemData name="Value" defStyleNum="dsString" spellChecking="false" />
|
<itemData name="Value" defStyleNum="dsString" spellChecking="false" />
|
||||||
<itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" />
|
<itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" />
|
||||||
|
@@ -32,7 +32,7 @@ This code is released under the LGPL as part of kdelibs/kate.
|
|||||||
|
|
||||||
========================================================================
|
========================================================================
|
||||||
-->
|
-->
|
||||||
<language name="Yacc/Bison" version="7" kateversion="5.0" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL">
|
<language name="Yacc/Bison" version="9" kateversion="5.0" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL">
|
||||||
|
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<contexts>
|
<contexts>
|
||||||
@@ -139,9 +139,9 @@ This code is released under the LGPL as part of kdelibs/kate.
|
|||||||
<WordDetect attribute="Directive" context="#stay" String="%merge" />
|
<WordDetect attribute="Directive" context="#stay" String="%merge" />
|
||||||
|
|
||||||
<!-- Finish rule without the ';' character (see the 'rhses.1' rule in the 'src/parse-gram.y' file, from the Bison source) -->
|
<!-- Finish rule without the ';' character (see the 'rhses.1' rule in the 'src/parse-gram.y' file, from the Bison source) -->
|
||||||
<RegExpr attribute="Open Rule" context="#pop" String="[\w\-\.](?=[\w\-\.]*:)" column="0" endRegion="rule" />
|
<RegExpr attribute="Open Rule" context="#pop" String="^[\w\-\.](?=[\w\-\.]*:)" column="0" endRegion="rule" />
|
||||||
<Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="%" lookAhead="true" firstNonSpace="true" endRegion="rule" />
|
<Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="%" lookAhead="true" firstNonSpace="true" endRegion="rule" />
|
||||||
<RegExpr attribute="Directive" context="#pop" String="%(?:union|code|destructor|printer|start|(?:no\-)?default\-prec|nterm|token|type|left|right|nonassoc|precedence)\b" lookAhead="true" column="0" endRegion="rule" />
|
<RegExpr attribute="Directive" context="#pop" String="^%(?:union|code|destructor|printer|start|(?:no\-)?default\-prec|nterm|token|type|left|right|nonassoc|precedence)\b" lookAhead="true" column="0" endRegion="rule" />
|
||||||
</context>
|
</context>
|
||||||
<!-- The Bison parser allows to have ';' followed by '|', without the rule ending.
|
<!-- The Bison parser allows to have ';' followed by '|', without the rule ending.
|
||||||
The problem here is that the ';' char has endRegion="rule" (although it is not very relevant). -->
|
The problem here is that the ';' char has endRegion="rule" (although it is not very relevant). -->
|
||||||
@@ -201,13 +201,11 @@ This code is released under the LGPL as part of kdelibs/kate.
|
|||||||
<context name="CommentStar" attribute="Comment" lineEndContext="#stay">
|
<context name="CommentStar" attribute="Comment" lineEndContext="#stay">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="comment" />
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="comment" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
<context name="CommentSlash" attribute="Comment" lineEndContext="#pop">
|
<context name="CommentSlash" attribute="Comment" lineEndContext="#pop">
|
||||||
<DetectSpaces />
|
<DetectSpaces />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Comments" />
|
||||||
<IncludeRules context="##Modelines" />
|
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<context name="StringOrChar" attribute="Normal Text" lineEndContext="#stay">
|
<context name="StringOrChar" attribute="Normal Text" lineEndContext="#stay">
|
||||||
|
352
src/libs/3rdparty/syntax-highlighting/data/themes/atom-one-dark.theme
vendored
Normal file
352
src/libs/3rdparty/syntax-highlighting/data/themes/atom-one-dark.theme
vendored
Normal file
@@ -0,0 +1,352 @@
|
|||||||
|
{
|
||||||
|
"custom-styles": {
|
||||||
|
"Go": {
|
||||||
|
"Predeclared Identifier": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"INI Files": {
|
||||||
|
"Assignment": {
|
||||||
|
"selected-text-color": "#abb2bf",
|
||||||
|
"text-color": "#abb2bf"
|
||||||
|
},
|
||||||
|
"Section": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JavaScript": {
|
||||||
|
"Built-in Objects": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Function Declaration": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"Function Name": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"Module": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Object Method (Built-in)": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Markdown": {
|
||||||
|
"Code": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Emphasis Text": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Fenced Code": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Header H1": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Header H2": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Header H3": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Header H4": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Header H5": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Header H6": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Link": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Reference-Link Name": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"Reference-Link Target": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"Reference-Link Target: Link": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Reference-Link: Email": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Reference-Link: Link": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Strong Text": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"String Substitution": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"Lifetime": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Macro": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"Self": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Trait": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Type": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TypeScript": {
|
||||||
|
"Built-in Objects": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Module": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Object Method (Built-in)": {
|
||||||
|
"italic": false,
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"Reserved": {
|
||||||
|
"italic": false
|
||||||
|
},
|
||||||
|
"Types": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"XML": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"editor-colors": {
|
||||||
|
"BackgroundColor": "#282c34",
|
||||||
|
"BracketMatching": "#8e44ad",
|
||||||
|
"CodeFolding": "#363c4a",
|
||||||
|
"CurrentLine": "#0A99BBFF",
|
||||||
|
"CurrentLineNumber": "#abb2bf",
|
||||||
|
"IconBorder": "#282c34",
|
||||||
|
"IndentationLine": "#3a3f44",
|
||||||
|
"LineNumbers": "#636D83",
|
||||||
|
"MarkBookmark": "#0404bf",
|
||||||
|
"MarkBreakpointActive": "#8b0607",
|
||||||
|
"MarkBreakpointDisabled": "#820683",
|
||||||
|
"MarkBreakpointReached": "#6d6e07",
|
||||||
|
"MarkError": "#c24038",
|
||||||
|
"MarkExecution": "#4d4e50",
|
||||||
|
"MarkWarning": "#d19a66",
|
||||||
|
"ModifiedLines": "#e06c75",
|
||||||
|
"ReplaceHighlight": "#a34f56",
|
||||||
|
"SavedLines": "#98c379",
|
||||||
|
"SearchHighlight": "#3D528BFF",
|
||||||
|
"Separator": "#3f4347",
|
||||||
|
"SpellChecking": "#c24038",
|
||||||
|
"TabMarker": "#21252B",
|
||||||
|
"TemplateBackground": "#31363b",
|
||||||
|
"TemplateFocusedPlaceholder": "#123723",
|
||||||
|
"TemplatePlaceholder": "#123723",
|
||||||
|
"TemplateReadOnlyPlaceholder": "#4d1f24",
|
||||||
|
"TextSelection": "#363c4a",
|
||||||
|
"WordWrapMarker": "#3a3f44"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"copyright": [
|
||||||
|
"SPDX-FileCopyrightText: 2016 GitHub Inc.",
|
||||||
|
"SPDX-FileCopyrightText: 2020 Waqar Ahmed <waqar.17a@gmail.com>"
|
||||||
|
],
|
||||||
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
|
"name": "Atom One Dark",
|
||||||
|
"revision": 2
|
||||||
|
},
|
||||||
|
"text-styles": {
|
||||||
|
"Alert": {
|
||||||
|
"background-color": "#4d1f24",
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#95da4c",
|
||||||
|
"text-color": "#95da4c"
|
||||||
|
},
|
||||||
|
"Annotation": {
|
||||||
|
"selected-text-color": "#98c379",
|
||||||
|
"text-color": "#98c379"
|
||||||
|
},
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"BaseN": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"BuiltIn": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Char": {
|
||||||
|
"selected-text-color": "#98c379",
|
||||||
|
"text-color": "#98c379"
|
||||||
|
},
|
||||||
|
"Comment": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#5c6370",
|
||||||
|
"text-color": "#5c6370"
|
||||||
|
},
|
||||||
|
"CommentVar": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"ControlFlow": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"DataType": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"DecVal": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Documentation": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#a43340"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"selected-text-color": "#f44747",
|
||||||
|
"text-color": "#f44747",
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Extension": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#61afef",
|
||||||
|
"text-color": "#61afef"
|
||||||
|
},
|
||||||
|
"Float": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Function": {
|
||||||
|
"selected-text-color": "#61afef",
|
||||||
|
"text-color": "#61afef"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#98c379",
|
||||||
|
"text-color": "#98c379"
|
||||||
|
},
|
||||||
|
"Information": {
|
||||||
|
"selected-text-color": "#e46700",
|
||||||
|
"text-color": "#c45b00"
|
||||||
|
},
|
||||||
|
"Keyword": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Normal": {
|
||||||
|
"selected-text-color": "#abb2bf",
|
||||||
|
"text-color": "#abb2bf"
|
||||||
|
},
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"Others": {
|
||||||
|
"selected-text-color": "#27ae60",
|
||||||
|
"text-color": "#27ae60"
|
||||||
|
},
|
||||||
|
"Preprocessor": {
|
||||||
|
"selected-text-color": "#c678dd",
|
||||||
|
"text-color": "#c678dd"
|
||||||
|
},
|
||||||
|
"RegionMarker": {
|
||||||
|
"background-color": "#153042",
|
||||||
|
"selected-text-color": "#3daee9",
|
||||||
|
"text-color": "#2980b9"
|
||||||
|
},
|
||||||
|
"SpecialChar": {
|
||||||
|
"selected-text-color": "#56b6c2",
|
||||||
|
"text-color": "#56b6c2"
|
||||||
|
},
|
||||||
|
"SpecialString": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#da4453"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"selected-text-color": "#98c379",
|
||||||
|
"text-color": "#98c379"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#e06c75",
|
||||||
|
"text-color": "#e06c75"
|
||||||
|
},
|
||||||
|
"VerbatimString": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#da4453"
|
||||||
|
},
|
||||||
|
"Warning": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#da4453"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
359
src/libs/3rdparty/syntax-highlighting/data/themes/atom-one-light.theme
vendored
Normal file
359
src/libs/3rdparty/syntax-highlighting/data/themes/atom-one-light.theme
vendored
Normal file
@@ -0,0 +1,359 @@
|
|||||||
|
{
|
||||||
|
"custom-styles": {
|
||||||
|
"Go": {
|
||||||
|
"Predeclared Identifier": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"INI Files": {
|
||||||
|
"Assignment": {
|
||||||
|
"selected-text-color": "#383a42",
|
||||||
|
"text-color": "#383a42"
|
||||||
|
},
|
||||||
|
"Section": {
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JavaScript": {
|
||||||
|
"Built-in Objects": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Function Declaration": {
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
},
|
||||||
|
"Function Name": {
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
},
|
||||||
|
"Module": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Object Method (Built-in)": {
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Markdown": {
|
||||||
|
"Code": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Emphasis Text": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Fenced Code": {
|
||||||
|
"selected-text-color": "#d19a66",
|
||||||
|
"text-color": "#d19a66"
|
||||||
|
},
|
||||||
|
"Header H1": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Header H2": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Header H3": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Header H4": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Header H5": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Header H6": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Line Break": {
|
||||||
|
"text-color": "#383a42"
|
||||||
|
},
|
||||||
|
"Link": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Reference-Link Name": {
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
},
|
||||||
|
"Reference-Link Target": {
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
},
|
||||||
|
"Reference-Link Target: Link": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Reference-Link: Email": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Reference-Link: Link": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Strong Text": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"String Substitution": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"Lifetime": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Macro": {
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
},
|
||||||
|
"Self": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Trait": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Type": {
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TypeScript": {
|
||||||
|
"Built-in Objects": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Module": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Object Method (Built-in)": {
|
||||||
|
"italic": false,
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
},
|
||||||
|
"Reserved": {
|
||||||
|
"italic": false
|
||||||
|
},
|
||||||
|
"Types": {
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"XML": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"editor-colors": {
|
||||||
|
"BackgroundColor": "#fafafa",
|
||||||
|
"BracketMatching": "#ff6e6e",
|
||||||
|
"CodeFolding": "#e5e5e6",
|
||||||
|
"CurrentLine": "#0C383A42",
|
||||||
|
"CurrentLineNumber": "#383a42",
|
||||||
|
"IconBorder": "#fafafa",
|
||||||
|
"IndentationLine": "#626772",
|
||||||
|
"LineNumbers": "#9D9D9F",
|
||||||
|
"MarkBookmark": "#0404bf",
|
||||||
|
"MarkBreakpointActive": "#8b0607",
|
||||||
|
"MarkBreakpointDisabled": "#820683",
|
||||||
|
"MarkBreakpointReached": "#6d6e07",
|
||||||
|
"MarkError": "#c24038",
|
||||||
|
"MarkExecution": "#4d4e50",
|
||||||
|
"MarkWarning": "#ce7c2b",
|
||||||
|
"ModifiedLines": "#e06c75",
|
||||||
|
"ReplaceHighlight": "#ef747e",
|
||||||
|
"SavedLines": "#98c379",
|
||||||
|
"SearchHighlight": "#33526FFF",
|
||||||
|
"Separator": "#a6b0ba",
|
||||||
|
"SpellChecking": "#c24038",
|
||||||
|
"TabMarker": "#8894a6",
|
||||||
|
"TemplateBackground": "#31363b",
|
||||||
|
"TemplateFocusedPlaceholder": "#123723",
|
||||||
|
"TemplatePlaceholder": "#123723",
|
||||||
|
"TemplateReadOnlyPlaceholder": "#4d1f24",
|
||||||
|
"TextSelection": "#e5e5e6",
|
||||||
|
"WordWrapMarker": "#cddff1"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"copyright": [
|
||||||
|
"SPDX-FileCopyrightText: 2016 GitHub Inc.",
|
||||||
|
"SPDX-FileCopyrightText: 2020 Waqar Ahmed <waqar.17a@gmail.com>"
|
||||||
|
],
|
||||||
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
|
"name": "Atom One Light",
|
||||||
|
"revision": 3
|
||||||
|
},
|
||||||
|
"text-styles": {
|
||||||
|
"Alert": {
|
||||||
|
"background-color": "#4d1f24",
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#95da4c",
|
||||||
|
"text-color": "#95da4c"
|
||||||
|
},
|
||||||
|
"Annotation": {
|
||||||
|
"selected-text-color": "#50a14f",
|
||||||
|
"text-color": "#50a14f"
|
||||||
|
},
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"BaseN": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"BuiltIn": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Char": {
|
||||||
|
"selected-text-color": "#50a14f",
|
||||||
|
"text-color": "#50a14f"
|
||||||
|
},
|
||||||
|
"Comment": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#a0a1a7",
|
||||||
|
"text-color": "#a0a1a7"
|
||||||
|
},
|
||||||
|
"CommentVar": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"ControlFlow": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"DataType": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"DecVal": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Documentation": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"selected-text-color": "#f44747",
|
||||||
|
"text-color": "#f44747",
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Extension": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
},
|
||||||
|
"Float": {
|
||||||
|
"selected-text-color": "#986801",
|
||||||
|
"text-color": "#986801"
|
||||||
|
},
|
||||||
|
"Function": {
|
||||||
|
"selected-text-color": "#4078f2",
|
||||||
|
"text-color": "#4078f2"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#50a14f",
|
||||||
|
"text-color": "#50a14f"
|
||||||
|
},
|
||||||
|
"Information": {
|
||||||
|
"selected-text-color": "#e46700",
|
||||||
|
"text-color": "#c45b00"
|
||||||
|
},
|
||||||
|
"Keyword": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Normal": {
|
||||||
|
"selected-text-color": "#383a42",
|
||||||
|
"text-color": "#383a42"
|
||||||
|
},
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"Others": {
|
||||||
|
"selected-text-color": "#27ae60",
|
||||||
|
"text-color": "#27ae60"
|
||||||
|
},
|
||||||
|
"Preprocessor": {
|
||||||
|
"selected-text-color": "#a626a4",
|
||||||
|
"text-color": "#a626a4"
|
||||||
|
},
|
||||||
|
"RegionMarker": {
|
||||||
|
"background-color": "#153042",
|
||||||
|
"selected-text-color": "#3daee9",
|
||||||
|
"text-color": "#2980b9"
|
||||||
|
},
|
||||||
|
"SpecialChar": {
|
||||||
|
"selected-text-color": "#0184bc",
|
||||||
|
"text-color": "#0184bc"
|
||||||
|
},
|
||||||
|
"SpecialString": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#da4453"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"selected-text-color": "#50a14f",
|
||||||
|
"text-color": "#50a14f"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#e45649",
|
||||||
|
"text-color": "#e45649"
|
||||||
|
},
|
||||||
|
"VerbatimString": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#da4453"
|
||||||
|
},
|
||||||
|
"Warning": {
|
||||||
|
"selected-text-color": "#da4453",
|
||||||
|
"text-color": "#da4453"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_comments": [
|
"_comments": [
|
||||||
"Last update: Sep 21, 2020 (revision 2)",
|
"Last update: Feb 22, 2021 (revision 3)",
|
||||||
"This file has been converted from: https://github.com/dempfi/ayu",
|
"This file has been converted from: https://github.com/dempfi/ayu",
|
||||||
"Also see: https://github.com/ayu-theme"
|
"Also see: https://github.com/ayu-theme"
|
||||||
],
|
],
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"name": "ayu Dark",
|
"name": "ayu Dark",
|
||||||
"revision": 2
|
"revision": 3
|
||||||
},
|
},
|
||||||
"editor-colors": {
|
"editor-colors": {
|
||||||
"BackgroundColor": "#0a0e14",
|
"BackgroundColor": "#0a0e14",
|
||||||
@@ -176,5 +176,30 @@
|
|||||||
"selected-text-color": "#f07178",
|
"selected-text-color": "#f07178",
|
||||||
"text-color": "#f07178"
|
"text-color": "#f07178"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"custom-styles": {
|
||||||
|
"XML": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#ffb454",
|
||||||
|
"text-color": "#ffb454"
|
||||||
|
},
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#39bae6",
|
||||||
|
"text-color": "#39bae6",
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Element Symbols": {
|
||||||
|
"selected-text-color": "#307896",
|
||||||
|
"text-color": "#22647d"
|
||||||
|
},
|
||||||
|
"EntityRef": {
|
||||||
|
"selected-text-color": "#95e6cb",
|
||||||
|
"text-color": "#95e6cb"
|
||||||
|
},
|
||||||
|
"PEntityRef": {
|
||||||
|
"selected-text-color": "#95e6cb",
|
||||||
|
"text-color": "#95e6cb"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_comments": [
|
"_comments": [
|
||||||
"Last update: Sep 21, 2020 (revision 2)",
|
"Last update: Feb 22, 2021 (revision 3)",
|
||||||
"This file has been converted from: https://github.com/dempfi/ayu",
|
"This file has been converted from: https://github.com/dempfi/ayu",
|
||||||
"Also see: https://github.com/ayu-theme"
|
"Also see: https://github.com/ayu-theme"
|
||||||
],
|
],
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"name": "ayu Mirage",
|
"name": "ayu Mirage",
|
||||||
"revision": 2
|
"revision": 3
|
||||||
},
|
},
|
||||||
"editor-colors": {
|
"editor-colors": {
|
||||||
"BackgroundColor": "#1f2430",
|
"BackgroundColor": "#1f2430",
|
||||||
@@ -176,5 +176,30 @@
|
|||||||
"selected-text-color": "#f28779",
|
"selected-text-color": "#f28779",
|
||||||
"text-color": "#f28779"
|
"text-color": "#f28779"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"custom-styles": {
|
||||||
|
"XML": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#ffd580",
|
||||||
|
"text-color": "#ffd580"
|
||||||
|
},
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#5ccfe6",
|
||||||
|
"text-color": "#5ccfe6",
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Element Symbols": {
|
||||||
|
"selected-text-color": "#4788a2",
|
||||||
|
"text-color": "#3d7a8b"
|
||||||
|
},
|
||||||
|
"EntityRef": {
|
||||||
|
"selected-text-color": "#95e6cb",
|
||||||
|
"text-color": "#95e6cb"
|
||||||
|
},
|
||||||
|
"PEntityRef": {
|
||||||
|
"selected-text-color": "#95e6cb",
|
||||||
|
"text-color": "#95e6cb"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
"SPDX-FileCopyrightText: 2016 Dominik Haumann <dhaumann@kde.org>"
|
"SPDX-FileCopyrightText: 2016 Dominik Haumann <dhaumann@kde.org>"
|
||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"revision" : 2,
|
"revision" : 6,
|
||||||
"name" : "Breeze Dark"
|
"name" : "Breeze Dark"
|
||||||
},
|
},
|
||||||
"text-styles": {
|
"text-styles": {
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
"bold" : true
|
"bold" : true
|
||||||
},
|
},
|
||||||
"Operator" : {
|
"Operator" : {
|
||||||
"text-color" : "#cfcfc2",
|
"text-color" : "#3f8058",
|
||||||
"selected-text-color" : "#cfcfc2"
|
"selected-text-color" : "#54aa75"
|
||||||
},
|
},
|
||||||
"BuiltIn" : {
|
"BuiltIn" : {
|
||||||
"text-color" : "#7f8c8d",
|
"text-color" : "#7f8c8d",
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
"editor-colors": {
|
"editor-colors": {
|
||||||
"BackgroundColor" : "#232629",
|
"BackgroundColor" : "#232629",
|
||||||
"CodeFolding" : "#224e65",
|
"CodeFolding" : "#224e65",
|
||||||
"BracketMatching" : "#8e44ad",
|
"BracketMatching" : "#323030",
|
||||||
"CurrentLine" : "#2A2E32",
|
"CurrentLine" : "#2A2E32",
|
||||||
"IconBorder" : "#31363b",
|
"IconBorder" : "#31363b",
|
||||||
"IndentationLine" : "#3a3f44",
|
"IndentationLine" : "#3a3f44",
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
"SavedLines" : "#1c8042",
|
"SavedLines" : "#1c8042",
|
||||||
"SearchHighlight" : "#218058",
|
"SearchHighlight" : "#218058",
|
||||||
"TextSelection" : "#2d5c76",
|
"TextSelection" : "#2d5c76",
|
||||||
"Separator" : "#7a7c7d",
|
"Separator" : "#3f4347",
|
||||||
"SpellChecking" : "#c0392b",
|
"SpellChecking" : "#c0392b",
|
||||||
"TabMarker" : "#4d4d4d",
|
"TabMarker" : "#4d4d4d",
|
||||||
"TemplateBackground" : "#31363b",
|
"TemplateBackground" : "#31363b",
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
"SPDX-FileCopyrightText: 2016 Dominik Haumann <dhaumann@kde.org>"
|
"SPDX-FileCopyrightText: 2016 Dominik Haumann <dhaumann@kde.org>"
|
||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"revision" : 4,
|
"revision" : 8,
|
||||||
"name" : "Breeze Light"
|
"name" : "Breeze Light"
|
||||||
},
|
},
|
||||||
"text-styles": {
|
"text-styles": {
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
"bold" : true
|
"bold" : true
|
||||||
},
|
},
|
||||||
"Operator" : {
|
"Operator" : {
|
||||||
"text-color" : "#1f1c1b",
|
"text-color" : "#ca60ca",
|
||||||
"selected-text-color" : "#ffffff"
|
"selected-text-color" : "#a44ea4"
|
||||||
},
|
},
|
||||||
"BuiltIn" : {
|
"BuiltIn" : {
|
||||||
"text-color" : "#644a9b",
|
"text-color" : "#644a9b",
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
"SavedLines" : "#2ecc71",
|
"SavedLines" : "#2ecc71",
|
||||||
"SearchHighlight" : "#ffff00",
|
"SearchHighlight" : "#ffff00",
|
||||||
"TextSelection" : "#94caef",
|
"TextSelection" : "#94caef",
|
||||||
"Separator" : "#a0a0a0",
|
"Separator" : "#d5d5d5",
|
||||||
"SpellChecking" : "#bf0303",
|
"SpellChecking" : "#bf0303",
|
||||||
"TabMarker" : "#d2d2d2",
|
"TabMarker" : "#d2d2d2",
|
||||||
"TemplateBackground" : "#d6d2d0",
|
"TemplateBackground" : "#d6d2d0",
|
||||||
|
@@ -1,13 +1,547 @@
|
|||||||
{
|
{
|
||||||
|
"custom-styles": {
|
||||||
|
"Alerts": {
|
||||||
|
"Region Marker": {
|
||||||
|
"selected-text-color": "#6db8c7",
|
||||||
|
"text-color": "#6db8c7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Apache Configuration": {
|
||||||
|
"Directives": {
|
||||||
|
"bold": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Bash": {
|
||||||
|
"Path": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"Redirection": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"Prep. Lib": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"C++": {
|
||||||
|
"Qt Macros": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CMake": {
|
||||||
|
"Builtin Variable": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CSS": {
|
||||||
|
"Color": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Property": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Selector Class": {
|
||||||
|
"italic": true
|
||||||
|
},
|
||||||
|
"Selector Id": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Selector Pseudo": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Selector Tag": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Unit": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"D": {
|
||||||
|
"Attribute": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Declarator": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Deprecated": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Expression": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Module": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Property": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Template": {
|
||||||
|
"bold": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Diff": {
|
||||||
|
"Added line": {
|
||||||
|
"selected-text-color": "#5fde38",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Changed line (new)": {
|
||||||
|
"background-color": "#50fa7b",
|
||||||
|
"selected-text-color": "#5fde38",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Changed line (old)": {
|
||||||
|
"selected-text-color": "#e66eb4",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Removed line": {
|
||||||
|
"selected-text-color": "#e66eb4",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Doxygen": {
|
||||||
|
"Custom Tags": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"Description": {
|
||||||
|
"selected-text-color": "#c58e53",
|
||||||
|
"text-color": "#c58e53"
|
||||||
|
},
|
||||||
|
"Entities": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"HTML Tag": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"Region": {
|
||||||
|
"selected-text-color": "#6db8c7",
|
||||||
|
"text-color": "#6db8c7"
|
||||||
|
},
|
||||||
|
"Tags": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"Word": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#c58e53",
|
||||||
|
"text-color": "#c58e53"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"GNU Assembler": {
|
||||||
|
"Label": {
|
||||||
|
"underline": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Go": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"HTML": {
|
||||||
|
"Doctype": {
|
||||||
|
"bold": false,
|
||||||
|
"italic": false,
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ISO C++": {
|
||||||
|
"Prep. Lib": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"Standard Suffix": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"UDL Numeric Suffix": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"UDL String Suffix": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Intel x86 (NASM)": {
|
||||||
|
"Label": {
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Registers": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JSON": {
|
||||||
|
"Style_Keyword": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Style_String_Key": {
|
||||||
|
"italic": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JavaScript": {
|
||||||
|
"Built-in Objects": {
|
||||||
|
"italic": true
|
||||||
|
},
|
||||||
|
"Function (Built-in)": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JavaScript React (JSX)": {
|
||||||
|
"Attribute": {
|
||||||
|
"italic": true
|
||||||
|
},
|
||||||
|
"Component Tag": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Makefile": {
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Prereq": {
|
||||||
|
"italic": false,
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"Target": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Markdown": {
|
||||||
|
"Blockquote: Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Email": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Emphasis Text": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"Header H1": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Header H2": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Header H3": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Header H4": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Header H5": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Header H6": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Inline Image": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
},
|
||||||
|
"Inline Image: Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"List: Emphasis Text": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"List: Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"List: Strong Text": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
},
|
||||||
|
"Normal Text: Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Reference Image": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
},
|
||||||
|
"Reference-Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Reference-Link Name": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6",
|
||||||
|
"underline": false
|
||||||
|
},
|
||||||
|
"Reference-Link Target": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Reference-Link Target: Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Reference-Link: Link": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Strong Text": {
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Modelines": {
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#c58e53",
|
||||||
|
"text-color": "#c58e53"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PHP/PHP": {
|
||||||
|
"Backslash Code": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Control Structures": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Library Constant": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Special Variable": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Special Variable": {
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"QMake": {
|
||||||
|
"Backslash Code": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Predefined Variable": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#ffb86c",
|
||||||
|
"text-color": "#ffb86c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Ruby": {
|
||||||
|
"Access Control": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Default globals": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Definition": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Global Constant": {
|
||||||
|
"bold": false,
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Kernel methods": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Message": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Module mixin methods": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Pseudo variable": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"CConstant": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"CType": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Definition": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Lifetime": {
|
||||||
|
"selected-text-color": "#ff79c6",
|
||||||
|
"text-color": "#ff79c6"
|
||||||
|
},
|
||||||
|
"Macro": {
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"Scope": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Self": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#bd93f9",
|
||||||
|
"text-color": "#bd93f9"
|
||||||
|
},
|
||||||
|
"Trait": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SPDX-Comments": {
|
||||||
|
"SPDX Deprecated License": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"SPDX Deprecated License Exception": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"SPDX License": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"SPDX License Exception": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"SPDX Tag": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
},
|
||||||
|
"SPDX Value": {
|
||||||
|
"selected-text-color": "#d465a7",
|
||||||
|
"text-color": "#d465a7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TypeScript": {
|
||||||
|
"Built-in Objects": {
|
||||||
|
"italic": true
|
||||||
|
},
|
||||||
|
"Function (Built-in)": {
|
||||||
|
"selected-text-color": "#50fa7b",
|
||||||
|
"text-color": "#50fa7b"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TypeScript React (TSX)": {
|
||||||
|
"Attribute": {
|
||||||
|
"italic": true
|
||||||
|
},
|
||||||
|
"Component Tag": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"YAML": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"Key": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#8be9fd",
|
||||||
|
"text-color": "#8be9fd"
|
||||||
|
},
|
||||||
|
"List": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"editor-colors": {
|
"editor-colors": {
|
||||||
"BackgroundColor": "#282a36",
|
"BackgroundColor": "#282a36",
|
||||||
"BracketMatching": "#55007f",
|
"BracketMatching": "#7c62a5",
|
||||||
"CodeFolding": "#8be9fd",
|
"CodeFolding": "#44475a",
|
||||||
"CurrentLine": "#282a36",
|
"CurrentLine": "#44475a",
|
||||||
"CurrentLineNumber": "#f8f8f2",
|
"CurrentLineNumber": "#f8f8f2",
|
||||||
"IconBorder": "#282a36",
|
"IconBorder": "#282a36",
|
||||||
"IndentationLine": "#6272a4",
|
"IndentationLine": "#6272a4",
|
||||||
"LineNumbers": "#909194",
|
"LineNumbers": "#6272a4",
|
||||||
"MarkBookmark": "#8be9fd",
|
"MarkBookmark": "#8be9fd",
|
||||||
"MarkBreakpointActive": "#ff5555",
|
"MarkBreakpointActive": "#ff5555",
|
||||||
"MarkBreakpointDisabled": "#bd93f9",
|
"MarkBreakpointDisabled": "#bd93f9",
|
||||||
@@ -16,10 +550,10 @@
|
|||||||
"MarkExecution": "#44475a",
|
"MarkExecution": "#44475a",
|
||||||
"MarkWarning": "#ffb86c",
|
"MarkWarning": "#ffb86c",
|
||||||
"ModifiedLines": "#ff79c6",
|
"ModifiedLines": "#ff79c6",
|
||||||
"ReplaceHighlight": "#50fa7b",
|
"ReplaceHighlight": "#2c8843",
|
||||||
"SavedLines": "#50fa7b",
|
"SavedLines": "#50fa7b",
|
||||||
"SearchHighlight": "#b39800",
|
"SearchHighlight": "#566591",
|
||||||
"Separator": "#909194",
|
"Separator": "#45474e",
|
||||||
"SpellChecking": "#ff5555",
|
"SpellChecking": "#ff5555",
|
||||||
"TabMarker": "#6272a4",
|
"TabMarker": "#6272a4",
|
||||||
"TemplateBackground": "#282a36",
|
"TemplateBackground": "#282a36",
|
||||||
@@ -36,7 +570,7 @@
|
|||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"name": "Dracula",
|
"name": "Dracula",
|
||||||
"revision": 1
|
"revision": 7
|
||||||
},
|
},
|
||||||
"text-styles": {
|
"text-styles": {
|
||||||
"Alert": {
|
"Alert": {
|
||||||
@@ -49,20 +583,20 @@
|
|||||||
"text-color": "#ff79c6"
|
"text-color": "#ff79c6"
|
||||||
},
|
},
|
||||||
"Attribute": {
|
"Attribute": {
|
||||||
"selected-text-color": "#8be9fd",
|
"selected-text-color": "#ff79c6",
|
||||||
"text-color": "#8be9fd"
|
"text-color": "#ff79c6"
|
||||||
},
|
},
|
||||||
"BaseN": {
|
"BaseN": {
|
||||||
"selected-text-color": "#ffb86c",
|
"selected-text-color": "#bd93f9",
|
||||||
"text-color": "#ffb86c"
|
"text-color": "#bd93f9"
|
||||||
},
|
},
|
||||||
"BuiltIn": {
|
"BuiltIn": {
|
||||||
"selected-text-color": "#8be9fd",
|
"selected-text-color": "#8be9fd",
|
||||||
"text-color": "#8be9fd"
|
"text-color": "#8be9fd"
|
||||||
},
|
},
|
||||||
"Char": {
|
"Char": {
|
||||||
"selected-text-color": "#ff79c6",
|
"selected-text-color": "#f1fa8c",
|
||||||
"text-color": "#ff79c6"
|
"text-color": "#f1fa8c"
|
||||||
},
|
},
|
||||||
"Comment": {
|
"Comment": {
|
||||||
"selected-text-color": "#6272a4",
|
"selected-text-color": "#6272a4",
|
||||||
@@ -78,17 +612,17 @@
|
|||||||
"text-color": "#bd93f9"
|
"text-color": "#bd93f9"
|
||||||
},
|
},
|
||||||
"ControlFlow": {
|
"ControlFlow": {
|
||||||
"bold": true,
|
"selected-text-color": "#ff79c6",
|
||||||
"selected-text-color": "#ffb86c",
|
"text-color": "#ff79c6"
|
||||||
"text-color": "#ffb86c"
|
|
||||||
},
|
},
|
||||||
"DataType": {
|
"DataType": {
|
||||||
|
"italic": true,
|
||||||
"selected-text-color": "#8be9fd",
|
"selected-text-color": "#8be9fd",
|
||||||
"text-color": "#8be9fd"
|
"text-color": "#8be9fd"
|
||||||
},
|
},
|
||||||
"DecVal": {
|
"DecVal": {
|
||||||
"selected-text-color": "#ffb86c",
|
"selected-text-color": "#bd93f9",
|
||||||
"text-color": "#ffb86c"
|
"text-color": "#bd93f9"
|
||||||
},
|
},
|
||||||
"Documentation": {
|
"Documentation": {
|
||||||
"selected-text-color": "#ffb86c",
|
"selected-text-color": "#ffb86c",
|
||||||
@@ -100,13 +634,12 @@
|
|||||||
"underline": true
|
"underline": true
|
||||||
},
|
},
|
||||||
"Extension": {
|
"Extension": {
|
||||||
"bold": true,
|
"selected-text-color": "#8be9fd",
|
||||||
"selected-text-color": "#0095ff",
|
"text-color": "#8be9fd"
|
||||||
"text-color": "#0095ff"
|
|
||||||
},
|
},
|
||||||
"Float": {
|
"Float": {
|
||||||
"selected-text-color": "#ffb86c",
|
"selected-text-color": "#bd93f9",
|
||||||
"text-color": "#ffb86c"
|
"text-color": "#bd93f9"
|
||||||
},
|
},
|
||||||
"Function": {
|
"Function": {
|
||||||
"selected-text-color": "#50fa7b",
|
"selected-text-color": "#50fa7b",
|
||||||
@@ -117,11 +650,10 @@
|
|||||||
"text-color": "#ff79c6"
|
"text-color": "#ff79c6"
|
||||||
},
|
},
|
||||||
"Information": {
|
"Information": {
|
||||||
"selected-text-color": "#f67400",
|
"selected-text-color": "#f1fa8c",
|
||||||
"text-color": "#f67400"
|
"text-color": "#f1fa8c"
|
||||||
},
|
},
|
||||||
"Keyword": {
|
"Keyword": {
|
||||||
"bold": true,
|
|
||||||
"selected-text-color": "#ff79c6",
|
"selected-text-color": "#ff79c6",
|
||||||
"text-color": "#ff79c6"
|
"text-color": "#ff79c6"
|
||||||
},
|
},
|
||||||
@@ -138,8 +670,8 @@
|
|||||||
"text-color": "#50fa7b"
|
"text-color": "#50fa7b"
|
||||||
},
|
},
|
||||||
"Preprocessor": {
|
"Preprocessor": {
|
||||||
"selected-text-color": "#50fa7b",
|
"selected-text-color": "#ff79c6",
|
||||||
"text-color": "#50fa7b"
|
"text-color": "#ff79c6"
|
||||||
},
|
},
|
||||||
"RegionMarker": {
|
"RegionMarker": {
|
||||||
"selected-text-color": "#8be9fd",
|
"selected-text-color": "#8be9fd",
|
||||||
|
216
src/libs/3rdparty/syntax-highlighting/data/themes/github-dark.theme
vendored
Normal file
216
src/libs/3rdparty/syntax-highlighting/data/themes/github-dark.theme
vendored
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
{
|
||||||
|
"custom-styles": {
|
||||||
|
"INI Files": {
|
||||||
|
"Section": {
|
||||||
|
"selected-text-color": "#b392f0",
|
||||||
|
"text-color": "#b392f0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#b392f0",
|
||||||
|
"text-color": "#b392f0"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"Special Variable": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#e1e4e8",
|
||||||
|
"text-color": "#e1e4e8"
|
||||||
|
},
|
||||||
|
"Macro": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"Self": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"Trait": {
|
||||||
|
"selected-text-color": "#e1e4e8",
|
||||||
|
"text-color": "#e1e4e8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"XML": {
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#85e89d",
|
||||||
|
"text-color": "#85e89d"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"editor-colors": {
|
||||||
|
"BackgroundColor": "#24292e",
|
||||||
|
"BracketMatching": "#65676a",
|
||||||
|
"CodeFolding": "#253749",
|
||||||
|
"CurrentLine": "#2b3036",
|
||||||
|
"CurrentLineNumber": "#e1e4e8",
|
||||||
|
"IconBorder": "#24292e",
|
||||||
|
"IndentationLine": "#d7dbe0",
|
||||||
|
"LineNumbers": "#444d56",
|
||||||
|
"MarkBookmark": "#8be9fd",
|
||||||
|
"MarkBreakpointActive": "#ff5555",
|
||||||
|
"MarkBreakpointDisabled": "#bd93f9",
|
||||||
|
"MarkBreakpointReached": "#f1fa8c",
|
||||||
|
"MarkError": "#b31d28",
|
||||||
|
"MarkExecution": "#44475a",
|
||||||
|
"MarkWarning": "#ffab70",
|
||||||
|
"ModifiedLines": "#f97583",
|
||||||
|
"ReplaceHighlight": "#40c661",
|
||||||
|
"SavedLines": "#28a745",
|
||||||
|
"SearchHighlight": "#404030",
|
||||||
|
"Separator": "#1b1f23",
|
||||||
|
"SpellChecking": "#ff5555",
|
||||||
|
"TabMarker": "#444d56",
|
||||||
|
"TemplateBackground": "#23241e",
|
||||||
|
"TemplateFocusedPlaceholder": "#22231d",
|
||||||
|
"TemplatePlaceholder": "#22231d",
|
||||||
|
"TemplateReadOnlyPlaceholder": "#262721",
|
||||||
|
"TextSelection": "#253749",
|
||||||
|
"WordWrapMarker": "#2f3031"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"copyright": [
|
||||||
|
"SPDX-FileCopyrightText: 2020 GitHub Inc.",
|
||||||
|
"SPDX-FileCopyrightText: 2020 Waqar Ahmed <waqar.17a@gmail.com>"
|
||||||
|
],
|
||||||
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
|
"name": "GitHub Dark",
|
||||||
|
"revision": 2
|
||||||
|
},
|
||||||
|
"text-styles": {
|
||||||
|
"Alert": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555"
|
||||||
|
},
|
||||||
|
"Annotation": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"BaseN": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"BuiltIn": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"Char": {
|
||||||
|
"selected-text-color": "#9ecbff",
|
||||||
|
"text-color": "#9ecbff"
|
||||||
|
},
|
||||||
|
"Comment": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"CommentVar": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"ControlFlow": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"DataType": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"DecVal": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"Documentation": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555",
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Extension": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"Float": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"Function": {
|
||||||
|
"selected-text-color": "#b392f0",
|
||||||
|
"text-color": "#b392f0"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#9ecbff",
|
||||||
|
"text-color": "#9ecbff"
|
||||||
|
},
|
||||||
|
"Information": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Keyword": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"Normal": {
|
||||||
|
"selected-text-color": "#e1e4e8",
|
||||||
|
"text-color": "#e1e4e8"
|
||||||
|
},
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#e1e4e8",
|
||||||
|
"text-color": "#e1e4e8"
|
||||||
|
},
|
||||||
|
"Others": {
|
||||||
|
"selected-text-color": "#b392f0",
|
||||||
|
"text-color": "#b392f0"
|
||||||
|
},
|
||||||
|
"Preprocessor": {
|
||||||
|
"selected-text-color": "#f97583",
|
||||||
|
"text-color": "#f97583"
|
||||||
|
},
|
||||||
|
"RegionMarker": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"SpecialChar": {
|
||||||
|
"selected-text-color": "#79b8ff",
|
||||||
|
"text-color": "#79b8ff"
|
||||||
|
},
|
||||||
|
"SpecialString": {
|
||||||
|
"selected-text-color": "#9ecbff",
|
||||||
|
"text-color": "#9ecbff"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"selected-text-color": "#9ecbff",
|
||||||
|
"text-color": "#9ecbff"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#ffab70",
|
||||||
|
"text-color": "#ffab70"
|
||||||
|
},
|
||||||
|
"VerbatimString": {
|
||||||
|
"selected-text-color": "#9ecbff",
|
||||||
|
"text-color": "#9ecbff"
|
||||||
|
},
|
||||||
|
"Warning": {
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
216
src/libs/3rdparty/syntax-highlighting/data/themes/github-light.theme
vendored
Normal file
216
src/libs/3rdparty/syntax-highlighting/data/themes/github-light.theme
vendored
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
{
|
||||||
|
"custom-styles": {
|
||||||
|
"INI Files": {
|
||||||
|
"Section": {
|
||||||
|
"selected-text-color": "#6f42c1",
|
||||||
|
"text-color": "#6f42c1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#6f42c1",
|
||||||
|
"text-color": "#6f42c1"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"Special Variable": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#24292e",
|
||||||
|
"text-color": "#24292e"
|
||||||
|
},
|
||||||
|
"Macro": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"Self": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"Trait": {
|
||||||
|
"selected-text-color": "#24292e",
|
||||||
|
"text-color": "#24292e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"XML": {
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#22863a",
|
||||||
|
"text-color": "#22863a"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"editor-colors": {
|
||||||
|
"BackgroundColor": "#ffffff",
|
||||||
|
"BracketMatching": "#bef5cb",
|
||||||
|
"CodeFolding": "#f6f8fa",
|
||||||
|
"CurrentLine": "#f6f8fa",
|
||||||
|
"CurrentLineNumber": "#24292e",
|
||||||
|
"IconBorder": "#ffffff",
|
||||||
|
"IndentationLine": "#d7dbe0",
|
||||||
|
"LineNumbers": "#c7c2bc",
|
||||||
|
"MarkBookmark": "#8be9fd",
|
||||||
|
"MarkBreakpointActive": "#ff5555",
|
||||||
|
"MarkBreakpointDisabled": "#bd93f9",
|
||||||
|
"MarkBreakpointReached": "#f1fa8c",
|
||||||
|
"MarkError": "#b31d28",
|
||||||
|
"MarkExecution": "#44475a",
|
||||||
|
"MarkWarning": "#e36209",
|
||||||
|
"ModifiedLines": "#d73a49",
|
||||||
|
"ReplaceHighlight": "#50fa7b",
|
||||||
|
"SavedLines": "#28a745",
|
||||||
|
"SearchHighlight": "#ffea7f",
|
||||||
|
"Separator": "#e1e4e8",
|
||||||
|
"SpellChecking": "#ff5555",
|
||||||
|
"TabMarker": "#d1d5da",
|
||||||
|
"TemplateBackground": "#23241e",
|
||||||
|
"TemplateFocusedPlaceholder": "#22231d",
|
||||||
|
"TemplatePlaceholder": "#22231d",
|
||||||
|
"TemplateReadOnlyPlaceholder": "#262721",
|
||||||
|
"TextSelection": "#dee6fc",
|
||||||
|
"WordWrapMarker": "#e1e4e8"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"copyright": [
|
||||||
|
"SPDX-FileCopyrightText: 2020 GitHub Inc.",
|
||||||
|
"SPDX-FileCopyrightText: 2020 Waqar Ahmed <waqar.17a@gmail.com>"
|
||||||
|
],
|
||||||
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
|
"name": "GitHub Light",
|
||||||
|
"revision": 2
|
||||||
|
},
|
||||||
|
"text-styles": {
|
||||||
|
"Alert": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555"
|
||||||
|
},
|
||||||
|
"Annotation": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"BaseN": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"BuiltIn": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"Char": {
|
||||||
|
"selected-text-color": "#032f62",
|
||||||
|
"text-color": "#032f62"
|
||||||
|
},
|
||||||
|
"Comment": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"CommentVar": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"ControlFlow": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"DataType": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"DecVal": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"Documentation": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555",
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Extension": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"Float": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"Function": {
|
||||||
|
"selected-text-color": "#6f42c1",
|
||||||
|
"text-color": "#6f42c1"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#032f62",
|
||||||
|
"text-color": "#032f62"
|
||||||
|
},
|
||||||
|
"Information": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"Keyword": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"Normal": {
|
||||||
|
"selected-text-color": "#24292e",
|
||||||
|
"text-color": "#24292e"
|
||||||
|
},
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#24292e",
|
||||||
|
"text-color": "#24292e"
|
||||||
|
},
|
||||||
|
"Others": {
|
||||||
|
"selected-text-color": "#6f42c1",
|
||||||
|
"text-color": "#6f42c1"
|
||||||
|
},
|
||||||
|
"Preprocessor": {
|
||||||
|
"selected-text-color": "#d73a49",
|
||||||
|
"text-color": "#d73a49"
|
||||||
|
},
|
||||||
|
"RegionMarker": {
|
||||||
|
"selected-text-color": "#6a737d",
|
||||||
|
"text-color": "#6a737d"
|
||||||
|
},
|
||||||
|
"SpecialChar": {
|
||||||
|
"selected-text-color": "#005cc5",
|
||||||
|
"text-color": "#005cc5"
|
||||||
|
},
|
||||||
|
"SpecialString": {
|
||||||
|
"selected-text-color": "#032f62",
|
||||||
|
"text-color": "#032f62"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"selected-text-color": "#032f62",
|
||||||
|
"text-color": "#032f62"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#e36209",
|
||||||
|
"text-color": "#e36209"
|
||||||
|
},
|
||||||
|
"VerbatimString": {
|
||||||
|
"selected-text-color": "#032f62",
|
||||||
|
"text-color": "#032f62"
|
||||||
|
},
|
||||||
|
"Warning": {
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
394
src/libs/3rdparty/syntax-highlighting/data/themes/monokai.theme
vendored
Normal file
394
src/libs/3rdparty/syntax-highlighting/data/themes/monokai.theme
vendored
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
{
|
||||||
|
"custom-styles": {
|
||||||
|
"C": {
|
||||||
|
"Prep. Lib": {
|
||||||
|
"selected-text-color": "#e6db74",
|
||||||
|
"text-color": "#e6db74"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"C++": {
|
||||||
|
"Qt Classes": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#66d9ef",
|
||||||
|
"text-color": "#66d9ef"
|
||||||
|
},
|
||||||
|
"Qt Macros": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"Qt Types": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#66D9EF",
|
||||||
|
"text-color": "#66D9EF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CMake": {
|
||||||
|
"Builtin Variable": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"False Special Arg": {
|
||||||
|
"selected-text-color": "#e03232",
|
||||||
|
"text-color": "#e03232"
|
||||||
|
},
|
||||||
|
"True Special Arg": {
|
||||||
|
"selected-text-color": "#38bd38",
|
||||||
|
"text-color": "#38bd38"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Doxygen": {
|
||||||
|
"Tags": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#52afbf",
|
||||||
|
"text-color": "#52afbf"
|
||||||
|
},
|
||||||
|
"Word": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#7ba822",
|
||||||
|
"text-color": "#7ba822",
|
||||||
|
"underline": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Diff": {
|
||||||
|
"Added line": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Changed line (new)": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Changed line (old)": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"Removed line": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Go": {
|
||||||
|
"Builtin Function": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Predeclared Identifier": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ISO C++": {
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Boost Stuff": {
|
||||||
|
"bold": false
|
||||||
|
},
|
||||||
|
"Prep. Lib": {
|
||||||
|
"selected-text-color": "#e6db74",
|
||||||
|
"text-color": "#e6db74"
|
||||||
|
},
|
||||||
|
"Standard Attribute": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Standard Macros": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"Standard Suffix": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"UDL Numeric Suffix": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"UDL String Suffix": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JSON": {
|
||||||
|
"Style_String_Key": {
|
||||||
|
"italic": false,
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JavaScript": {
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Substitution": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"JavaScript React (JSX)": {
|
||||||
|
"Component Tag": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#66d9ef",
|
||||||
|
"text-color": "#66d9ef"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Makefile": {
|
||||||
|
"FuncParam": {
|
||||||
|
"selected-text-color": "#fd971f",
|
||||||
|
"text-color": "#fd971f"
|
||||||
|
},
|
||||||
|
"Target": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"italic": false,
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Markdown": {
|
||||||
|
"Emphasis Text": {
|
||||||
|
"selected-text-color": "#66D9EF",
|
||||||
|
"text-color": "#66D9EF"
|
||||||
|
},
|
||||||
|
"Reference-Link ID": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"Reference-Link Name": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"Reference-Link Target": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"Strong Text": {
|
||||||
|
"selected-text-color": "#66d9ef",
|
||||||
|
"text-color": "#66d9ef"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"Definition": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Lifetime": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"Macro": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Self": {
|
||||||
|
"selected-text-color": "#fd971f",
|
||||||
|
"text-color": "#fd971f"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TypeScript": {
|
||||||
|
"Function (Built-in)": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Object Member": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Substitution": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TypeScript React (TSX)": {
|
||||||
|
"Component Tag": {
|
||||||
|
"bold": false,
|
||||||
|
"selected-text-color": "#66d9ef",
|
||||||
|
"text-color": "#66d9ef"
|
||||||
|
},
|
||||||
|
"Substitution": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"editor-colors": {
|
||||||
|
"BackgroundColor": "#272822",
|
||||||
|
"BracketMatching": "#5b5a4a",
|
||||||
|
"CodeFolding": "#3a3b32",
|
||||||
|
"CurrentLine": "#3e3d32",
|
||||||
|
"CurrentLineNumber": "#d1d931",
|
||||||
|
"IconBorder": "#272822",
|
||||||
|
"IndentationLine": "#6272a4",
|
||||||
|
"LineNumbers": "#909194",
|
||||||
|
"MarkBookmark": "#66D9EF",
|
||||||
|
"MarkBreakpointActive": "#ff5555",
|
||||||
|
"MarkBreakpointDisabled": "#bd93f9",
|
||||||
|
"MarkBreakpointReached": "#f1fa8c",
|
||||||
|
"MarkError": "#ff5555",
|
||||||
|
"MarkExecution": "#44475a",
|
||||||
|
"MarkWarning": "#ffb86c",
|
||||||
|
"ModifiedLines": "#ff473d",
|
||||||
|
"ReplaceHighlight": "#735d16",
|
||||||
|
"SavedLines": "#20e852",
|
||||||
|
"SearchHighlight": "#245676",
|
||||||
|
"Separator": "#45474e",
|
||||||
|
"SpellChecking": "#ff5555",
|
||||||
|
"TabMarker": "#6272a4",
|
||||||
|
"TemplateBackground": "#23241e",
|
||||||
|
"TemplateFocusedPlaceholder": "#22231d",
|
||||||
|
"TemplatePlaceholder": "#22231d",
|
||||||
|
"TemplateReadOnlyPlaceholder": "#262721",
|
||||||
|
"TextSelection": "#3f413e",
|
||||||
|
"WordWrapMarker": "#282a36"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"copyright": [
|
||||||
|
"SPDX-FileCopyrightText: 2006 Wimer Hazenberg",
|
||||||
|
"SPDX-FileCopyrightText: 2020 Waqar Ahmed <waqar.17a@gmail.com>"
|
||||||
|
],
|
||||||
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
|
"name": "Monokai",
|
||||||
|
"revision": 5
|
||||||
|
},
|
||||||
|
"text-styles": {
|
||||||
|
"Alert": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555"
|
||||||
|
},
|
||||||
|
"Annotation": {
|
||||||
|
"selected-text-color": "#75715e",
|
||||||
|
"text-color": "#75715e"
|
||||||
|
},
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"BaseN": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"BuiltIn": {
|
||||||
|
"selected-text-color": "#66D9EF",
|
||||||
|
"text-color": "#66D9EF"
|
||||||
|
},
|
||||||
|
"Char": {
|
||||||
|
"selected-text-color": "#e6db74",
|
||||||
|
"text-color": "#e6db74"
|
||||||
|
},
|
||||||
|
"Comment": {
|
||||||
|
"selected-text-color": "#75715e",
|
||||||
|
"text-color": "#75715e"
|
||||||
|
},
|
||||||
|
"CommentVar": {
|
||||||
|
"selected-text-color": "#75715e",
|
||||||
|
"text-color": "#75715e"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"ControlFlow": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"DataType": {
|
||||||
|
"italic": true,
|
||||||
|
"selected-text-color": "#66d9ef",
|
||||||
|
"text-color": "#66d9ef"
|
||||||
|
},
|
||||||
|
"DecVal": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"Documentation": {
|
||||||
|
"selected-text-color": "#75715e",
|
||||||
|
"text-color": "#75715e"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555",
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Extension": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Float": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"Function": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"Information": {
|
||||||
|
"selected-text-color": "#f1fa8c",
|
||||||
|
"text-color": "#f1fa8c"
|
||||||
|
},
|
||||||
|
"Keyword": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"Normal": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"Others": {
|
||||||
|
"selected-text-color": "#a6e22e",
|
||||||
|
"text-color": "#a6e22e"
|
||||||
|
},
|
||||||
|
"Preprocessor": {
|
||||||
|
"selected-text-color": "#f92672",
|
||||||
|
"text-color": "#f92672"
|
||||||
|
},
|
||||||
|
"RegionMarker": {
|
||||||
|
"selected-text-color": "#75715e",
|
||||||
|
"text-color": "#75715e"
|
||||||
|
},
|
||||||
|
"SpecialChar": {
|
||||||
|
"selected-text-color": "#ae81ff",
|
||||||
|
"text-color": "#ae81ff"
|
||||||
|
},
|
||||||
|
"SpecialString": {
|
||||||
|
"selected-text-color": "#e6db74",
|
||||||
|
"text-color": "#e6db74"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"selected-text-color": "#e6db74",
|
||||||
|
"text-color": "#e6db74"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#f8f8f2",
|
||||||
|
"text-color": "#f8f8f2"
|
||||||
|
},
|
||||||
|
"VerbatimString": {
|
||||||
|
"selected-text-color": "#e6db74",
|
||||||
|
"text-color": "#e6db74"
|
||||||
|
},
|
||||||
|
"Warning": {
|
||||||
|
"selected-text-color": "#ff5555",
|
||||||
|
"text-color": "#ff5555"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
179
src/libs/3rdparty/syntax-highlighting/data/themes/oblivion.theme
vendored
Normal file
179
src/libs/3rdparty/syntax-highlighting/data/themes/oblivion.theme
vendored
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
{
|
||||||
|
"_comments": [
|
||||||
|
"This theme has been adapted from the GtkSourceView Oblivion theme"
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"copyright": [
|
||||||
|
"SPDX-FileCopyrightText: 2007 Paolo Borelli <pborelli@gnome.org>, GtkSourceView team",
|
||||||
|
"SPDX-FileCopyrightText: 2020 Alexander Schlarb <alexander@ninetailed.ninja>"
|
||||||
|
],
|
||||||
|
"name": "Oblivion",
|
||||||
|
"revision": 2,
|
||||||
|
"license": "SPDX-License-Identifier: MIT"
|
||||||
|
},
|
||||||
|
"text-styles": {
|
||||||
|
"Alert": {
|
||||||
|
"background-color": "#451e1a",
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#e85848",
|
||||||
|
"text-color": "#e85848"
|
||||||
|
},
|
||||||
|
"Annotation": {
|
||||||
|
"selected-text-color": "#ad7fa8",
|
||||||
|
"text-color": "#ad7fa8"
|
||||||
|
},
|
||||||
|
"Attribute": {
|
||||||
|
"selected-text-color": "#ad7fa8",
|
||||||
|
"text-color": "#ad7fa8"
|
||||||
|
},
|
||||||
|
"BaseN": {
|
||||||
|
"selected-text-color": "#fce94f",
|
||||||
|
"text-color": "#edd400"
|
||||||
|
},
|
||||||
|
"BuiltIn": {
|
||||||
|
"selected-text-color": "#729fcf",
|
||||||
|
"text-color": "#729fcf"
|
||||||
|
},
|
||||||
|
"Char": {
|
||||||
|
"selected-text-color": "#fcaf3e",
|
||||||
|
"text-color": "#ce5c00"
|
||||||
|
},
|
||||||
|
"Comment": {
|
||||||
|
"selected-text-color": "#8ae234",
|
||||||
|
"text-color": "#30a100"
|
||||||
|
},
|
||||||
|
"CommentVar": {
|
||||||
|
"selected-text-color": "#ad7fa8",
|
||||||
|
"text-color": "#ad7fa8"
|
||||||
|
},
|
||||||
|
"Constant": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#ffffff",
|
||||||
|
"text-color": "#edd400"
|
||||||
|
},
|
||||||
|
"ControlFlow": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#ffffff",
|
||||||
|
"text-color": "#ffffff"
|
||||||
|
},
|
||||||
|
"DataType": {
|
||||||
|
"selected-text-color": "#508ed8",
|
||||||
|
"text-color": "#508ed8"
|
||||||
|
},
|
||||||
|
"DecVal": {
|
||||||
|
"selected-text-color": "#fce94f",
|
||||||
|
"text-color": "#edd400"
|
||||||
|
},
|
||||||
|
"Documentation": {
|
||||||
|
"selected-text-color": "#8ae234",
|
||||||
|
"text-color": "#4e9a06"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"selected-text-color": "#e85848",
|
||||||
|
"text-color": "#e85848",
|
||||||
|
"underline": true
|
||||||
|
},
|
||||||
|
"Extension": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#508ed8",
|
||||||
|
"text-color": "#508ed8"
|
||||||
|
},
|
||||||
|
"Float": {
|
||||||
|
"selected-text-color": "#fcaf3e",
|
||||||
|
"text-color": "#ce5c00"
|
||||||
|
},
|
||||||
|
"Function": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#729fcf",
|
||||||
|
"text-color": "#729fcf"
|
||||||
|
},
|
||||||
|
"Import": {
|
||||||
|
"selected-text-color": "#ad7fa8",
|
||||||
|
"text-color": "#ad7fa8"
|
||||||
|
},
|
||||||
|
"Information": {
|
||||||
|
"selected-text-color": "#c0a25f",
|
||||||
|
"text-color": "#c0a25f"
|
||||||
|
},
|
||||||
|
"Keyword": {
|
||||||
|
"bold": true,
|
||||||
|
"selected-text-color": "#ffffff",
|
||||||
|
"text-color": "#ffffff"
|
||||||
|
},
|
||||||
|
"Normal": {
|
||||||
|
"selected-text-color": "#eeeeec",
|
||||||
|
"text-color": "#d3d7c1"
|
||||||
|
},
|
||||||
|
"Operator": {
|
||||||
|
"selected-text-color": "#eeeeec",
|
||||||
|
"text-color": "#eeeeec"
|
||||||
|
},
|
||||||
|
"Others": {
|
||||||
|
"selected-text-color": "#fce94f",
|
||||||
|
"text-color": "#edd400"
|
||||||
|
},
|
||||||
|
"Preprocessor": {
|
||||||
|
"selected-text-color": "#ad7fa8",
|
||||||
|
"text-color": "#ad7fa8"
|
||||||
|
},
|
||||||
|
"RegionMarker": {
|
||||||
|
"background-color": "#1c2c3f",
|
||||||
|
"selected-text-color": "#508ed8",
|
||||||
|
"text-color": "#508ed8"
|
||||||
|
},
|
||||||
|
"SpecialChar": {
|
||||||
|
"selected-text-color": "#fcaf3e",
|
||||||
|
"text-color": "#ce5c00"
|
||||||
|
},
|
||||||
|
"SpecialString": {
|
||||||
|
"selected-text-color": "#fce94f",
|
||||||
|
"text-color": "#fce94f"
|
||||||
|
},
|
||||||
|
"String": {
|
||||||
|
"selected-text-color": "#fce94f",
|
||||||
|
"text-color": "#edd400"
|
||||||
|
},
|
||||||
|
"Variable": {
|
||||||
|
"selected-text-color": "#ce5c00",
|
||||||
|
"text-color": "#ce5c00"
|
||||||
|
},
|
||||||
|
"VerbatimString": {
|
||||||
|
"selected-text-color": "#fce94f",
|
||||||
|
"text-color": "#c4a000"
|
||||||
|
},
|
||||||
|
"Warning": {
|
||||||
|
"selected-text-color": "#e85848",
|
||||||
|
"text-color": "#e85848"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"editor-colors": {
|
||||||
|
"BackgroundColor": "#201f1f",
|
||||||
|
"BracketMatching": "#8f5902",
|
||||||
|
"CodeFolding": "#19395f",
|
||||||
|
"CurrentLine": "#2e3436",
|
||||||
|
"CurrentLineNumber": "#ffffff",
|
||||||
|
"IconBorder": "#302f2f",
|
||||||
|
"IndentationLine": "#989595",
|
||||||
|
"LineNumbers": "#e0dedb",
|
||||||
|
"MarkBookmark": "#0000cc",
|
||||||
|
"MarkBreakpointActive": "#cc0000",
|
||||||
|
"MarkBreakpointDisabled": "#cc00cc",
|
||||||
|
"MarkBreakpointReached": "#00cc00",
|
||||||
|
"MarkError": "#cc0000",
|
||||||
|
"MarkExecution": "#888a85",
|
||||||
|
"MarkWarning": "#ad7fa8",
|
||||||
|
"ModifiedLines": "#451e1a",
|
||||||
|
"ReplaceHighlight": "#356703",
|
||||||
|
"SavedLines": "#23321a",
|
||||||
|
"SearchHighlight": "#4e9a06",
|
||||||
|
"Separator": "#787775",
|
||||||
|
"SpellChecking": "#e85848",
|
||||||
|
"TabMarker": "#555753",
|
||||||
|
"TemplateBackground": "#302f2f",
|
||||||
|
"TemplateFocusedPlaceholder": "#23321a",
|
||||||
|
"TemplatePlaceholder": "#23321a",
|
||||||
|
"TemplateReadOnlyPlaceholder": "#451e1a",
|
||||||
|
"TextSelection": "#184880",
|
||||||
|
"WordWrapMarker": "#3c3a3a"
|
||||||
|
}
|
||||||
|
}
|
@@ -9,7 +9,7 @@
|
|||||||
"SPDX-FileCopyrightText: 2018 Andrew Crouthamel <andrew.crouthamel@kdemail.net>"
|
"SPDX-FileCopyrightText: 2018 Andrew Crouthamel <andrew.crouthamel@kdemail.net>"
|
||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"revision" : 2,
|
"revision" : 5,
|
||||||
"name" : "Solarized Dark"
|
"name" : "Solarized Dark"
|
||||||
},
|
},
|
||||||
"text-styles": {
|
"text-styles": {
|
||||||
@@ -23,8 +23,7 @@
|
|||||||
},
|
},
|
||||||
"Keyword" : {
|
"Keyword" : {
|
||||||
"text-color" : "#859900",
|
"text-color" : "#859900",
|
||||||
"selected-text-color" : "#859900",
|
"selected-text-color" : "#859900"
|
||||||
"bold" : true
|
|
||||||
},
|
},
|
||||||
"Function" : {
|
"Function" : {
|
||||||
"text-color" : "#268bd2",
|
"text-color" : "#268bd2",
|
||||||
@@ -36,8 +35,7 @@
|
|||||||
},
|
},
|
||||||
"ControlFlow" : {
|
"ControlFlow" : {
|
||||||
"text-color" : "#859900",
|
"text-color" : "#859900",
|
||||||
"selected-text-color" : "#859900",
|
"selected-text-color" : "#859900"
|
||||||
"bold" : true
|
|
||||||
},
|
},
|
||||||
"Operator" : {
|
"Operator" : {
|
||||||
"text-color" : "#859900",
|
"text-color" : "#859900",
|
||||||
@@ -49,8 +47,7 @@
|
|||||||
},
|
},
|
||||||
"Extension" : {
|
"Extension" : {
|
||||||
"text-color" : "#268bd2",
|
"text-color" : "#268bd2",
|
||||||
"selected-text-color" : "#268bd2",
|
"selected-text-color" : "#268bd2"
|
||||||
"bold" : true
|
|
||||||
},
|
},
|
||||||
"Preprocessor" : {
|
"Preprocessor" : {
|
||||||
"text-color" : "#cb4b16",
|
"text-color" : "#cb4b16",
|
||||||
@@ -86,8 +83,7 @@
|
|||||||
},
|
},
|
||||||
"DataType" : {
|
"DataType" : {
|
||||||
"text-color" : "#b58900",
|
"text-color" : "#b58900",
|
||||||
"selected-text-color" : "#b58900",
|
"selected-text-color" : "#b58900"
|
||||||
"bold" : true
|
|
||||||
},
|
},
|
||||||
"DecVal" : {
|
"DecVal" : {
|
||||||
"text-color" : "#2aa198",
|
"text-color" : "#2aa198",
|
||||||
@@ -153,13 +149,13 @@
|
|||||||
},
|
},
|
||||||
"editor-colors": {
|
"editor-colors": {
|
||||||
"BackgroundColor" : "#002b36",
|
"BackgroundColor" : "#002b36",
|
||||||
"CodeFolding" : "#6c71c4",
|
"CodeFolding": "#083d4a",
|
||||||
"BracketMatching" : "#073642",
|
"BracketMatching" : "#083d4a",
|
||||||
"CurrentLine" : "#073642",
|
"CurrentLine" : "#073642",
|
||||||
"IconBorder" : "#073642",
|
"IconBorder" : "#073642",
|
||||||
"IndentationLine" : "#073642",
|
"IndentationLine" : "#083d4a",
|
||||||
"LineNumbers" : "#586e75",
|
"LineNumbers" : "#586e75",
|
||||||
"CurrentLineNumber" : "#586e75",
|
"CurrentLineNumber": "#93a1a1",
|
||||||
"MarkBookmark" : "#268bd2",
|
"MarkBookmark" : "#268bd2",
|
||||||
"MarkBreakpointActive" : "#dc322f",
|
"MarkBreakpointActive" : "#dc322f",
|
||||||
"MarkBreakpointReached" : "#b58900",
|
"MarkBreakpointReached" : "#b58900",
|
||||||
@@ -168,11 +164,11 @@
|
|||||||
"MarkWarning" : "#cb4b16",
|
"MarkWarning" : "#cb4b16",
|
||||||
"MarkError" : "#dc322f",
|
"MarkError" : "#dc322f",
|
||||||
"ModifiedLines" : "#cb4b16",
|
"ModifiedLines" : "#cb4b16",
|
||||||
"ReplaceHighlight" : "#859900",
|
"ReplaceHighlight": "#3c4300",
|
||||||
"SavedLines" : "#2aa198",
|
"SavedLines" : "#2aa198",
|
||||||
"SearchHighlight" : "#b58900",
|
"SearchHighlight": "#0a4d5e",
|
||||||
"TextSelection" : "#eee8d5",
|
"TextSelection": "#083d4a",
|
||||||
"Separator" : "#002b36",
|
"Separator" : "#1c3e49",
|
||||||
"SpellChecking" : "#dc322f",
|
"SpellChecking" : "#dc322f",
|
||||||
"TabMarker" : "#586e75",
|
"TabMarker" : "#586e75",
|
||||||
"TemplateBackground" : "#073642",
|
"TemplateBackground" : "#073642",
|
||||||
@@ -180,5 +176,17 @@
|
|||||||
"TemplateFocusedPlaceholder" : "#073642",
|
"TemplateFocusedPlaceholder" : "#073642",
|
||||||
"TemplateReadOnlyPlaceholder" : "#073642",
|
"TemplateReadOnlyPlaceholder" : "#073642",
|
||||||
"WordWrapMarker" : "#586e75"
|
"WordWrapMarker" : "#586e75"
|
||||||
|
},
|
||||||
|
"custom-styles": {
|
||||||
|
"XML": {
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#839496",
|
||||||
|
"text-color": "#268bd2"
|
||||||
|
},
|
||||||
|
"Element Symbols": {
|
||||||
|
"selected-text-color": "#586e75",
|
||||||
|
"text-color": "#657b83"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
"SPDX-FileCopyrightText: 2018 Andrew Crouthamel <andrew.crouthamel@kdemail.net>"
|
"SPDX-FileCopyrightText: 2018 Andrew Crouthamel <andrew.crouthamel@kdemail.net>"
|
||||||
],
|
],
|
||||||
"license": "SPDX-License-Identifier: MIT",
|
"license": "SPDX-License-Identifier: MIT",
|
||||||
"revision" : 2,
|
"revision" : 4,
|
||||||
"name" : "Solarized Light"
|
"name" : "Solarized Light"
|
||||||
},
|
},
|
||||||
"text-styles": {
|
"text-styles": {
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
"SavedLines" : "#2aa198",
|
"SavedLines" : "#2aa198",
|
||||||
"SearchHighlight" : "#b58900",
|
"SearchHighlight" : "#b58900",
|
||||||
"TextSelection" : "#073642",
|
"TextSelection" : "#073642",
|
||||||
"Separator" : "#fdf6e3",
|
"Separator" : "#e0dccc",
|
||||||
"SpellChecking" : "#dc322f",
|
"SpellChecking" : "#dc322f",
|
||||||
"TabMarker" : "#93a1a1",
|
"TabMarker" : "#93a1a1",
|
||||||
"TemplateBackground" : "#eee8d5",
|
"TemplateBackground" : "#eee8d5",
|
||||||
@@ -180,5 +180,17 @@
|
|||||||
"TemplateFocusedPlaceholder" : "#eee8d5",
|
"TemplateFocusedPlaceholder" : "#eee8d5",
|
||||||
"TemplateReadOnlyPlaceholder" : "#eee8d5",
|
"TemplateReadOnlyPlaceholder" : "#eee8d5",
|
||||||
"WordWrapMarker" : "#93a1a1"
|
"WordWrapMarker" : "#93a1a1"
|
||||||
|
},
|
||||||
|
"custom-styles": {
|
||||||
|
"XML": {
|
||||||
|
"Element": {
|
||||||
|
"selected-text-color": "#268bd2",
|
||||||
|
"text-color": "#268bd2"
|
||||||
|
},
|
||||||
|
"Element Symbols": {
|
||||||
|
"selected-text-color": "#93a1a1",
|
||||||
|
"text-color": "#839496"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,15 +1,21 @@
|
|||||||
<!DOCTYPE RCC>
|
<!DOCTYPE RCC>
|
||||||
<RCC version="1.0">
|
<RCC version="1.0">
|
||||||
<qresource prefix="/org.kde.syntax-highlighting/themes">
|
<qresource prefix="/org.kde.syntax-highlighting/themes">
|
||||||
|
<file>atom-one-dark.theme</file>
|
||||||
|
<file>atom-one-light.theme</file>
|
||||||
<file>breeze-dark.theme</file>
|
<file>breeze-dark.theme</file>
|
||||||
<file>breeze-light.theme</file>
|
<file>breeze-light.theme</file>
|
||||||
<file>ayu-dark.theme</file>
|
<file>ayu-dark.theme</file>
|
||||||
<file>ayu-light.theme</file>
|
<file>ayu-light.theme</file>
|
||||||
<file>ayu-mirage.theme</file>
|
<file>ayu-mirage.theme</file>
|
||||||
<file>dracula.theme</file>
|
<file>dracula.theme</file>
|
||||||
|
<file>github-dark.theme</file>
|
||||||
|
<file>github-light.theme</file>
|
||||||
<file>gruvbox-dark.theme</file>
|
<file>gruvbox-dark.theme</file>
|
||||||
<file>gruvbox-light.theme</file>
|
<file>gruvbox-light.theme</file>
|
||||||
|
<file>monokai.theme</file>
|
||||||
<file>nord.theme</file>
|
<file>nord.theme</file>
|
||||||
|
<file>oblivion.theme</file>
|
||||||
<file>printing.theme</file>
|
<file>printing.theme</file>
|
||||||
<file>radical.theme</file>
|
<file>radical.theme</file>
|
||||||
<file>solarized-dark.theme</file>
|
<file>solarized-dark.theme</file>
|
||||||
|
@@ -2,4 +2,4 @@ add_executable(kate-syntax-highlighter kate-syntax-highlighter.cpp)
|
|||||||
ecm_mark_nongui_executable(kate-syntax-highlighter)
|
ecm_mark_nongui_executable(kate-syntax-highlighter)
|
||||||
target_link_libraries(kate-syntax-highlighter KF5SyntaxHighlighting)
|
target_link_libraries(kate-syntax-highlighter KF5SyntaxHighlighting)
|
||||||
|
|
||||||
install(TARGETS kate-syntax-highlighter ${INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS kate-syntax-highlighter ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
@@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
#include "ksyntaxhighlighting_version.h"
|
#include "ksyntaxhighlighting_version.h"
|
||||||
|
|
||||||
|
#include <ansihighlighter.h>
|
||||||
#include <definition.h>
|
#include <definition.h>
|
||||||
#include <definitiondownloader.h>
|
#include <definitiondownloader.h>
|
||||||
#include <htmlhighlighter.h>
|
#include <htmlhighlighter.h>
|
||||||
#include <ansihighlighter.h>
|
|
||||||
#include <repository.h>
|
#include <repository.h>
|
||||||
#include <theme.h>
|
#include <theme.h>
|
||||||
|
|
||||||
@@ -22,7 +22,13 @@
|
|||||||
using namespace KSyntaxHighlighting;
|
using namespace KSyntaxHighlighting;
|
||||||
|
|
||||||
template<class Highlighter, class... Ts>
|
template<class Highlighter, class... Ts>
|
||||||
static void applyHighlighter(Highlighter &highlighter, QCommandLineParser &parser, bool fromFileName, const QString &inFileName, const QCommandLineOption &stdinOption, const QCommandLineOption &outputName, const Ts &...highlightParams)
|
static void applyHighlighter(Highlighter &highlighter,
|
||||||
|
QCommandLineParser &parser,
|
||||||
|
bool fromFileName,
|
||||||
|
const QString &inFileName,
|
||||||
|
const QCommandLineOption &stdinOption,
|
||||||
|
const QCommandLineOption &outputName,
|
||||||
|
const Ts &...highlightParams)
|
||||||
{
|
{
|
||||||
if (parser.isSet(outputName))
|
if (parser.isSet(outputName))
|
||||||
highlighter.setOutputFile(parser.value(outputName));
|
highlighter.setOutputFile(parser.value(outputName));
|
||||||
@@ -56,16 +62,19 @@ int main(int argc, char **argv)
|
|||||||
parser.addVersionOption();
|
parser.addVersionOption();
|
||||||
parser.addPositionalArgument(app.translate("SyntaxHighlightingCLI", "source"), app.translate("SyntaxHighlightingCLI", "The source file to highlight."));
|
parser.addPositionalArgument(app.translate("SyntaxHighlightingCLI", "source"), app.translate("SyntaxHighlightingCLI", "The source file to highlight."));
|
||||||
|
|
||||||
QCommandLineOption listDefs(QStringList() << QStringLiteral("l") << QStringLiteral("list"), app.translate("SyntaxHighlightingCLI", "List all available syntax definitions."));
|
QCommandLineOption listDefs(QStringList() << QStringLiteral("l") << QStringLiteral("list"),
|
||||||
|
app.translate("SyntaxHighlightingCLI", "List all available syntax definitions."));
|
||||||
parser.addOption(listDefs);
|
parser.addOption(listDefs);
|
||||||
QCommandLineOption listThemes(QStringList() << QStringLiteral("list-themes"), app.translate("SyntaxHighlightingCLI", "List all available themes."));
|
QCommandLineOption listThemes(QStringList() << QStringLiteral("list-themes"), app.translate("SyntaxHighlightingCLI", "List all available themes."));
|
||||||
parser.addOption(listThemes);
|
parser.addOption(listThemes);
|
||||||
|
|
||||||
QCommandLineOption updateDefs(QStringList() << QStringLiteral("u") << QStringLiteral("update"), app.translate("SyntaxHighlightingCLI", "Download new/updated syntax definitions."));
|
QCommandLineOption updateDefs(QStringList() << QStringLiteral("u") << QStringLiteral("update"),
|
||||||
|
app.translate("SyntaxHighlightingCLI", "Download new/updated syntax definitions."));
|
||||||
parser.addOption(updateDefs);
|
parser.addOption(updateDefs);
|
||||||
|
|
||||||
QCommandLineOption outputName(
|
QCommandLineOption outputName(QStringList() << QStringLiteral("o") << QStringLiteral("output"),
|
||||||
QStringList() << QStringLiteral("o") << QStringLiteral("output"), app.translate("SyntaxHighlightingCLI", "File to write HTML output to (default: stdout)."), app.translate("SyntaxHighlightingCLI", "output"));
|
app.translate("SyntaxHighlightingCLI", "File to write HTML output to (default: stdout)."),
|
||||||
|
app.translate("SyntaxHighlightingCLI", "output"));
|
||||||
parser.addOption(outputName);
|
parser.addOption(outputName);
|
||||||
|
|
||||||
QCommandLineOption syntaxName(QStringList() << QStringLiteral("s") << QStringLiteral("syntax"),
|
QCommandLineOption syntaxName(QStringList() << QStringLiteral("s") << QStringLiteral("syntax"),
|
||||||
@@ -73,18 +82,23 @@ int main(int argc, char **argv)
|
|||||||
app.translate("SyntaxHighlightingCLI", "syntax"));
|
app.translate("SyntaxHighlightingCLI", "syntax"));
|
||||||
parser.addOption(syntaxName);
|
parser.addOption(syntaxName);
|
||||||
|
|
||||||
QCommandLineOption themeName(
|
QCommandLineOption themeName(QStringList() << QStringLiteral("t") << QStringLiteral("theme"),
|
||||||
QStringList() << QStringLiteral("t") << QStringLiteral("theme"), app.translate("SyntaxHighlightingCLI", "Color theme to use for highlighting."), app.translate("SyntaxHighlightingCLI", "theme"), repo.defaultTheme(Repository::LightTheme).name());
|
app.translate("SyntaxHighlightingCLI", "Color theme to use for highlighting."),
|
||||||
|
app.translate("SyntaxHighlightingCLI", "theme"),
|
||||||
|
repo.defaultTheme(Repository::LightTheme).name());
|
||||||
parser.addOption(themeName);
|
parser.addOption(themeName);
|
||||||
|
|
||||||
QCommandLineOption outputFormatOption(QStringList() << QStringLiteral("f") << QStringLiteral("output-format"),
|
QCommandLineOption outputFormatOption(
|
||||||
|
QStringList() << QStringLiteral("f") << QStringLiteral("output-format"),
|
||||||
app.translate("SyntaxHighlightingCLI", "Use the specified format instead of html. Must be html, ansi or ansi256Colors."),
|
app.translate("SyntaxHighlightingCLI", "Use the specified format instead of html. Must be html, ansi or ansi256Colors."),
|
||||||
app.translate("SyntaxHighlightingCLI", "format"),
|
app.translate("SyntaxHighlightingCLI", "format"),
|
||||||
QStringLiteral("html"));
|
QStringLiteral("html"));
|
||||||
parser.addOption(outputFormatOption);
|
parser.addOption(outputFormatOption);
|
||||||
|
|
||||||
QCommandLineOption traceOption(QStringList() << QStringLiteral("syntax-trace"),
|
QCommandLineOption traceOption(QStringList() << QStringLiteral("syntax-trace"),
|
||||||
app.translate("SyntaxHighlightingCLI", "Add information to debug a syntax file. Only works with --output-format=ansi or ansi256Colors. Possible values are format, region and context."),
|
app.translate("SyntaxHighlightingCLI",
|
||||||
|
"Add information to debug a syntax file. Only works with --output-format=ansi or ansi256Colors. Possible "
|
||||||
|
"values are format, region, context and stackSize."),
|
||||||
app.translate("SyntaxHighlightingCLI", "type"));
|
app.translate("SyntaxHighlightingCLI", "type"));
|
||||||
parser.addOption(traceOption);
|
parser.addOption(traceOption);
|
||||||
|
|
||||||
@@ -92,12 +106,14 @@ int main(int argc, char **argv)
|
|||||||
app.translate("SyntaxHighlightingCLI", "Disable ANSI background for the default color."));
|
app.translate("SyntaxHighlightingCLI", "Disable ANSI background for the default color."));
|
||||||
parser.addOption(noAnsiEditorBg);
|
parser.addOption(noAnsiEditorBg);
|
||||||
|
|
||||||
QCommandLineOption titleOption(QStringList() << QStringLiteral("T") << QStringLiteral("title"),
|
QCommandLineOption titleOption(
|
||||||
|
QStringList() << QStringLiteral("T") << QStringLiteral("title"),
|
||||||
app.translate("SyntaxHighlightingCLI", "Set HTML page's title\n(default: the filename or \"Kate Syntax Highlighter\" if reading from stdin)."),
|
app.translate("SyntaxHighlightingCLI", "Set HTML page's title\n(default: the filename or \"Kate Syntax Highlighter\" if reading from stdin)."),
|
||||||
app.translate("SyntaxHighlightingCLI", "title"));
|
app.translate("SyntaxHighlightingCLI", "title"));
|
||||||
parser.addOption(titleOption);
|
parser.addOption(titleOption);
|
||||||
|
|
||||||
QCommandLineOption stdinOption(QStringList() << QStringLiteral("stdin"), app.translate("SyntaxHighlightingCLI", "Read file from stdin. The -s option must also be used."));
|
QCommandLineOption stdinOption(QStringList() << QStringLiteral("stdin"),
|
||||||
|
app.translate("SyntaxHighlightingCLI", "Read file from stdin. The -s option must also be used."));
|
||||||
parser.addOption(stdinOption);
|
parser.addOption(stdinOption);
|
||||||
|
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
@@ -117,7 +133,9 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (parser.isSet(updateDefs)) {
|
if (parser.isSet(updateDefs)) {
|
||||||
DefinitionDownloader downloader(&repo);
|
DefinitionDownloader downloader(&repo);
|
||||||
QObject::connect(&downloader, &DefinitionDownloader::informationMessage, [](const QString &msg) { std::cout << qPrintable(msg) << std::endl; });
|
QObject::connect(&downloader, &DefinitionDownloader::informationMessage, [](const QString &msg) {
|
||||||
|
std::cout << qPrintable(msg) << std::endl;
|
||||||
|
});
|
||||||
QObject::connect(&downloader, &DefinitionDownloader::done, &app, &QCoreApplication::quit);
|
QObject::connect(&downloader, &DefinitionDownloader::done, &app, &QCoreApplication::quit);
|
||||||
downloader.start();
|
downloader.start();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
@@ -185,6 +203,8 @@ int main(int argc, char **argv)
|
|||||||
debugOptions |= AnsiHighlighter::TraceOption::Region;
|
debugOptions |= AnsiHighlighter::TraceOption::Region;
|
||||||
} else if (option == QStringLiteral("context")) {
|
} else if (option == QStringLiteral("context")) {
|
||||||
debugOptions |= AnsiHighlighter::TraceOption::Context;
|
debugOptions |= AnsiHighlighter::TraceOption::Context;
|
||||||
|
} else if (option == QStringLiteral("stackSize")) {
|
||||||
|
debugOptions |= AnsiHighlighter::TraceOption::StackSize;
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Unknown trace name." << std::endl;
|
std::cerr << "Unknown trace name." << std::endl;
|
||||||
return 2;
|
return 2;
|
||||||
|
@@ -27,7 +27,7 @@ elseif(CMAKE_CROSSCOMPILING)
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/native_katehighlightingindexer-prefix/src/native_katehighlightingindexer-build/bin/katehighlightingindexer)
|
${CMAKE_CURRENT_BINARY_DIR}/native_katehighlightingindexer-prefix/src/native_katehighlightingindexer-build/bin/katehighlightingindexer)
|
||||||
else()
|
else()
|
||||||
# host build
|
# host build
|
||||||
add_executable(katehighlightingindexer katehighlightingindexer.cpp)
|
add_executable(katehighlightingindexer katehighlightingindexer.cpp ../lib/worddelimiters.cpp)
|
||||||
if(Qt5XmlPatterns_FOUND)
|
if(Qt5XmlPatterns_FOUND)
|
||||||
target_link_libraries(katehighlightingindexer Qt5::XmlPatterns)
|
target_link_libraries(katehighlightingindexer Qt5::XmlPatterns)
|
||||||
else()
|
else()
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,7 @@ ecm_generate_headers(SyntaxHighlighting_HEADERS
|
|||||||
REQUIRED_HEADERS SyntaxHighlighting_HEADERS
|
REQUIRED_HEADERS SyntaxHighlighting_HEADERS
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS KF5SyntaxHighlighting EXPORT KF5SyntaxHighlightingTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS KF5SyntaxHighlighting EXPORT KF5SyntaxHighlightingTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
install(FILES
|
install(FILES
|
||||||
${SyntaxHighlighting_HEADERS}
|
${SyntaxHighlighting_HEADERS}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/ksyntaxhighlighting_export.h
|
${CMAKE_CURRENT_BINARY_DIR}/ksyntaxhighlighting_export.h
|
||||||
@@ -66,7 +66,7 @@ if(BUILD_QCH)
|
|||||||
KF5SyntaxHighlighting_QCH
|
KF5SyntaxHighlighting_QCH
|
||||||
NAME KSyntaxHighlighting
|
NAME KSyntaxHighlighting
|
||||||
BASE_NAME KF5SyntaxHighlighting
|
BASE_NAME KF5SyntaxHighlighting
|
||||||
VERSION ${KF5_VERSION}
|
VERSION ${KF_VERSION}
|
||||||
ORG_DOMAIN org.kde
|
ORG_DOMAIN org.kde
|
||||||
SOURCES # using only public headers, to cover only public API
|
SOURCES # using only public headers, to cover only public API
|
||||||
${SyntaxHighlighting_HEADERS}
|
${SyntaxHighlighting_HEADERS}
|
||||||
|
@@ -128,7 +128,8 @@ State AbstractHighlighter::highlightLine(const QString &text, const State &state
|
|||||||
* see https://phabricator.kde.org/D18509
|
* see https://phabricator.kde.org/D18509
|
||||||
*/
|
*/
|
||||||
int endlessLoopingCounter = 0;
|
int endlessLoopingCounter = 0;
|
||||||
while (!stateData->topContext()->lineEmptyContext().isStay() || (stateData->topContext()->lineEmptyContext().isStay() && !stateData->topContext()->lineEndContext().isStay())) {
|
while (!stateData->topContext()->lineEmptyContext().isStay()
|
||||||
|
|| (stateData->topContext()->lineEmptyContext().isStay() && !stateData->topContext()->lineEndContext().isStay())) {
|
||||||
/**
|
/**
|
||||||
* line empty context switches
|
* line empty context switches
|
||||||
*/
|
*/
|
||||||
@@ -143,7 +144,8 @@ State AbstractHighlighter::highlightLine(const QString &text, const State &state
|
|||||||
* line end context switches only when lineEmptyContext is #stay. This avoids
|
* line end context switches only when lineEmptyContext is #stay. This avoids
|
||||||
* skipping empty lines after a line continuation character (see bug 405903)
|
* skipping empty lines after a line continuation character (see bug 405903)
|
||||||
*/
|
*/
|
||||||
} else if (!stateData->topContext()->lineEndContext().isStay() && !d->switchContext(stateData, stateData->topContext()->lineEndContext(), QStringList()))
|
} else if (!stateData->topContext()->lineEndContext().isStay()
|
||||||
|
&& !d->switchContext(stateData, stateData->topContext()->lineEndContext(), QStringList()))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// guard against endless loops
|
// guard against endless loops
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
#include "definition.h"
|
#include "definition.h"
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QStringList;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace KSyntaxHighlighting
|
namespace KSyntaxHighlighting
|
||||||
{
|
{
|
||||||
class ContextSwitch;
|
class ContextSwitch;
|
||||||
|
@@ -5,36 +5,39 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ansihighlighter.h"
|
#include "ansihighlighter.h"
|
||||||
|
#include "context_p.h"
|
||||||
#include "definition.h"
|
#include "definition.h"
|
||||||
|
#include "definition_p.h"
|
||||||
#include "format.h"
|
#include "format.h"
|
||||||
#include "ksyntaxhighlighting_logging.h"
|
#include "ksyntaxhighlighting_logging.h"
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "theme.h"
|
|
||||||
#include "state_p.h"
|
#include "state_p.h"
|
||||||
#include "context_p.h"
|
#include "theme.h"
|
||||||
#include "definition_p.h"
|
|
||||||
|
|
||||||
|
#include <QColor>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QTextStream>
|
|
||||||
#include <QColor>
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QtMath>
|
#include <QTextStream>
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
using namespace KSyntaxHighlighting;
|
using namespace KSyntaxHighlighting;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
struct CieLab
|
struct CieLab {
|
||||||
{
|
|
||||||
double l;
|
double l;
|
||||||
double a;
|
double a;
|
||||||
double b;
|
double b;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef M_PI
|
||||||
|
constexpr double M_PI = 3.14159265358979323846;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
// xterm color reference
|
// xterm color reference
|
||||||
// constexpr Rgb888 xterm256Colors[] {
|
// constexpr Rgb888 xterm256Colors[] {
|
||||||
// {0x00, 0x00, 0x00}, {0x80, 0x00, 0x00}, {0x00, 0x80, 0x00}, {0x80, 0x80, 0x00},
|
// {0x00, 0x00, 0x00}, {0x80, 0x00, 0x00}, {0x00, 0x80, 0x00}, {0x80, 0x80, 0x00},
|
||||||
@@ -377,6 +380,7 @@ namespace
|
|||||||
constexpr double illuminant_D65[] {
|
constexpr double illuminant_D65[] {
|
||||||
0.95047, 1.00000, 1.08883,
|
0.95047, 1.00000, 1.08883,
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
// convert a sRGB (D65) color to CIELAB (D65)
|
// convert a sRGB (D65) color to CIELAB (D65)
|
||||||
CieLab rgbToLab(QRgb rgb)
|
CieLab rgbToLab(QRgb rgb)
|
||||||
@@ -417,14 +421,22 @@ namespace
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
constexpr double epsilon = 1e-15;
|
constexpr double epsilon = 1e-15;
|
||||||
|
|
||||||
inline double sinDegree(double x) { return std::sin(x * M_PI / 180.0); }
|
inline double sinDegree(double x)
|
||||||
|
{
|
||||||
|
return std::sin(x * M_PI / 180.0);
|
||||||
|
}
|
||||||
|
|
||||||
inline double cosDegree(double x) { return std::cos(x * M_PI / 180.0); }
|
inline double cosDegree(double x)
|
||||||
|
{
|
||||||
|
return std::cos(x * M_PI / 180.0);
|
||||||
|
}
|
||||||
|
|
||||||
inline double pow2(double x) { return x * x; }
|
inline double pow2(double x)
|
||||||
|
{
|
||||||
|
return x * x;
|
||||||
|
}
|
||||||
|
|
||||||
inline double computeHPrime(double a_prime, double b)
|
inline double computeHPrime(double a_prime, double b)
|
||||||
{
|
{
|
||||||
@@ -502,16 +514,12 @@ namespace
|
|||||||
const double C_primeBar = 0.5 * (C1_prime + C2_prime);
|
const double C_primeBar = 0.5 * (C1_prime + C2_prime);
|
||||||
const double h_primeBar = computeHPrimeBar(C1_prime, C2_prime, h1_prime, h2_prime);
|
const double h_primeBar = computeHPrimeBar(C1_prime, C2_prime, h1_prime, h2_prime);
|
||||||
|
|
||||||
const double T = 1.0
|
const double T = 1.0 - 0.17 * cosDegree(h_primeBar - 30.0) + 0.24 * cosDegree(2.0 * h_primeBar) + 0.32 * cosDegree(3.0 * h_primeBar + 6.0)
|
||||||
- 0.17 * cosDegree(h_primeBar - 30.0)
|
|
||||||
+ 0.24 * cosDegree(2.0 * h_primeBar)
|
|
||||||
+ 0.32 * cosDegree(3.0 * h_primeBar + 6.0)
|
|
||||||
- 0.20 * cosDegree(4.0 * h_primeBar - 63.0);
|
- 0.20 * cosDegree(4.0 * h_primeBar - 63.0);
|
||||||
|
|
||||||
const double C_primeBar_pow7 = std::pow(C_primeBar, 7.0);
|
const double C_primeBar_pow7 = std::pow(C_primeBar, 7.0);
|
||||||
const double R_C = 2.0 * std::sqrt(C_primeBar_pow7 / (C_primeBar_pow7 + _25_pow_7));
|
const double R_C = 2.0 * std::sqrt(C_primeBar_pow7 / (C_primeBar_pow7 + _25_pow_7));
|
||||||
const double S_L = 1.0 + (0.015 * pow2(L_primeBar - 50.0))
|
const double S_L = 1.0 + (0.015 * pow2(L_primeBar - 50.0)) / std::sqrt(20.0 + pow2(L_primeBar - 50.0));
|
||||||
/ std::sqrt(20.0 + pow2(L_primeBar - 50.0));
|
|
||||||
const double S_C = 1.0 + 0.045 * C_primeBar;
|
const double S_C = 1.0 + 0.045 * C_primeBar;
|
||||||
const double S_H = 1.0 + 0.015 * C_primeBar * T;
|
const double S_H = 1.0 + 0.015 * C_primeBar * T;
|
||||||
const double R_T = -R_C * sinDegree(60.0 * std::exp(-pow2((h_primeBar - 275) / 25.0)));
|
const double R_T = -R_C * sinDegree(60.0 * std::exp(-pow2((h_primeBar - 275) / 25.0)));
|
||||||
@@ -524,14 +532,10 @@ namespace
|
|||||||
const double deltaC = deltaC_prime / (kC * S_C);
|
const double deltaC = deltaC_prime / (kC * S_C);
|
||||||
const double deltaH = deltaH_prime / (kH * S_H);
|
const double deltaH = deltaH_prime / (kH * S_H);
|
||||||
|
|
||||||
return /*std::sqrt*/( deltaL * deltaL
|
return /*std::sqrt*/ (deltaL * deltaL + deltaC * deltaC + deltaH * deltaH + R_T * deltaC * deltaH);
|
||||||
+ deltaC * deltaC
|
|
||||||
+ deltaH * deltaH
|
|
||||||
+ R_T * deltaC * deltaH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct AnsiBuffer
|
struct AnsiBuffer {
|
||||||
{
|
|
||||||
using ColorCache = QMap<QRgb, int>;
|
using ColorCache = QMap<QRgb, int>;
|
||||||
|
|
||||||
void append(char c)
|
void append(char c)
|
||||||
@@ -568,8 +572,7 @@ namespace
|
|||||||
if (x >= 200) {
|
if (x >= 200) {
|
||||||
append('2');
|
append('2');
|
||||||
x -= 200;
|
x -= 200;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
append('1');
|
append('1');
|
||||||
x -= 100;
|
x -= 100;
|
||||||
}
|
}
|
||||||
@@ -578,6 +581,7 @@ namespace
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
constexpr char const* tb2digits =
|
constexpr char const* tb2digits =
|
||||||
"00" "01" "02" "03" "04" "05" "06" "07" "08" "09"
|
"00" "01" "02" "03" "04" "05" "06" "07" "08" "09"
|
||||||
"10" "11" "12" "13" "14" "15" "16" "17" "18" "19"
|
"10" "11" "12" "13" "14" "15" "16" "17" "18" "19"
|
||||||
@@ -588,8 +592,9 @@ namespace
|
|||||||
"60" "61" "62" "63" "64" "65" "66" "67" "68" "69"
|
"60" "61" "62" "63" "64" "65" "66" "67" "68" "69"
|
||||||
"70" "71" "72" "73" "74" "75" "76" "77" "78" "79"
|
"70" "71" "72" "73" "74" "75" "76" "77" "78" "79"
|
||||||
"80" "81" "82" "83" "84" "85" "86" "87" "88" "89"
|
"80" "81" "82" "83" "84" "85" "86" "87" "88" "89"
|
||||||
"90" "91" "92" "93" "94" "95" "96" "97" "98" "99"
|
"90" "91" "92" "93" "94" "95" "96" "97" "98" "99";
|
||||||
;
|
// clang-format on
|
||||||
|
|
||||||
auto *p = tb2digits + x * 2;
|
auto *p = tb2digits + x * 2;
|
||||||
append(p[0]);
|
append(p[0]);
|
||||||
append(p[1]);
|
append(p[1]);
|
||||||
@@ -612,8 +617,7 @@ namespace
|
|||||||
// add 16 to convert 240 colors mode to 256 colors mode
|
// add 16 to convert 240 colors mode to 256 colors mode
|
||||||
idx += 16;
|
idx += 16;
|
||||||
colorCache.insert(rgb, idx);
|
colorCache.insert(rgb, idx);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
idx = it.value();
|
idx = it.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -669,16 +673,14 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GraphLine
|
struct GraphLine {
|
||||||
{
|
|
||||||
QString graphLine;
|
QString graphLine;
|
||||||
QString labelLine;
|
QString labelLine;
|
||||||
int graphLineLength = 0;
|
int graphLineLength = 0;
|
||||||
int labelLineLength = 0;
|
int labelLineLength = 0;
|
||||||
int nextLabelOffset = 0;
|
int nextLabelOffset = 0;
|
||||||
|
|
||||||
template<class String>
|
template<class String> void pushLabel(int offset, String const &s, int charCounter)
|
||||||
void pushLabel(int offset, String const& s, int charCounter)
|
|
||||||
{
|
{
|
||||||
Q_ASSERT(offset >= labelLineLength);
|
Q_ASSERT(offset >= labelLineLength);
|
||||||
const int n = offset - labelLineLength;
|
const int n = offset - labelLineLength;
|
||||||
@@ -688,8 +690,7 @@ namespace
|
|||||||
nextLabelOffset = labelLineLength;
|
nextLabelOffset = labelLineLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class String>
|
template<class String> void pushGraph(int offset, String const &s, int charCounter)
|
||||||
void pushGraph(int offset, String const& s, int charCounter)
|
|
||||||
{
|
{
|
||||||
Q_ASSERT(offset >= graphLineLength);
|
Q_ASSERT(offset >= graphLineLength);
|
||||||
const int n = offset - graphLineLength;
|
const int n = offset - graphLineLength;
|
||||||
@@ -709,11 +710,11 @@ namespace
|
|||||||
static void fillLine(QString &s, int n)
|
static void fillLine(QString &s, int n)
|
||||||
{
|
{
|
||||||
Q_ASSERT(n >= 0);
|
Q_ASSERT(n >= 0);
|
||||||
fillString(s, n, QStringLiteral(
|
fillString(s,
|
||||||
|
n,
|
||||||
|
QStringLiteral(" "
|
||||||
" "
|
" "
|
||||||
" "
|
" "));
|
||||||
" "
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -754,14 +755,20 @@ namespace
|
|||||||
m_contextCapture.setDefinition(def);
|
m_contextCapture.setDefinition(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
void highlightData(QTextStream &in, QTextStream &out, QLatin1String infoStyle, QLatin1String editorBackground, const std::vector<QPair<QString, QString>> &ansiStyles, TraceOptions traceOptions)
|
void highlightData(QTextStream &in,
|
||||||
|
QTextStream &out,
|
||||||
|
QLatin1String infoStyle,
|
||||||
|
QLatin1String editorBackground,
|
||||||
|
const std::vector<QPair<QString, QString>> &ansiStyles,
|
||||||
|
TraceOptions traceOptions)
|
||||||
{
|
{
|
||||||
initRegionStyles(ansiStyles);
|
initRegionStyles(ansiStyles);
|
||||||
|
|
||||||
m_hasFormatTrace = traceOptions.testFlag(TraceOption::Format);
|
m_hasFormatTrace = traceOptions.testFlag(TraceOption::Format);
|
||||||
m_hasRegionTrace = traceOptions.testFlag(TraceOption::Region);
|
m_hasRegionTrace = traceOptions.testFlag(TraceOption::Region);
|
||||||
const bool hasContextTrace = traceOptions.testFlag(TraceOption::Context);
|
m_hasStackSizeTrace = traceOptions.testFlag(TraceOption::StackSize);
|
||||||
const bool hasFormatOrContextTrace = m_hasFormatTrace || hasContextTrace;
|
m_hasContextTrace = traceOptions.testFlag(TraceOption::Context);
|
||||||
|
const bool hasFormatOrContextTrace = m_hasFormatTrace || m_hasContextTrace || m_hasStackSizeTrace;
|
||||||
|
|
||||||
const bool hasSeparator = hasFormatOrContextTrace && m_hasRegionTrace;
|
const bool hasSeparator = hasFormatOrContextTrace && m_hasRegionTrace;
|
||||||
const QString resetBgColor = (editorBackground.isEmpty() ? QStringLiteral("\x1b[0m") : editorBackground);
|
const QString resetBgColor = (editorBackground.isEmpty() ? QStringLiteral("\x1b[0m") : editorBackground);
|
||||||
@@ -792,7 +799,7 @@ namespace
|
|||||||
out << QStringLiteral("\x1b[K\n");
|
out << QStringLiteral("\x1b[K\n");
|
||||||
|
|
||||||
if (hasFormatOrContextTrace && !m_highlightedFragments.empty()) {
|
if (hasFormatOrContextTrace && !m_highlightedFragments.empty()) {
|
||||||
if (hasContextTrace)
|
if (m_hasContextTrace || m_hasStackSizeTrace)
|
||||||
appendContextNames(oldState, currentLine);
|
appendContextNames(oldState, currentLine);
|
||||||
|
|
||||||
printFormats(out, infoStyle, ansiStyles);
|
printFormats(out, infoStyle, ansiStyles);
|
||||||
@@ -810,12 +817,22 @@ namespace
|
|||||||
|
|
||||||
void applyFolding(int offset, int /*length*/, FoldingRegion region) override
|
void applyFolding(int offset, int /*length*/, FoldingRegion region) override
|
||||||
{
|
{
|
||||||
if (!m_hasRegionTrace) return;
|
if (!m_hasRegionTrace)
|
||||||
|
return;
|
||||||
|
|
||||||
const auto id = region.id();
|
const auto id = region.id();
|
||||||
|
|
||||||
if (region.type() == FoldingRegion::Begin) {
|
if (region.type() == FoldingRegion::Begin) {
|
||||||
m_regions.push_back(Region{m_regionDepth, offset, -1, id, Region::State::Open});
|
m_regions.push_back(Region{m_regionDepth, offset, -1, id, Region::State::Open});
|
||||||
|
// swap with previous region if this is a closing region with same offset in order to superimpose labels
|
||||||
|
if (m_regions.size() >= 2) {
|
||||||
|
auto &previousRegion = m_regions[m_regions.size() - 2];
|
||||||
|
if (previousRegion.state == Region::State::Close && previousRegion.offset == offset) {
|
||||||
|
std::swap(previousRegion, m_regions.back());
|
||||||
|
if (previousRegion.bindIndex != -1)
|
||||||
|
m_regions[previousRegion.bindIndex].bindIndex = m_regions.size() - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
++m_regionDepth;
|
++m_regionDepth;
|
||||||
} else {
|
} else {
|
||||||
// find open region
|
// find open region
|
||||||
@@ -889,17 +906,25 @@ namespace
|
|||||||
*/
|
*/
|
||||||
QString extractContextName(StateData *stateData) const
|
QString extractContextName(StateData *stateData) const
|
||||||
{
|
{
|
||||||
|
QString label;
|
||||||
|
|
||||||
|
if (m_hasStackSizeTrace) {
|
||||||
|
label += QLatin1Char('(') % QString::number(stateData->size()) % QLatin1Char(')');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_hasContextTrace) {
|
||||||
// first state is empty
|
// first state is empty
|
||||||
if (stateData->isEmpty()) {
|
if (stateData->isEmpty()) {
|
||||||
return QStringLiteral("[???]");
|
return label + QStringLiteral("[???]");
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto context = stateData->topContext();
|
const auto context = stateData->topContext();
|
||||||
const auto defData = DefinitionData::get(context->definition());
|
const auto defData = DefinitionData::get(context->definition());
|
||||||
const auto contextName = (defData != m_defData)
|
const auto contextName = (defData != m_defData) ? QString(QLatin1Char('<') % defData->name % QLatin1Char('>')) : QString();
|
||||||
? QString(QLatin1Char('<') % defData->name % QLatin1Char('>'))
|
return QString(label % contextName % QLatin1Char('[') % context->name() % QLatin1Char(']'));
|
||||||
: QString();
|
}
|
||||||
return QString(contextName % QLatin1Char('[') % context->name() % QLatin1Char(']'));
|
|
||||||
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
void printFormats(QTextStream &out, QLatin1String regionStyle, const std::vector<QPair<QString, QString>> &ansiStyles)
|
void printFormats(QTextStream &out, QLatin1String regionStyle, const std::vector<QPair<QString, QString>> &ansiStyles)
|
||||||
@@ -1035,9 +1060,12 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
// keep regions that are not closed
|
// keep regions that are not closed
|
||||||
m_regions.erase(std::remove_if(m_regions.begin(), m_regions.end(), [](Region const& region){
|
m_regions.erase(std::remove_if(m_regions.begin(),
|
||||||
|
m_regions.end(),
|
||||||
|
[](Region const ®ion) {
|
||||||
return region.bindIndex != -1 || region.state == Region::State::Close;
|
return region.bindIndex != -1 || region.state == Region::State::Close;
|
||||||
}), m_regions.end());
|
}),
|
||||||
|
m_regions.end());
|
||||||
// all remaining regions become Continuation
|
// all remaining regions become Continuation
|
||||||
for (auto ®ion : m_regions) {
|
for (auto ®ion : m_regions) {
|
||||||
region.offset = 0;
|
region.offset = 0;
|
||||||
@@ -1045,16 +1073,14 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct HighlightFragment
|
struct HighlightFragment {
|
||||||
{
|
|
||||||
QString name;
|
QString name;
|
||||||
int offset;
|
int offset;
|
||||||
int length;
|
int length;
|
||||||
quint16 formatId;
|
quint16 formatId;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ContextCaptureHighlighter : KSyntaxHighlighting::AbstractHighlighter
|
struct ContextCaptureHighlighter : KSyntaxHighlighting::AbstractHighlighter {
|
||||||
{
|
|
||||||
int offset;
|
int offset;
|
||||||
int length;
|
int length;
|
||||||
int offsetNext;
|
int offsetNext;
|
||||||
@@ -1071,10 +1097,8 @@ namespace
|
|||||||
using KSyntaxHighlighting::AbstractHighlighter::highlightLine;
|
using KSyntaxHighlighting::AbstractHighlighter::highlightLine;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Region
|
struct Region {
|
||||||
{
|
enum class State : int8_t {
|
||||||
enum class State : int8_t
|
|
||||||
{
|
|
||||||
Open,
|
Open,
|
||||||
Close,
|
Close,
|
||||||
Continuation,
|
Continuation,
|
||||||
@@ -1089,6 +1113,8 @@ namespace
|
|||||||
|
|
||||||
bool m_hasFormatTrace;
|
bool m_hasFormatTrace;
|
||||||
bool m_hasRegionTrace;
|
bool m_hasRegionTrace;
|
||||||
|
bool m_hasStackSizeTrace;
|
||||||
|
bool m_hasContextTrace;
|
||||||
|
|
||||||
std::vector<HighlightFragment> m_highlightedFragments;
|
std::vector<HighlightFragment> m_highlightedFragments;
|
||||||
std::vector<GraphLine> m_formatGraph;
|
std::vector<GraphLine> m_formatGraph;
|
||||||
@@ -1210,11 +1236,16 @@ void AnsiHighlighter::highlightData(QIODevice *dev, AnsiFormat format, bool useE
|
|||||||
buffer.appendForeground(format.textColor(theme).rgb(), is256Colors, colorCache);
|
buffer.appendForeground(format.textColor(theme).rgb(), is256Colors, colorCache);
|
||||||
else
|
else
|
||||||
buffer.append(foregroundDefaultColor);
|
buffer.append(foregroundDefaultColor);
|
||||||
if (hasBg) buffer.appendBackground(format.backgroundColor(theme).rgb(), is256Colors, colorCache);
|
if (hasBg)
|
||||||
if (hasBold) buffer.append(QLatin1String("1;"));
|
buffer.appendBackground(format.backgroundColor(theme).rgb(), is256Colors, colorCache);
|
||||||
if (hasItalic) buffer.append(QLatin1String("3;"));
|
if (hasBold)
|
||||||
if (hasUnderline) buffer.append(QLatin1String("4;"));
|
buffer.append(QLatin1String("1;"));
|
||||||
if (hasStrikeThrough) buffer.append(QLatin1String("9;"));
|
if (hasItalic)
|
||||||
|
buffer.append(QLatin1String("3;"));
|
||||||
|
if (hasUnderline)
|
||||||
|
buffer.append(QLatin1String("4;"));
|
||||||
|
if (hasStrikeThrough)
|
||||||
|
buffer.append(QLatin1String("9;"));
|
||||||
|
|
||||||
// if there is ANSI style
|
// if there is ANSI style
|
||||||
if (buffer.latin1().size() > 2) {
|
if (buffer.latin1().size() > 2) {
|
||||||
@@ -1231,10 +1262,14 @@ void AnsiHighlighter::highlightData(QIODevice *dev, AnsiFormat format, bool useE
|
|||||||
d->ansiStyles[id].second = buffer.latin1();
|
d->ansiStyles[id].second = buffer.latin1();
|
||||||
} else if (hasEffect) {
|
} else if (hasEffect) {
|
||||||
buffer.append(QLatin1String("\x1b["));
|
buffer.append(QLatin1String("\x1b["));
|
||||||
if (hasBold) buffer.append(QLatin1String("21;"));
|
if (hasBold)
|
||||||
if (hasItalic) buffer.append(QLatin1String("23;"));
|
buffer.append(QLatin1String("21;"));
|
||||||
if (hasUnderline) buffer.append(QLatin1String("24;"));
|
if (hasItalic)
|
||||||
if (hasStrikeThrough) buffer.append(QLatin1String("29;"));
|
buffer.append(QLatin1String("23;"));
|
||||||
|
if (hasUnderline)
|
||||||
|
buffer.append(QLatin1String("24;"));
|
||||||
|
if (hasStrikeThrough)
|
||||||
|
buffer.append(QLatin1String("29;"));
|
||||||
buffer.setFinalStyle();
|
buffer.setFinalStyle();
|
||||||
d->ansiStyles[id].second = buffer.latin1();
|
d->ansiStyles[id].second = buffer.latin1();
|
||||||
}
|
}
|
||||||
|
@@ -10,9 +10,9 @@
|
|||||||
#include "abstracthighlighter.h"
|
#include "abstracthighlighter.h"
|
||||||
#include "ksyntaxhighlighting_export.h"
|
#include "ksyntaxhighlighting_export.h"
|
||||||
|
|
||||||
|
#include <QFlags>
|
||||||
#include <QIODevice>
|
#include <QIODevice>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QFlags>
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@@ -23,26 +23,29 @@ class AnsiHighlighterPrivate;
|
|||||||
class KSYNTAXHIGHLIGHTING_EXPORT AnsiHighlighter final : public AbstractHighlighter
|
class KSYNTAXHIGHLIGHTING_EXPORT AnsiHighlighter final : public AbstractHighlighter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum class AnsiFormat
|
enum class AnsiFormat {
|
||||||
{
|
|
||||||
TrueColor,
|
TrueColor,
|
||||||
XTerm256Color,
|
XTerm256Color,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class TraceOption
|
enum class TraceOption {
|
||||||
{
|
|
||||||
NoOptions,
|
NoOptions,
|
||||||
Format = 1 << 0,
|
Format = 1 << 0,
|
||||||
Region = 1 << 1,
|
Region = 1 << 1,
|
||||||
Context = 1 << 2,
|
Context = 1 << 2,
|
||||||
|
StackSize = 1 << 3,
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(TraceOptions, TraceOption)
|
Q_DECLARE_FLAGS(TraceOptions, TraceOption)
|
||||||
|
|
||||||
AnsiHighlighter();
|
AnsiHighlighter();
|
||||||
~AnsiHighlighter() override;
|
~AnsiHighlighter() override;
|
||||||
|
|
||||||
void highlightFile(const QString &fileName, AnsiFormat format = AnsiFormat::TrueColor, bool useEditorBackground = true, TraceOptions traceOptions = TraceOptions());
|
void highlightFile(const QString &fileName,
|
||||||
void highlightData(QIODevice *device, AnsiFormat format = AnsiFormat::TrueColor, bool useEditorBackground = true, TraceOptions traceOptions = TraceOptions());
|
AnsiFormat format = AnsiFormat::TrueColor,
|
||||||
|
bool useEditorBackground = true,
|
||||||
|
TraceOptions traceOptions = TraceOptions());
|
||||||
|
void
|
||||||
|
highlightData(QIODevice *device, AnsiFormat format = AnsiFormat::TrueColor, bool useEditorBackground = true, TraceOptions traceOptions = TraceOptions());
|
||||||
|
|
||||||
void setOutputFile(const QString &fileName);
|
void setOutputFile(const QString &fileName);
|
||||||
void setOutputFile(FILE *fileHandle);
|
void setOutputFile(FILE *fileHandle);
|
||||||
|
@@ -135,7 +135,8 @@ void Context::resolveIncludes()
|
|||||||
context = defData->contextByName(inc->contextName());
|
context = defData->contextByName(inc->contextName());
|
||||||
}
|
}
|
||||||
if (!context) {
|
if (!context) {
|
||||||
qCWarning(Log) << "Unable to resolve include rule for definition" << inc->contextName() << "##" << inc->definitionName() << "in" << m_def.definition().name();
|
qCWarning(Log) << "Unable to resolve include rule for definition" << inc->contextName() << "##" << inc->definitionName() << "in"
|
||||||
|
<< m_def.definition().name();
|
||||||
++it;
|
++it;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -171,7 +172,8 @@ void Context::resolveAttributeFormat()
|
|||||||
m_attributeFormat = DefinitionData::get(def)->formatByName(m_attribute);
|
m_attributeFormat = DefinitionData::get(def)->formatByName(m_attribute);
|
||||||
if (!m_attributeFormat.isValid()) {
|
if (!m_attributeFormat.isValid()) {
|
||||||
if (m_attributeContext) {
|
if (m_attributeContext) {
|
||||||
qCWarning(Log) << "Context: Unknown format" << m_attribute << "in context" << m_name << "of definition" << m_def.definition().name() << "from included context" << m_attributeContext->m_name << "of definition" << def.name();
|
qCWarning(Log) << "Context: Unknown format" << m_attribute << "in context" << m_name << "of definition" << m_def.definition().name()
|
||||||
|
<< "from included context" << m_attributeContext->m_name << "of definition" << def.name();
|
||||||
} else {
|
} else {
|
||||||
qCWarning(Log) << "Context: Unknown format" << m_attribute << "in context" << m_name << "of definition" << m_def.definition().name();
|
qCWarning(Log) << "Context: Unknown format" << m_attribute << "in context" << m_name << "of definition" << m_def.definition().name();
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ Context *ContextSwitch::context() const
|
|||||||
return m_context;
|
return m_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContextSwitch::parse(const QStringView &contextInstr)
|
void ContextSwitch::parse(const QStringRef &contextInstr)
|
||||||
{
|
{
|
||||||
if (contextInstr.isEmpty() || contextInstr == QLatin1String("#stay"))
|
if (contextInstr.isEmpty() || contextInstr == QLatin1String("#stay"))
|
||||||
return;
|
return;
|
||||||
|
@@ -25,7 +25,7 @@ public:
|
|||||||
int popCount() const;
|
int popCount() const;
|
||||||
Context *context() const;
|
Context *context() const;
|
||||||
|
|
||||||
void parse(const QStringView &contextInstr);
|
void parse(const QStringRef &contextInstr);
|
||||||
void resolve(const Definition &def);
|
void resolve(const Definition &def);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -19,15 +19,14 @@
|
|||||||
#include "repository.h"
|
#include "repository.h"
|
||||||
#include "repository_p.h"
|
#include "repository_p.h"
|
||||||
#include "rule_p.h"
|
#include "rule_p.h"
|
||||||
#include "xml_p.h"
|
|
||||||
#include "worddelimiters_p.h"
|
#include "worddelimiters_p.h"
|
||||||
|
#include "xml_p.h"
|
||||||
|
|
||||||
#include <QCborMap>
|
#include <QCborMap>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QVector>
|
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -234,7 +233,9 @@ QVector<Format> Definition::formats() const
|
|||||||
|
|
||||||
// sort formats so that the order matches the order of the itemDatas in the xml files.
|
// sort formats so that the order matches the order of the itemDatas in the xml files.
|
||||||
auto formatList = QVector<Format>::fromList(d->formats.values());
|
auto formatList = QVector<Format>::fromList(d->formats.values());
|
||||||
std::sort(formatList.begin(), formatList.end(), [](const KSyntaxHighlighting::Format &lhs, const KSyntaxHighlighting::Format &rhs) { return lhs.id() < rhs.id(); });
|
std::sort(formatList.begin(), formatList.end(), [](const KSyntaxHighlighting::Format &lhs, const KSyntaxHighlighting::Format &rhs) {
|
||||||
|
return lhs.id() < rhs.id();
|
||||||
|
});
|
||||||
|
|
||||||
return formatList;
|
return formatList;
|
||||||
}
|
}
|
||||||
@@ -252,7 +253,8 @@ QVector<Definition> Definition::includedDefinitions() const
|
|||||||
const auto definition = queue.takeLast();
|
const auto definition = queue.takeLast();
|
||||||
for (const auto &context : qAsConst(definition.d->contexts)) {
|
for (const auto &context : qAsConst(definition.d->contexts)) {
|
||||||
// handle context switch attributes of this context itself
|
// handle context switch attributes of this context itself
|
||||||
for (const auto switchContext : {context->lineEndContext().context(), context->lineEmptyContext().context(), context->fallthroughContext().context()}) {
|
for (const auto switchContext :
|
||||||
|
{context->lineEndContext().context(), context->lineEmptyContext().context(), context->fallthroughContext().context()}) {
|
||||||
if (switchContext) {
|
if (switchContext) {
|
||||||
if (!definitions.contains(switchContext->definition())) {
|
if (!definitions.contains(switchContext->definition())) {
|
||||||
queue.push_back(switchContext->definition());
|
queue.push_back(switchContext->definition());
|
||||||
@@ -387,6 +389,12 @@ bool DefinitionData::load(OnlyKeywords onlyKeywords)
|
|||||||
context->resolveAttributeFormat();
|
context->resolveAttributeFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const auto context : qAsConst(contexts)) {
|
||||||
|
for (const auto &rule : context->rules()) {
|
||||||
|
rule->resolvePostProcessing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,18 +457,10 @@ bool DefinitionData::loadMetaData(const QString &file, const QCborMap &obj)
|
|||||||
fileName = file;
|
fileName = file;
|
||||||
|
|
||||||
const auto exts = obj.value(QLatin1String("extensions")).toString();
|
const auto exts = obj.value(QLatin1String("extensions")).toString();
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
for (const auto &ext : exts.split(QLatin1Char(';'), QString::SkipEmptyParts))
|
|
||||||
#else
|
|
||||||
for (const auto &ext : exts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
for (const auto &ext : exts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
||||||
#endif
|
|
||||||
extensions.push_back(ext);
|
extensions.push_back(ext);
|
||||||
const auto mts = obj.value(QLatin1String("mimetype")).toString();
|
const auto mts = obj.value(QLatin1String("mimetype")).toString();
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
for (const auto &mt : mts.split(QLatin1Char(';'), QString::SkipEmptyParts))
|
|
||||||
#else
|
|
||||||
for (const auto &mt : mts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
for (const auto &mt : mts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
||||||
#endif
|
|
||||||
mimetypes.push_back(mt);
|
mimetypes.push_back(mt);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -485,18 +485,10 @@ bool DefinitionData::loadLanguage(QXmlStreamReader &reader)
|
|||||||
author = reader.attributes().value(QLatin1String("author")).toString();
|
author = reader.attributes().value(QLatin1String("author")).toString();
|
||||||
license = reader.attributes().value(QLatin1String("license")).toString();
|
license = reader.attributes().value(QLatin1String("license")).toString();
|
||||||
const auto exts = reader.attributes().value(QLatin1String("extensions")).toString();
|
const auto exts = reader.attributes().value(QLatin1String("extensions")).toString();
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
for (const auto &ext : exts.split(QLatin1Char(';'), QString::SkipEmptyParts))
|
|
||||||
#else
|
|
||||||
for (const auto &ext : exts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
for (const auto &ext : exts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
||||||
#endif
|
|
||||||
extensions.push_back(ext);
|
extensions.push_back(ext);
|
||||||
const auto mts = reader.attributes().value(QLatin1String("mimetype")).toString();
|
const auto mts = reader.attributes().value(QLatin1String("mimetype")).toString();
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
|
||||||
for (const auto &mt : mts.split(QLatin1Char(';'), QString::SkipEmptyParts))
|
|
||||||
#else
|
|
||||||
for (const auto &mt : mts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
for (const auto &mt : mts.split(QLatin1Char(';'), Qt::SkipEmptyParts))
|
||||||
#endif
|
|
||||||
mimetypes.push_back(mt);
|
mimetypes.push_back(mt);
|
||||||
if (reader.attributes().hasAttribute(QLatin1String("casesensitive")))
|
if (reader.attributes().hasAttribute(QLatin1String("casesensitive")))
|
||||||
caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
|
caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
|
||||||
@@ -630,19 +622,15 @@ void DefinitionData::loadGeneral(QXmlStreamReader &reader)
|
|||||||
caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
|
caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
|
||||||
|
|
||||||
// adapt wordDelimiters
|
// adapt wordDelimiters
|
||||||
for (QChar c : reader.attributes().value(QLatin1String("additionalDeliminator")))
|
wordDelimiters.append(reader.attributes().value(QLatin1String("additionalDeliminator")));
|
||||||
wordDelimiters.append(c);
|
wordDelimiters.remove(reader.attributes().value(QLatin1String("weakDeliminator")));
|
||||||
for (QChar c : reader.attributes().value(QLatin1String("weakDeliminator")))
|
|
||||||
wordDelimiters.remove(c);
|
|
||||||
|
|
||||||
// adapt WordWrapDelimiters
|
// adapt WordWrapDelimiters
|
||||||
auto wordWrapDeliminatorAttr = reader.attributes().value(
|
QStringRef wordWrapDeliminatorAttr = reader.attributes().value(QLatin1String("wordWrapDeliminator"));
|
||||||
QLatin1String("wordWrapDeliminator"));
|
|
||||||
if (wordWrapDeliminatorAttr.isEmpty())
|
if (wordWrapDeliminatorAttr.isEmpty())
|
||||||
wordWrapDelimiters = wordDelimiters;
|
wordWrapDelimiters = wordDelimiters;
|
||||||
else {
|
else {
|
||||||
for (QChar c : wordWrapDeliminatorAttr)
|
wordWrapDelimiters.append(wordWrapDeliminatorAttr);
|
||||||
wordWrapDelimiters.append(c);
|
|
||||||
}
|
}
|
||||||
} else if (reader.name() == QLatin1String("folding")) {
|
} else if (reader.name() == QLatin1String("folding")) {
|
||||||
if (reader.attributes().hasAttribute(QLatin1String("indentationsensitive")))
|
if (reader.attributes().hasAttribute(QLatin1String("indentationsensitive")))
|
||||||
@@ -776,15 +764,15 @@ void DefinitionData::loadSpellchecking(QXmlStreamReader &reader)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefinitionData::checkKateVersion(const QStringView &verStr)
|
bool DefinitionData::checkKateVersion(const QStringRef &verStr)
|
||||||
{
|
{
|
||||||
const auto idx = verStr.indexOf(QLatin1Char('.'));
|
const auto idx = verStr.indexOf(QLatin1Char('.'));
|
||||||
if (idx <= 0) {
|
if (idx <= 0) {
|
||||||
qCWarning(Log) << "Skipping" << fileName << "due to having no valid kateversion attribute:" << verStr;
|
qCWarning(Log) << "Skipping" << fileName << "due to having no valid kateversion attribute:" << verStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto major = verStr.left(idx).toString().toInt();
|
const auto major = verStr.left(idx).toInt();
|
||||||
const auto minor = verStr.mid(idx + 1).toString().toInt();
|
const auto minor = verStr.mid(idx + 1).toInt();
|
||||||
|
|
||||||
if (major > SyntaxHighlighting_VERSION_MAJOR || (major == SyntaxHighlighting_VERSION_MAJOR && minor > SyntaxHighlighting_VERSION_MINOR)) {
|
if (major > SyntaxHighlighting_VERSION_MAJOR || (major == SyntaxHighlighting_VERSION_MAJOR && minor > SyntaxHighlighting_VERSION_MINOR)) {
|
||||||
qCWarning(Log) << "Skipping" << fileName << "due to being too new, version:" << verStr;
|
qCWarning(Log) << "Skipping" << fileName << "due to being too new, version:" << verStr;
|
||||||
|
@@ -17,6 +17,8 @@
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QChar;
|
class QChar;
|
||||||
class QString;
|
class QString;
|
||||||
|
class QStringList;
|
||||||
|
template<typename T> class QVector;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace KSyntaxHighlighting
|
namespace KSyntaxHighlighting
|
||||||
|
@@ -53,7 +53,7 @@ public:
|
|||||||
void loadComments(QXmlStreamReader &reader);
|
void loadComments(QXmlStreamReader &reader);
|
||||||
void loadFoldingIgnoreList(QXmlStreamReader &reader);
|
void loadFoldingIgnoreList(QXmlStreamReader &reader);
|
||||||
void loadSpellchecking(QXmlStreamReader &reader);
|
void loadSpellchecking(QXmlStreamReader &reader);
|
||||||
bool checkKateVersion(const QStringView &verStr);
|
bool checkKateVersion(const QStringRef &verStr);
|
||||||
|
|
||||||
void resolveIncludeKeywords();
|
void resolveIncludeKeywords();
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ void DefinitionDownloaderPrivate::definitionListDownloadFinished(QNetworkReply *
|
|||||||
const auto networkError = reply->error();
|
const auto networkError = reply->error();
|
||||||
if (networkError != QNetworkReply::NoError) {
|
if (networkError != QNetworkReply::NoError) {
|
||||||
qCWarning(Log) << networkError;
|
qCWarning(Log) << networkError;
|
||||||
emit q->done(); // TODO return error
|
Q_EMIT q->done(); // TODO return error
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ void DefinitionDownloaderPrivate::definitionListDownloadFinished(QNetworkReply *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pendingDownloads == 0)
|
if (pendingDownloads == 0)
|
||||||
emit q->informationMessage(QObject::tr("All syntax definitions are up-to-date."));
|
Q_EMIT q->informationMessage(QObject::tr("All syntax definitions are up-to-date."));
|
||||||
checkDone();
|
checkDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,14 +72,14 @@ void DefinitionDownloaderPrivate::updateDefinition(QXmlStreamReader &parser)
|
|||||||
|
|
||||||
auto localDef = repo->definitionForName(name.toString());
|
auto localDef = repo->definitionForName(name.toString());
|
||||||
if (!localDef.isValid()) {
|
if (!localDef.isValid()) {
|
||||||
emit q->informationMessage(QObject::tr("Downloading new syntax definition for '%1'...").arg(name.toString()));
|
Q_EMIT q->informationMessage(QObject::tr("Downloading new syntax definition for '%1'...").arg(name.toString()));
|
||||||
downloadDefinition(QUrl(parser.attributes().value(QLatin1String("url")).toString()));
|
downloadDefinition(QUrl(parser.attributes().value(QLatin1String("url")).toString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto version = parser.attributes().value(QLatin1String("version"));
|
const auto version = parser.attributes().value(QLatin1String("version"));
|
||||||
if (localDef.version() < version.toFloat()) {
|
if (localDef.version() < version.toFloat()) {
|
||||||
emit q->informationMessage(QObject::tr("Updating syntax definition for '%1' to version %2...").arg(name.toString(), version.toString()));
|
Q_EMIT q->informationMessage(QObject::tr("Updating syntax definition for '%1' to version %2...").arg(name.toString(), version.toString()));
|
||||||
downloadDefinition(QUrl(parser.attributes().value(QLatin1String("url")).toString()));
|
downloadDefinition(QUrl(parser.attributes().value(QLatin1String("url")).toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,9 @@ void DefinitionDownloaderPrivate::downloadDefinition(const QUrl &downloadUrl)
|
|||||||
|
|
||||||
QNetworkRequest req(url);
|
QNetworkRequest req(url);
|
||||||
auto reply = nam->get(req);
|
auto reply = nam->get(req);
|
||||||
QObject::connect(reply, &QNetworkReply::finished, q, [this, reply]() { downloadDefinitionFinished(reply); });
|
QObject::connect(reply, &QNetworkReply::finished, q, [this, reply]() {
|
||||||
|
downloadDefinitionFinished(reply);
|
||||||
|
});
|
||||||
++pendingDownloads;
|
++pendingDownloads;
|
||||||
needsReload = true;
|
needsReload = true;
|
||||||
}
|
}
|
||||||
@@ -134,7 +136,7 @@ void DefinitionDownloaderPrivate::checkDone()
|
|||||||
if (needsReload)
|
if (needsReload)
|
||||||
repo->reload();
|
repo->reload();
|
||||||
|
|
||||||
emit QTimer::singleShot(0, q, &DefinitionDownloader::done);
|
Q_EMIT QTimer::singleShot(0, q, &DefinitionDownloader::done);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,10 +163,12 @@ DefinitionDownloader::~DefinitionDownloader()
|
|||||||
|
|
||||||
void DefinitionDownloader::start()
|
void DefinitionDownloader::start()
|
||||||
{
|
{
|
||||||
const QString url = QLatin1String("https://www.kate-editor.org/syntax/update-") + QString::number(SyntaxHighlighting_VERSION_MAJOR) + QLatin1Char('.') + QString::number(SyntaxHighlighting_VERSION_MINOR) + QLatin1String(".xml");
|
const QString url = QLatin1String("https://www.kate-editor.org/syntax/update-") + QString::number(SyntaxHighlighting_VERSION_MAJOR) + QLatin1Char('.')
|
||||||
|
+ QString::number(SyntaxHighlighting_VERSION_MINOR) + QLatin1String(".xml");
|
||||||
auto req = QNetworkRequest(QUrl(url));
|
auto req = QNetworkRequest(QUrl(url));
|
||||||
req.setAttribute(QNetworkRequest::RedirectPolicyAttribute,
|
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||||
QNetworkRequest::NoLessSafeRedirectPolicy);
|
|
||||||
auto reply = d->nam->get(req);
|
auto reply = d->nam->get(req);
|
||||||
QObject::connect(reply, &QNetworkReply::finished, this, [=]() { d->definitionListDownloadFinished(reply); });
|
QObject::connect(reply, &QNetworkReply::finished, this, [=]() {
|
||||||
|
d->definitionListDownloadFinished(reply);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using namespace KSyntaxHighlighting;
|
using namespace KSyntaxHighlighting;
|
||||||
|
|
||||||
static Theme::TextStyle stringToDefaultFormat(const QStringView &str)
|
static Theme::TextStyle stringToDefaultFormat(const QStringRef &str)
|
||||||
{
|
{
|
||||||
if (!str.startsWith(QLatin1String("ds")))
|
if (!str.startsWith(QLatin1String("ds")))
|
||||||
return Theme::Normal;
|
return Theme::Normal;
|
||||||
@@ -98,13 +98,16 @@ Theme::TextStyle Format::textStyle() const
|
|||||||
bool Format::isDefaultTextStyle(const Theme &theme) const
|
bool Format::isDefaultTextStyle(const Theme &theme) const
|
||||||
{
|
{
|
||||||
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
||||||
return (!hasTextColor(theme)) && (!hasBackgroundColor(theme)) && (selectedTextColor(theme) == theme.selectedTextColor(Theme::Normal)) && (selectedBackgroundColor(theme) == QColor::fromRgba(theme.selectedBackgroundColor(Theme::Normal))) &&
|
return (!hasTextColor(theme)) && (!hasBackgroundColor(theme)) && (selectedTextColor(theme).rgba() == theme.selectedTextColor(Theme::Normal))
|
||||||
(isBold(theme) == theme.isBold(Theme::Normal)) && (isItalic(theme) == theme.isItalic(Theme::Normal)) && (isUnderline(theme) == theme.isUnderline(Theme::Normal)) && (isStrikeThrough(theme) == theme.isStrikeThrough(Theme::Normal));
|
&& (selectedBackgroundColor(theme).rgba() == (theme.selectedBackgroundColor(Theme::Normal))) && (isBold(theme) == theme.isBold(Theme::Normal))
|
||||||
|
&& (isItalic(theme) == theme.isItalic(Theme::Normal)) && (isUnderline(theme) == theme.isUnderline(Theme::Normal))
|
||||||
|
&& (isStrikeThrough(theme) == theme.isStrikeThrough(Theme::Normal));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Format::hasTextColor(const Theme &theme) const
|
bool Format::hasTextColor(const Theme &theme) const
|
||||||
{
|
{
|
||||||
return textColor(theme) != theme.textColor(Theme::Normal) && (d->style.textColor || theme.textColor(d->defaultStyle) || d->styleOverride(theme).textColor);
|
return textColor(theme) != QColor::fromRgba(theme.textColor(Theme::Normal))
|
||||||
|
&& (d->style.textColor || theme.textColor(d->defaultStyle) || d->styleOverride(theme).textColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor Format::textColor(const Theme &theme) const
|
QColor Format::textColor(const Theme &theme) const
|
||||||
@@ -112,7 +115,7 @@ QColor Format::textColor(const Theme &theme) const
|
|||||||
const auto overrideStyle = d->styleOverride(theme);
|
const auto overrideStyle = d->styleOverride(theme);
|
||||||
if (overrideStyle.textColor)
|
if (overrideStyle.textColor)
|
||||||
return overrideStyle.textColor;
|
return overrideStyle.textColor;
|
||||||
return d->style.textColor ? d->style.textColor : theme.textColor(d->defaultStyle);
|
return d->style.textColor ? QColor::fromRgba(d->style.textColor) : QColor::fromRgba(theme.textColor(d->defaultStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor Format::selectedTextColor(const Theme &theme) const
|
QColor Format::selectedTextColor(const Theme &theme) const
|
||||||
@@ -120,13 +123,14 @@ QColor Format::selectedTextColor(const Theme &theme) const
|
|||||||
const auto overrideStyle = d->styleOverride(theme);
|
const auto overrideStyle = d->styleOverride(theme);
|
||||||
if (overrideStyle.selectedTextColor)
|
if (overrideStyle.selectedTextColor)
|
||||||
return overrideStyle.selectedTextColor;
|
return overrideStyle.selectedTextColor;
|
||||||
return d->style.selectedTextColor ? d->style.selectedTextColor : theme.selectedTextColor(d->defaultStyle);
|
return d->style.selectedTextColor ? QColor::fromRgba(d->style.selectedTextColor) : QColor::fromRgba(theme.selectedTextColor(d->defaultStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Format::hasBackgroundColor(const Theme &theme) const
|
bool Format::hasBackgroundColor(const Theme &theme) const
|
||||||
{
|
{
|
||||||
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
||||||
return backgroundColor(theme) != QColor::fromRgba(theme.backgroundColor(Theme::Normal)) && (d->style.backgroundColor || theme.backgroundColor(d->defaultStyle) || d->styleOverride(theme).backgroundColor);
|
return backgroundColor(theme) != QColor::fromRgba(theme.backgroundColor(Theme::Normal))
|
||||||
|
&& (d->style.backgroundColor || theme.backgroundColor(d->defaultStyle) || d->styleOverride(theme).backgroundColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor Format::backgroundColor(const Theme &theme) const
|
QColor Format::backgroundColor(const Theme &theme) const
|
||||||
@@ -136,7 +140,7 @@ QColor Format::backgroundColor(const Theme &theme) const
|
|||||||
return overrideStyle.backgroundColor;
|
return overrideStyle.backgroundColor;
|
||||||
|
|
||||||
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
||||||
return d->style.backgroundColor ? d->style.backgroundColor : QColor::fromRgba(theme.backgroundColor(d->defaultStyle));
|
return d->style.backgroundColor ? QColor::fromRgba(d->style.backgroundColor) : QColor::fromRgba(theme.backgroundColor(d->defaultStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor Format::selectedBackgroundColor(const Theme &theme) const
|
QColor Format::selectedBackgroundColor(const Theme &theme) const
|
||||||
@@ -146,7 +150,8 @@ QColor Format::selectedBackgroundColor(const Theme &theme) const
|
|||||||
return overrideStyle.selectedBackgroundColor;
|
return overrideStyle.selectedBackgroundColor;
|
||||||
|
|
||||||
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
// use QColor::fromRgba for background QRgb => QColor conversion to avoid unset colors == black!
|
||||||
return d->style.selectedBackgroundColor ? d->style.selectedBackgroundColor : QColor::fromRgba(theme.selectedBackgroundColor(d->defaultStyle));
|
return d->style.selectedBackgroundColor ? QColor::fromRgba(d->style.selectedBackgroundColor)
|
||||||
|
: QColor::fromRgba(theme.selectedBackgroundColor(d->defaultStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Format::isBold(const Theme &theme) const
|
bool Format::isBold(const Theme &theme) const
|
||||||
@@ -231,7 +236,7 @@ void FormatPrivate::load(QXmlStreamReader &reader)
|
|||||||
name = reader.attributes().value(QLatin1String("name")).toString();
|
name = reader.attributes().value(QLatin1String("name")).toString();
|
||||||
defaultStyle = stringToDefaultFormat(reader.attributes().value(QLatin1String("defStyleNum")));
|
defaultStyle = stringToDefaultFormat(reader.attributes().value(QLatin1String("defStyleNum")));
|
||||||
|
|
||||||
QStringView attribute = reader.attributes().value(QLatin1String("color"));
|
QStringRef attribute = reader.attributes().value(QLatin1String("color"));
|
||||||
if (!attribute.isEmpty()) {
|
if (!attribute.isEmpty()) {
|
||||||
style.textColor = QColor(attribute.toString()).rgba();
|
style.textColor = QColor(attribute.toString()).rgba();
|
||||||
}
|
}
|
||||||
|
@@ -44,21 +44,13 @@ void HtmlHighlighter::setOutputFile(const QString &fileName)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d->out.reset(new QTextStream(d->file.get()));
|
d->out.reset(new QTextStream(d->file.get()));
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
d->out->setEncoding(QStringConverter::Utf8);
|
|
||||||
#else
|
|
||||||
d->out->setCodec("UTF-8");
|
d->out->setCodec("UTF-8");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HtmlHighlighter::setOutputFile(FILE *fileHandle)
|
void HtmlHighlighter::setOutputFile(FILE *fileHandle)
|
||||||
{
|
{
|
||||||
d->out.reset(new QTextStream(fileHandle, QIODevice::WriteOnly));
|
d->out.reset(new QTextStream(fileHandle, QIODevice::WriteOnly));
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
d->out->setEncoding(QStringConverter::Utf8);
|
|
||||||
#else
|
|
||||||
d->out->setCodec("UTF-8");
|
d->out->setCodec("UTF-8");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HtmlHighlighter::highlightFile(const QString &fileName, const QString &title)
|
void HtmlHighlighter::highlightFile(const QString &fileName, const QString &title)
|
||||||
@@ -76,6 +68,33 @@ void HtmlHighlighter::highlightFile(const QString &fileName, const QString &titl
|
|||||||
highlightData(&f, title);
|
highlightData(&f, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief toHtmlRgba
|
||||||
|
* Converts QColor -> rgba(r, g, b, a) if there is an alpha channel
|
||||||
|
* otherwise it will just return the hexcode. This is because QColor
|
||||||
|
* outputs #AARRGGBB, whereas browser support #RRGGBBAA.
|
||||||
|
*
|
||||||
|
* @param color
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
static QString toHtmlRgbaString(const QColor &color)
|
||||||
|
{
|
||||||
|
if (color.alpha() == 0xFF)
|
||||||
|
return color.name();
|
||||||
|
|
||||||
|
QString rgba = QStringLiteral("rgba(");
|
||||||
|
rgba.append(QString::number(color.red()));
|
||||||
|
rgba.append(QLatin1Char(','));
|
||||||
|
rgba.append(QString::number(color.green()));
|
||||||
|
rgba.append(QLatin1Char(','));
|
||||||
|
rgba.append(QString::number(color.blue()));
|
||||||
|
rgba.append(QLatin1Char(','));
|
||||||
|
// this must be alphaF
|
||||||
|
rgba.append(QString::number(color.alphaF()));
|
||||||
|
rgba.append(QLatin1Char(')'));
|
||||||
|
return rgba;
|
||||||
|
}
|
||||||
|
|
||||||
void HtmlHighlighter::highlightData(QIODevice *dev, const QString &title)
|
void HtmlHighlighter::highlightData(QIODevice *dev, const QString &title)
|
||||||
{
|
{
|
||||||
if (!d->out) {
|
if (!d->out) {
|
||||||
@@ -94,19 +113,16 @@ void HtmlHighlighter::highlightData(QIODevice *dev, const QString &title)
|
|||||||
*d->out << "<html><head>\n";
|
*d->out << "<html><head>\n";
|
||||||
*d->out << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n";
|
*d->out << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n";
|
||||||
*d->out << "<title>" << htmlTitle << "</title>\n";
|
*d->out << "<title>" << htmlTitle << "</title>\n";
|
||||||
*d->out << "<meta name=\"generator\" content=\"KF5::SyntaxHighlighting - Definition (" << definition().name() << ") - Theme (" << theme().name() << ")\"/>\n";
|
*d->out << "<meta name=\"generator\" content=\"KF5::SyntaxHighlighting - Definition (" << definition().name() << ") - Theme (" << theme().name()
|
||||||
|
<< ")\"/>\n";
|
||||||
*d->out << "</head><body";
|
*d->out << "</head><body";
|
||||||
*d->out << " style=\"background-color:" << QColor(theme().editorColor(Theme::BackgroundColor)).name();
|
*d->out << " style=\"background-color:" << toHtmlRgbaString(QColor::fromRgba(theme().editorColor(Theme::BackgroundColor)));
|
||||||
if (theme().textColor(Theme::Normal))
|
if (theme().textColor(Theme::Normal))
|
||||||
*d->out << ";color:" << QColor(theme().textColor(Theme::Normal)).name();
|
*d->out << ";color:" << toHtmlRgbaString(QColor::fromRgba(theme().textColor(Theme::Normal)));
|
||||||
*d->out << "\"><pre>\n";
|
*d->out << "\"><pre>\n";
|
||||||
|
|
||||||
QTextStream in(dev);
|
QTextStream in(dev);
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
in.setEncoding(QStringConverter::Utf8);
|
|
||||||
#else
|
|
||||||
in.setCodec("UTF-8");
|
in.setCodec("UTF-8");
|
||||||
#endif
|
|
||||||
while (!in.atEnd()) {
|
while (!in.atEnd()) {
|
||||||
d->currentLine = in.readLine();
|
d->currentLine = in.readLine();
|
||||||
state = highlightLine(d->currentLine, state);
|
state = highlightLine(d->currentLine, state);
|
||||||
@@ -128,9 +144,9 @@ void HtmlHighlighter::applyFormat(int offset, int length, const Format &format)
|
|||||||
// collect potential output, cheaper than thinking about "is there any?"
|
// collect potential output, cheaper than thinking about "is there any?"
|
||||||
QVarLengthArray<QString, 16> formatOutput;
|
QVarLengthArray<QString, 16> formatOutput;
|
||||||
if (format.hasTextColor(theme()))
|
if (format.hasTextColor(theme()))
|
||||||
formatOutput << QStringLiteral("color:") << format.textColor(theme()).name() << QStringLiteral(";");
|
formatOutput << QStringLiteral("color:") << toHtmlRgbaString(format.textColor(theme())) << QStringLiteral(";");
|
||||||
if (format.hasBackgroundColor(theme()))
|
if (format.hasBackgroundColor(theme()))
|
||||||
formatOutput << QStringLiteral("background-color:") << format.backgroundColor(theme()).name() << QStringLiteral(";");
|
formatOutput << QStringLiteral("background-color:") << toHtmlRgbaString(format.backgroundColor(theme())) << QStringLiteral(";");
|
||||||
if (format.isBold(theme()))
|
if (format.isBold(theme()))
|
||||||
formatOutput << QStringLiteral("font-weight:bold;");
|
formatOutput << QStringLiteral("font-weight:bold;");
|
||||||
if (format.isItalic(theme()))
|
if (format.isItalic(theme()))
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
using namespace KSyntaxHighlighting;
|
using namespace KSyntaxHighlighting;
|
||||||
|
|
||||||
bool KeywordList::contains(const QStringView &str, Qt::CaseSensitivity caseSensitive) const
|
bool KeywordList::contains(const QStringRef &str, Qt::CaseSensitivity caseSensitive) const
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* get right vector to search in
|
* get right vector to search in
|
||||||
@@ -26,7 +26,9 @@ bool KeywordList::contains(const QStringView &str, Qt::CaseSensitivity caseSensi
|
|||||||
/**
|
/**
|
||||||
* search with right predicate
|
* search with right predicate
|
||||||
*/
|
*/
|
||||||
return std::binary_search(vectorToSearch.begin(), vectorToSearch.end(), QStringView(str), [caseSensitive](const QStringView &a, const QStringView &b) { return a.compare(b, caseSensitive) < 0; });
|
return std::binary_search(vectorToSearch.begin(), vectorToSearch.end(), QStringView(str), [caseSensitive](const QStringView &a, const QStringView &b) {
|
||||||
|
return a.compare(b, caseSensitive) < 0;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeywordList::load(QXmlStreamReader &reader)
|
void KeywordList::load(QXmlStreamReader &reader)
|
||||||
@@ -90,7 +92,9 @@ void KeywordList::initLookupForCaseSensitivity(Qt::CaseSensitivity caseSensitive
|
|||||||
/**
|
/**
|
||||||
* sort with right predicate
|
* sort with right predicate
|
||||||
*/
|
*/
|
||||||
std::sort(vectorToSort.begin(), vectorToSort.end(), [caseSensitive](const QStringView &a, const QStringView &b) { return a.compare(b, caseSensitive) < 0; });
|
std::sort(vectorToSort.begin(), vectorToSort.end(), [caseSensitive](const QStringView &a, const QStringView &b) {
|
||||||
|
return a.compare(b, caseSensitive) < 0;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeywordList::resolveIncludeKeywords(DefinitionData &def)
|
void KeywordList::resolveIncludeKeywords(DefinitionData &def)
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
#define KSYNTAXHIGHLIGHTING_KEYWORDLIST_P_H
|
#define KSYNTAXHIGHLIGHTING_KEYWORDLIST_P_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringView>
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QStringView>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -53,10 +53,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Checks if @p str is a keyword in this list. */
|
/** Checks if @p str is a keyword in this list. */
|
||||||
bool contains(const QStringView &str) const { return contains(str, m_caseSensitive); }
|
bool contains(const QStringRef &str) const
|
||||||
|
{
|
||||||
|
return contains(str, m_caseSensitive);
|
||||||
|
}
|
||||||
|
|
||||||
/** Checks if @p str is a keyword in this list, overriding the global case-sensitivity setting. */
|
/** Checks if @p str is a keyword in this list, overriding the global case-sensitivity setting. */
|
||||||
bool contains(const QStringView &str, Qt::CaseSensitivity caseSensitive) const;
|
bool contains(const QStringRef &str, Qt::CaseSensitivity caseSensitive) const;
|
||||||
|
|
||||||
void load(QXmlStreamReader &reader);
|
void load(QXmlStreamReader &reader);
|
||||||
void setCaseSensitivity(Qt::CaseSensitivity caseSensitive);
|
void setCaseSensitivity(Qt::CaseSensitivity caseSensitive);
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <QDirIterator>
|
#include <QDirIterator>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QPalette>
|
||||||
|
|
||||||
#ifndef NO_STANDARD_PATHS
|
#ifndef NO_STANDARD_PATHS
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
@@ -62,7 +63,9 @@ Definition Repository::definitionForName(const QString &defName) const
|
|||||||
|
|
||||||
static void sortDefinitions(QVector<Definition> &definitions)
|
static void sortDefinitions(QVector<Definition> &definitions)
|
||||||
{
|
{
|
||||||
std::stable_sort(definitions.begin(), definitions.end(), [](const Definition &lhs, const Definition &rhs) { return lhs.priority() > rhs.priority(); });
|
std::stable_sort(definitions.begin(), definitions.end(), [](const Definition &lhs, const Definition &rhs) {
|
||||||
|
return lhs.priority() > rhs.priority();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Definition Repository::definitionForFileName(const QString &fileName) const
|
Definition Repository::definitionForFileName(const QString &fileName) const
|
||||||
@@ -133,13 +136,52 @@ Theme Repository::theme(const QString &themeName) const
|
|||||||
return Theme();
|
return Theme();
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme Repository::defaultTheme(Repository::DefaultTheme t)
|
Theme Repository::defaultTheme(Repository::DefaultTheme t) const
|
||||||
{
|
{
|
||||||
if (t == DarkTheme)
|
if (t == DarkTheme)
|
||||||
return theme(QLatin1String("Breeze Dark"));
|
return theme(QLatin1String("Breeze Dark"));
|
||||||
return theme(QLatin1String("Breeze Light"));
|
return theme(QLatin1String("Breeze Light"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Theme Repository::defaultTheme(Repository::DefaultTheme t)
|
||||||
|
{
|
||||||
|
return qAsConst(*this).defaultTheme(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
Theme Repository::themeForPalette(const QPalette &palette) const
|
||||||
|
{
|
||||||
|
const auto base = palette.color(QPalette::Base);
|
||||||
|
const auto themes = d->m_themes;
|
||||||
|
|
||||||
|
// find themes with matching background colors
|
||||||
|
QVector<KSyntaxHighlighting::Theme> matchingThemes;
|
||||||
|
for (const auto &theme : themes) {
|
||||||
|
const auto background = theme.editorColor(KSyntaxHighlighting::Theme::EditorColorRole::BackgroundColor);
|
||||||
|
if (background == base.rgb()) {
|
||||||
|
matchingThemes.append(theme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!matchingThemes.empty()) {
|
||||||
|
// if there's multiple, search for one with a matching highlight color
|
||||||
|
const auto highlight = palette.color(QPalette::Highlight);
|
||||||
|
for (const auto &theme : qAsConst(matchingThemes)) {
|
||||||
|
auto selection = theme.editorColor(KSyntaxHighlighting::Theme::EditorColorRole::TextSelection);
|
||||||
|
if (selection == highlight.rgb()) {
|
||||||
|
return theme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return matchingThemes.first();
|
||||||
|
}
|
||||||
|
|
||||||
|
// fallback to just use the default light or dark theme
|
||||||
|
return defaultTheme((base.lightness() < 128) ? KSyntaxHighlighting::Repository::DarkTheme : KSyntaxHighlighting::Repository::LightTheme);
|
||||||
|
}
|
||||||
|
|
||||||
|
Theme Repository::themeForPalette(const QPalette &palette)
|
||||||
|
{
|
||||||
|
return qAsConst(*this).themeForPalette(palette);
|
||||||
|
}
|
||||||
|
|
||||||
void RepositoryPrivate::load(Repository *repo)
|
void RepositoryPrivate::load(Repository *repo)
|
||||||
{
|
{
|
||||||
// always add invalid default "None" highlighting
|
// always add invalid default "None" highlighting
|
||||||
@@ -147,7 +189,8 @@ void RepositoryPrivate::load(Repository *repo)
|
|||||||
|
|
||||||
// do lookup in standard paths, if not disabled
|
// do lookup in standard paths, if not disabled
|
||||||
#ifndef NO_STANDARD_PATHS
|
#ifndef NO_STANDARD_PATHS
|
||||||
for (const auto &dir : QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("org.kde.syntax-highlighting/syntax"), QStandardPaths::LocateDirectory))
|
for (const auto &dir :
|
||||||
|
QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("org.kde.syntax-highlighting/syntax"), QStandardPaths::LocateDirectory))
|
||||||
loadSyntaxFolder(repo, dir);
|
loadSyntaxFolder(repo, dir);
|
||||||
|
|
||||||
// backward compatibility with Kate
|
// backward compatibility with Kate
|
||||||
@@ -176,7 +219,8 @@ void RepositoryPrivate::load(Repository *repo)
|
|||||||
|
|
||||||
// do lookup in standard paths, if not disabled
|
// do lookup in standard paths, if not disabled
|
||||||
#ifndef NO_STANDARD_PATHS
|
#ifndef NO_STANDARD_PATHS
|
||||||
for (const auto &dir : QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("org.kde.syntax-highlighting/themes"), QStandardPaths::LocateDirectory))
|
for (const auto &dir :
|
||||||
|
QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("org.kde.syntax-highlighting/themes"), QStandardPaths::LocateDirectory))
|
||||||
loadThemeFolder(dir);
|
loadThemeFolder(dir);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -256,7 +300,9 @@ static int themeRevision(const Theme &theme)
|
|||||||
|
|
||||||
void RepositoryPrivate::addTheme(const Theme &theme)
|
void RepositoryPrivate::addTheme(const Theme &theme)
|
||||||
{
|
{
|
||||||
const auto it = std::lower_bound(m_themes.begin(), m_themes.end(), theme, [](const Theme &lhs, const Theme &rhs) { return lhs.name() < rhs.name(); });
|
const auto it = std::lower_bound(m_themes.begin(), m_themes.end(), theme, [](const Theme &lhs, const Theme &rhs) {
|
||||||
|
return lhs.name() < rhs.name();
|
||||||
|
});
|
||||||
if (it == m_themes.end() || (*it).name() != theme.name()) {
|
if (it == m_themes.end() || (*it).name() != theme.name()) {
|
||||||
m_themes.insert(it, theme);
|
m_themes.insert(it, theme);
|
||||||
return;
|
return;
|
||||||
|
@@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <qglobal.h>
|
#include <qglobal.h>
|
||||||
#include <qvector.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QString;
|
class QString;
|
||||||
|
template<typename T> class QVector;
|
||||||
|
class QPalette;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -209,9 +210,32 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Returns a default theme instance of the given type.
|
* Returns a default theme instance of the given type.
|
||||||
* The returned Theme is guaranteed to be a valid theme.
|
* The returned Theme is guaranteed to be a valid theme.
|
||||||
|
* @since 5.79
|
||||||
|
*/
|
||||||
|
Theme defaultTheme(DefaultTheme t = LightTheme) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a default theme instance of the given type.
|
||||||
|
* The returned Theme is guaranteed to be a valid theme.
|
||||||
|
*
|
||||||
|
* KF6: remove in favor of const variant
|
||||||
*/
|
*/
|
||||||
Theme defaultTheme(DefaultTheme t = LightTheme);
|
Theme defaultTheme(DefaultTheme t = LightTheme);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the best matching theme for the given palette
|
||||||
|
* @since 5.79
|
||||||
|
**/
|
||||||
|
Theme themeForPalette(const QPalette &palette) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the best matching theme for the given palette
|
||||||
|
* @since 5.77
|
||||||
|
*
|
||||||
|
* KF6: remove in favor of const variant
|
||||||
|
**/
|
||||||
|
Theme themeForPalette(const QPalette &palette);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the repository.
|
* Reloads the repository.
|
||||||
* This is a moderately expensive operations and should thus only be
|
* This is a moderately expensive operations and should thus only be
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
#include "definition_p.h"
|
#include "definition_p.h"
|
||||||
#include "ksyntaxhighlighting_logging.h"
|
#include "ksyntaxhighlighting_logging.h"
|
||||||
#include "rule_p.h"
|
#include "rule_p.h"
|
||||||
#include "xml_p.h"
|
|
||||||
#include "worddelimiters_p.h"
|
#include "worddelimiters_p.h"
|
||||||
|
#include "xml_p.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
@@ -31,9 +31,7 @@ static bool isOctalChar(QChar c)
|
|||||||
|
|
||||||
static bool isHexChar(QChar c)
|
static bool isHexChar(QChar c)
|
||||||
{
|
{
|
||||||
return isDigit(c)
|
return isDigit(c) || (c <= QLatin1Char('f') && QLatin1Char('a') <= c) || (c <= QLatin1Char('F') && QLatin1Char('A') <= c);
|
||||||
|| (c <= QLatin1Char('f') && QLatin1Char('a') <= c)
|
|
||||||
|| (c <= QLatin1Char('F') && QLatin1Char('A') <= c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int matchEscapedChar(const QString &text, int offset)
|
static int matchEscapedChar(const QString &text, int offset)
|
||||||
@@ -44,9 +42,18 @@ static int matchEscapedChar(const QString &text, int offset)
|
|||||||
const auto c = text.at(offset + 1);
|
const auto c = text.at(offset + 1);
|
||||||
switch (c.unicode()) {
|
switch (c.unicode()) {
|
||||||
// control chars
|
// control chars
|
||||||
case 'a': case 'b': case 'e': case 'f':
|
case 'a':
|
||||||
case 'n': case 'r': case 't': case 'v':
|
case 'b':
|
||||||
case '"': case '\'': case '?': case '\\':
|
case 'e':
|
||||||
|
case 'f':
|
||||||
|
case 'n':
|
||||||
|
case 'r':
|
||||||
|
case 't':
|
||||||
|
case 'v':
|
||||||
|
case '"':
|
||||||
|
case '\'':
|
||||||
|
case '?':
|
||||||
|
case '\\':
|
||||||
return offset + 2;
|
return offset + 2;
|
||||||
|
|
||||||
// hex encoded character
|
// hex encoded character
|
||||||
@@ -59,8 +66,14 @@ static int matchEscapedChar(const QString &text, int offset)
|
|||||||
return offset;
|
return offset;
|
||||||
|
|
||||||
// octal encoding, simple \0 is OK, too, unlike simple \x above
|
// octal encoding, simple \0 is OK, too, unlike simple \x above
|
||||||
case '0': case '1': case '2': case '3':
|
case '0':
|
||||||
case '4': case '5': case '6': case '7':
|
case '1':
|
||||||
|
case '2':
|
||||||
|
case '3':
|
||||||
|
case '4':
|
||||||
|
case '5':
|
||||||
|
case '6':
|
||||||
|
case '7':
|
||||||
if (offset + 2 < text.size() && isOctalChar(text.at(offset + 2))) {
|
if (offset + 2 < text.size() && isOctalChar(text.at(offset + 2))) {
|
||||||
if (offset + 3 < text.size() && isOctalChar(text.at(offset + 3)))
|
if (offset + 3 < text.size() && isOctalChar(text.at(offset + 3)))
|
||||||
return offset + 4;
|
return offset + 4;
|
||||||
@@ -81,6 +94,13 @@ static QString replaceCaptures(const QString &pattern, const QStringList &captur
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rule::~Rule()
|
||||||
|
{
|
||||||
|
if (!m_additionalDeliminator.isEmpty() || !m_weakDeliminator.isEmpty()) {
|
||||||
|
delete m_wordDelimiters;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Definition Rule::definition() const
|
Definition Rule::definition() const
|
||||||
{
|
{
|
||||||
return m_def.definition();
|
return m_def.definition();
|
||||||
@@ -130,6 +150,11 @@ void Rule::resolveContext()
|
|||||||
|
|
||||||
// cache for DefinitionData::wordDelimiters, is accessed VERY often
|
// cache for DefinitionData::wordDelimiters, is accessed VERY often
|
||||||
m_wordDelimiters = &DefinitionData::get(def)->wordDelimiters;
|
m_wordDelimiters = &DefinitionData::get(def)->wordDelimiters;
|
||||||
|
if (!m_additionalDeliminator.isEmpty() || !m_weakDeliminator.isEmpty()) {
|
||||||
|
m_wordDelimiters = new WordDelimiters(*m_wordDelimiters);
|
||||||
|
m_wordDelimiters->append(m_additionalDeliminator);
|
||||||
|
m_wordDelimiters->remove(m_weakDeliminator);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rule::resolveAttributeFormat(Context *lookupContext)
|
void Rule::resolveAttributeFormat(Context *lookupContext)
|
||||||
@@ -151,7 +176,13 @@ bool Rule::doLoad(QXmlStreamReader &reader)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rule::Ptr Rule::create(const QStringView &name)
|
void Rule::loadAdditionalWordDelimiters(QXmlStreamReader &reader)
|
||||||
|
{
|
||||||
|
m_additionalDeliminator = reader.attributes().value(QLatin1String("additionalDeliminator")).toString();
|
||||||
|
m_weakDeliminator = reader.attributes().value(QLatin1String("weakDeliminator")).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
Rule::Ptr Rule::create(const QStringRef &name)
|
||||||
{
|
{
|
||||||
if (name == QLatin1String("AnyChar"))
|
if (name == QLatin1String("AnyChar"))
|
||||||
return std::make_shared<AnyChar>();
|
return std::make_shared<AnyChar>();
|
||||||
@@ -283,6 +314,12 @@ MatchResult DetectSpaces::doMatch(const QString &text, int offset, const QString
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Float::doLoad(QXmlStreamReader &reader)
|
||||||
|
{
|
||||||
|
loadAdditionalWordDelimiters(reader);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
MatchResult Float::doMatch(const QString &text, int offset, const QStringList &) const
|
MatchResult Float::doMatch(const QString &text, int offset, const QStringList &) const
|
||||||
{
|
{
|
||||||
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
||||||
@@ -344,6 +381,12 @@ MatchResult HlCChar::doMatch(const QString &text, int offset, const QStringList
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HlCHex::doLoad(QXmlStreamReader &reader)
|
||||||
|
{
|
||||||
|
loadAdditionalWordDelimiters(reader);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
MatchResult HlCHex::doMatch(const QString &text, int offset, const QStringList &) const
|
MatchResult HlCHex::doMatch(const QString &text, int offset, const QStringList &) const
|
||||||
{
|
{
|
||||||
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
||||||
@@ -367,6 +410,12 @@ MatchResult HlCHex::doMatch(const QString &text, int offset, const QStringList &
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HlCOct::doLoad(QXmlStreamReader &reader)
|
||||||
|
{
|
||||||
|
loadAdditionalWordDelimiters(reader);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
MatchResult HlCOct::doMatch(const QString &text, int offset, const QStringList &) const
|
MatchResult HlCOct::doMatch(const QString &text, int offset, const QStringList &) const
|
||||||
{
|
{
|
||||||
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
||||||
@@ -411,11 +460,7 @@ bool IncludeRules::includeAttribute() const
|
|||||||
bool IncludeRules::doLoad(QXmlStreamReader &reader)
|
bool IncludeRules::doLoad(QXmlStreamReader &reader)
|
||||||
{
|
{
|
||||||
const auto s = reader.attributes().value(QLatin1String("context"));
|
const auto s = reader.attributes().value(QLatin1String("context"));
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
const auto split = s.split(QLatin1String("##"), Qt::KeepEmptyParts);
|
||||||
const auto split = s.split(QLatin1String("##"), QString::KeepEmptyParts);
|
|
||||||
#else
|
|
||||||
const auto split = s.split(QString::fromLatin1("##"), Qt::KeepEmptyParts);
|
|
||||||
#endif
|
|
||||||
if (split.isEmpty())
|
if (split.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
m_contextName = split.at(0).toString();
|
m_contextName = split.at(0).toString();
|
||||||
@@ -433,6 +478,12 @@ MatchResult IncludeRules::doMatch(const QString &text, int offset, const QString
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Int::doLoad(QXmlStreamReader &reader)
|
||||||
|
{
|
||||||
|
loadAdditionalWordDelimiters(reader);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
MatchResult Int::doMatch(const QString &text, int offset, const QStringList &) const
|
MatchResult Int::doMatch(const QString &text, int offset, const QStringList &) const
|
||||||
{
|
{
|
||||||
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)))
|
||||||
@@ -466,6 +517,8 @@ bool KeywordListRule::doLoad(QXmlStreamReader &reader)
|
|||||||
m_hasCaseSensitivityOverride = false;
|
m_hasCaseSensitivityOverride = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadAdditionalWordDelimiters(reader);
|
||||||
|
|
||||||
return !m_keywordList->isEmpty();
|
return !m_keywordList->isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,11 +531,10 @@ MatchResult KeywordListRule::doMatch(const QString &text, int offset, const QStr
|
|||||||
return offset;
|
return offset;
|
||||||
|
|
||||||
if (m_hasCaseSensitivityOverride) {
|
if (m_hasCaseSensitivityOverride) {
|
||||||
if (m_keywordList->contains(QStringView(text).mid(offset, newOffset - offset),
|
if (m_keywordList->contains(text.midRef(offset, newOffset - offset), m_caseSensitivityOverride))
|
||||||
m_caseSensitivityOverride))
|
|
||||||
return newOffset;
|
return newOffset;
|
||||||
} else {
|
} else {
|
||||||
if (m_keywordList->contains(QStringView(text).mid(offset, newOffset - offset)))
|
if (m_keywordList->contains(text.midRef(offset, newOffset - offset)))
|
||||||
return newOffset;
|
return newOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,21 +592,52 @@ bool RegExpr::doLoad(QXmlStreamReader &reader)
|
|||||||
|
|
||||||
const auto isMinimal = Xml::attrToBool(reader.attributes().value(QLatin1String("minimal")));
|
const auto isMinimal = Xml::attrToBool(reader.attributes().value(QLatin1String("minimal")));
|
||||||
const auto isCaseInsensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("insensitive")));
|
const auto isCaseInsensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("insensitive")));
|
||||||
m_regexp.setPatternOptions((isMinimal ? QRegularExpression::InvertedGreedinessOption : QRegularExpression::NoPatternOption) | (isCaseInsensitive ? QRegularExpression::CaseInsensitiveOption : QRegularExpression::NoPatternOption));
|
m_regexp.setPatternOptions((isMinimal ? QRegularExpression::InvertedGreedinessOption : QRegularExpression::NoPatternOption)
|
||||||
|
| (isCaseInsensitive ? QRegularExpression::CaseInsensitiveOption : QRegularExpression::NoPatternOption)
|
||||||
|
// DontCaptureOption is removed by resolvePostProcessing() when necessary
|
||||||
|
| QRegularExpression::DontCaptureOption);
|
||||||
|
|
||||||
|
m_dynamic = Xml::attrToBool(reader.attributes().value(QLatin1String("dynamic")));
|
||||||
|
|
||||||
|
return !m_regexp.pattern().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KSyntaxHighlighting::RegExpr::resolvePostProcessing()
|
||||||
|
{
|
||||||
|
if (m_isResolved)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_isResolved = true;
|
||||||
|
bool hasCapture = false;
|
||||||
|
|
||||||
|
// disable DontCaptureOption when reference a context with dynamic rule
|
||||||
|
if (auto *ctx = context().context()) {
|
||||||
|
for (const Rule::Ptr &rule : ctx->rules()) {
|
||||||
|
if (rule->isDynamic()) {
|
||||||
|
hasCapture = true;
|
||||||
|
m_regexp.setPatternOptions(m_regexp.patternOptions() & ~QRegularExpression::DontCaptureOption);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// optimize the pattern for the non-dynamic case, we use them OFTEN
|
// optimize the pattern for the non-dynamic case, we use them OFTEN
|
||||||
m_dynamic = Xml::attrToBool(reader.attributes().value(QLatin1String("dynamic")));
|
|
||||||
if (!m_dynamic) {
|
if (!m_dynamic) {
|
||||||
m_regexp.optimize();
|
m_regexp.optimize();
|
||||||
}
|
}
|
||||||
|
|
||||||
// always using m_regexp.isValid() would be better, but parses the regexp and thus is way too expensive for release builds
|
bool isValid = m_regexp.isValid();
|
||||||
|
if (!isValid) {
|
||||||
|
// DontCaptureOption with back reference capture is an error, remove this option then try again
|
||||||
|
if (!hasCapture) {
|
||||||
|
m_regexp.setPatternOptions(m_regexp.patternOptions() & ~QRegularExpression::DontCaptureOption);
|
||||||
|
isValid = m_regexp.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
if (Log().isDebugEnabled()) {
|
if (!isValid) {
|
||||||
if (!m_regexp.isValid())
|
|
||||||
qCDebug(Log) << "Invalid regexp:" << m_regexp.pattern();
|
qCDebug(Log) << "Invalid regexp:" << m_regexp.pattern();
|
||||||
}
|
}
|
||||||
return !m_regexp.pattern().isEmpty();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchResult RegExpr::doMatch(const QString &text, int offset, const QStringList &captures) const
|
MatchResult RegExpr::doMatch(const QString &text, int offset, const QStringList &captures) const
|
||||||
@@ -606,8 +689,7 @@ MatchResult StringDetect::doMatch(const QString &text, int offset, const QString
|
|||||||
*/
|
*/
|
||||||
const auto &pattern = m_dynamic ? replaceCaptures(m_string, captures, false) : m_string;
|
const auto &pattern = m_dynamic ? replaceCaptures(m_string, captures, false) : m_string;
|
||||||
|
|
||||||
if (offset + pattern.size() <= text.size()
|
if (text.midRef(offset, pattern.size()).compare(pattern, m_caseSensitivity) == 0)
|
||||||
&& QStringView(text).mid(offset, pattern.size()).compare(pattern, m_caseSensitivity) == 0)
|
|
||||||
return offset + pattern.size();
|
return offset + pattern.size();
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
@@ -616,6 +698,7 @@ bool WordDetect::doLoad(QXmlStreamReader &reader)
|
|||||||
{
|
{
|
||||||
m_word = reader.attributes().value(QLatin1String("String")).toString();
|
m_word = reader.attributes().value(QLatin1String("String")).toString();
|
||||||
m_caseSensitivity = Xml::attrToBool(reader.attributes().value(QLatin1String("insensitive"))) ? Qt::CaseInsensitive : Qt::CaseSensitive;
|
m_caseSensitivity = Xml::attrToBool(reader.attributes().value(QLatin1String("insensitive"))) ? Qt::CaseInsensitive : Qt::CaseSensitive;
|
||||||
|
loadAdditionalWordDelimiters(reader);
|
||||||
return !m_word.isEmpty();
|
return !m_word.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,7 +714,7 @@ MatchResult WordDetect::doMatch(const QString &text, int offset, const QStringLi
|
|||||||
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)) && !isWordDelimiter(text.at(offset)))
|
if (offset > 0 && !isWordDelimiter(text.at(offset - 1)) && !isWordDelimiter(text.at(offset)))
|
||||||
return offset;
|
return offset;
|
||||||
|
|
||||||
if (QStringView(text).mid(offset, m_word.size()).compare(m_word, m_caseSensitivity) != 0)
|
if (text.midRef(offset, m_word.size()).compare(m_word, m_caseSensitivity) != 0)
|
||||||
return offset;
|
return offset;
|
||||||
|
|
||||||
if (text.size() == offset + m_word.size() || isWordDelimiter(text.at(offset + m_word.size())) || isWordDelimiter(text.at(offset + m_word.size() - 1)))
|
if (text.size() == offset + m_word.size() || isWordDelimiter(text.at(offset + m_word.size())) || isWordDelimiter(text.at(offset + m_word.size() - 1)))
|
||||||
|
@@ -33,7 +33,7 @@ class Rule
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Rule() = default;
|
Rule() = default;
|
||||||
virtual ~Rule() = default;
|
virtual ~Rule();
|
||||||
|
|
||||||
typedef std::shared_ptr<Rule> Ptr;
|
typedef std::shared_ptr<Rule> Ptr;
|
||||||
|
|
||||||
@@ -83,16 +83,21 @@ public:
|
|||||||
bool load(QXmlStreamReader &reader);
|
bool load(QXmlStreamReader &reader);
|
||||||
void resolveContext();
|
void resolveContext();
|
||||||
void resolveAttributeFormat(Context *lookupContext);
|
void resolveAttributeFormat(Context *lookupContext);
|
||||||
|
virtual void resolvePostProcessing()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual MatchResult doMatch(const QString &text, int offset, const QStringList &captures) const = 0;
|
virtual MatchResult doMatch(const QString &text, int offset, const QStringList &captures) const = 0;
|
||||||
|
|
||||||
static Rule::Ptr create(const QStringView &name);
|
static Rule::Ptr create(const QStringRef &name);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool doLoad(QXmlStreamReader &reader);
|
virtual bool doLoad(QXmlStreamReader &reader);
|
||||||
|
|
||||||
bool isWordDelimiter(QChar c) const;
|
bool isWordDelimiter(QChar c) const;
|
||||||
|
|
||||||
|
void loadAdditionalWordDelimiters(QXmlStreamReader &reader);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(Rule)
|
Q_DISABLE_COPY(Rule)
|
||||||
|
|
||||||
@@ -109,6 +114,9 @@ private:
|
|||||||
// cache for DefinitionData::wordDelimiters, is accessed VERY often
|
// cache for DefinitionData::wordDelimiters, is accessed VERY often
|
||||||
WordDelimiters *m_wordDelimiters = nullptr;
|
WordDelimiters *m_wordDelimiters = nullptr;
|
||||||
|
|
||||||
|
QString m_additionalDeliminator;
|
||||||
|
QString m_weakDeliminator;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_dynamic = false;
|
bool m_dynamic = false;
|
||||||
};
|
};
|
||||||
@@ -160,6 +168,7 @@ protected:
|
|||||||
class Float : public Rule
|
class Float : public Rule
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
bool doLoad(QXmlStreamReader &reader) override;
|
||||||
MatchResult doMatch(const QString &text, int offset, const QStringList &) const override;
|
MatchResult doMatch(const QString &text, int offset, const QStringList &) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -183,6 +192,7 @@ private:
|
|||||||
class Int : public Rule
|
class Int : public Rule
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
bool doLoad(QXmlStreamReader &reader) override;
|
||||||
MatchResult doMatch(const QString &text, int offset, const QStringList &captures) const override;
|
MatchResult doMatch(const QString &text, int offset, const QStringList &captures) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -195,12 +205,14 @@ protected:
|
|||||||
class HlCHex : public Rule
|
class HlCHex : public Rule
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
bool doLoad(QXmlStreamReader &reader) override;
|
||||||
MatchResult doMatch(const QString &text, int offset, const QStringList &) const override;
|
MatchResult doMatch(const QString &text, int offset, const QStringList &) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HlCOct : public Rule
|
class HlCOct : public Rule
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
bool doLoad(QXmlStreamReader &reader) override;
|
||||||
MatchResult doMatch(const QString &text, int offset, const QStringList &) const override;
|
MatchResult doMatch(const QString &text, int offset, const QStringList &) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -246,11 +258,13 @@ private:
|
|||||||
class RegExpr : public Rule
|
class RegExpr : public Rule
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
void resolvePostProcessing() override;
|
||||||
bool doLoad(QXmlStreamReader &reader) override;
|
bool doLoad(QXmlStreamReader &reader) override;
|
||||||
MatchResult doMatch(const QString &text, int offset, const QStringList &captures) const override;
|
MatchResult doMatch(const QString &text, int offset, const QStringList &captures) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QRegularExpression m_regexp;
|
QRegularExpression m_regexp;
|
||||||
|
bool m_isResolved = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class StringDetect : public Rule
|
class StringDetect : public Rule
|
||||||
|
@@ -56,7 +56,7 @@ bool StateData::pop(int popCount)
|
|||||||
// keep the initial context alive in any case
|
// keep the initial context alive in any case
|
||||||
Q_ASSERT(!isEmpty());
|
Q_ASSERT(!isEmpty());
|
||||||
const bool initialContextSurvived = m_contextStack.size() > popCount;
|
const bool initialContextSurvived = m_contextStack.size() > popCount;
|
||||||
m_contextStack.resize(std::max(1, int(m_contextStack.size()) - popCount));
|
m_contextStack.resize(std::max(1, m_contextStack.size() - popCount));
|
||||||
return initialContextSurvived;
|
return initialContextSurvived;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,6 +13,10 @@
|
|||||||
|
|
||||||
#include "definitionref_p.h"
|
#include "definitionref_p.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QStringList;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace KSyntaxHighlighting
|
namespace KSyntaxHighlighting
|
||||||
{
|
{
|
||||||
class Context;
|
class Context;
|
||||||
|
@@ -47,7 +47,7 @@ QString Theme::name() const
|
|||||||
|
|
||||||
QString Theme::translatedName() const
|
QString Theme::translatedName() const
|
||||||
{
|
{
|
||||||
return m_data ? QCoreApplication::translate("Theme", m_data->name().toUtf8().constData()) : QString();
|
return m_data ? QCoreApplication::instance()->translate("Theme", m_data->name().toUtf8().constData()) : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Theme::isReadOnly() const
|
bool Theme::isReadOnly() const
|
||||||
|
@@ -30,7 +30,7 @@ ThemeData::ThemeData()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert QJsonValue @p val into a color, if possible. Valid colors are only
|
* Convert QJsonValue @p val into a color, if possible. Valid colors are only
|
||||||
* in hex format: #rrggbb. On error, returns 0x00000000.
|
* in hex format: #aarrggbb. On error, returns 0x00000000.
|
||||||
*/
|
*/
|
||||||
static inline QRgb readColor(const QJsonValue &val)
|
static inline QRgb readColor(const QJsonValue &val)
|
||||||
{
|
{
|
||||||
@@ -43,7 +43,7 @@ static inline QRgb readColor(const QJsonValue &val)
|
|||||||
return unsetColor;
|
return unsetColor;
|
||||||
}
|
}
|
||||||
const QColor color(str);
|
const QColor color(str);
|
||||||
return color.isValid() ? color.rgb() : unsetColor;
|
return color.isValid() ? color.rgba() : unsetColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TextStyleData readThemeData(const QJsonObject &obj)
|
static inline TextStyleData readThemeData(const QJsonObject &obj)
|
||||||
|
@@ -24,20 +24,24 @@ bool WordDelimiters::contains(QChar c) const
|
|||||||
return notAsciiDelimiters.contains(c);
|
return notAsciiDelimiters.contains(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WordDelimiters::append(QChar c)
|
void WordDelimiters::append(QStringView s)
|
||||||
{
|
{
|
||||||
|
for (QChar c : s) {
|
||||||
if (c.unicode() < 128) {
|
if (c.unicode() < 128) {
|
||||||
asciiDelimiters[c.unicode()] = true;
|
asciiDelimiters[c.unicode()] = true;
|
||||||
} else {
|
} else {
|
||||||
notAsciiDelimiters.append(c);
|
notAsciiDelimiters.append(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WordDelimiters::remove(QChar c)
|
void WordDelimiters::remove(QStringView s)
|
||||||
{
|
{
|
||||||
|
for (QChar c : s) {
|
||||||
if (c.unicode() < 128) {
|
if (c.unicode() < 128) {
|
||||||
asciiDelimiters[c.unicode()] = false;
|
asciiDelimiters[c.unicode()] = false;
|
||||||
} else {
|
} else {
|
||||||
notAsciiDelimiters.remove(c);
|
notAsciiDelimiters.remove(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@@ -30,14 +30,14 @@ public:
|
|||||||
bool contains(QChar c) const;
|
bool contains(QChar c) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends the character @p c to word delimiter.
|
* Appends each character of @p s to word delimiters.
|
||||||
*/
|
*/
|
||||||
void append(QChar c);
|
void append(QStringView s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the character @p c from word delimiters.
|
* Removes each character of @p s from word delimiters.
|
||||||
*/
|
*/
|
||||||
void remove(QChar c);
|
void remove(QStringView c);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
@@ -15,9 +15,9 @@ namespace KSyntaxHighlighting
|
|||||||
namespace Xml
|
namespace Xml
|
||||||
{
|
{
|
||||||
/** Parse a xs:boolean attribute. */
|
/** Parse a xs:boolean attribute. */
|
||||||
inline bool attrToBool(const QStringView &str)
|
inline bool attrToBool(const QStringRef &str)
|
||||||
{
|
{
|
||||||
return str == QLatin1String("1") || str.compare(QString("true"), Qt::CaseInsensitive) == 0;
|
return str == QLatin1String("1") || str.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user