[kate] doc/kate: document highlightingModeRegex

Christoph Cullmann null at kde.org
Sat Dec 28 20:23:08 GMT 2019


Git commit b0a93dc8aec4c9b3bc4e2e00df1e7863aa73ba82 by Christoph Cullmann.
Committed on 28/12/2019 at 20:22.
Pushed by scmsync into branch 'master'.

document highlightingModeRegex

M  +25   -11   doc/kate/plugins.docbook

https://commits.kde.org/kate/b0a93dc8aec4c9b3bc4e2e00df1e7863aa73ba82

diff --git a/doc/kate/plugins.docbook b/doc/kate/plugins.docbook
index a5346b467..cbd293454 100644
--- a/doc/kate/plugins.docbook
+++ b/doc/kate/plugins.docbook
@@ -2015,46 +2015,56 @@ and possible):
 {
     "servers": {
         "bibtex": {
-            "use": "latex"
+            "use": "latex",
+            "highlightingModeRegex": "^BibTeX$"
         },
         "c": {
             "command": ["clangd", "-log=error", "--background-index"],
             "commandDebug": ["clangd", "-log=verbose", "--background-index"],
-            "url": "https://clang.llvm.org/extra/clangd/"
+            "url": "https://clang.llvm.org/extra/clangd/",
+            "highlightingModeRegex": "^(C|ANSI C89|Objective-C)$"
         },
         "cpp": {
-            "use": "c"
+            "use": "c",
+            "highlightingModeRegex": "^(C\\+\\+|ISO C\\+\\+|Objective-C\\+\\+)$"
         },
         "d": {
             "command": ["dls", "--stdio"],
-            "url": "https://github.com/d-language-server/dls"
+            "url": "https://github.com/d-language-server/dls",
+            "highlightingModeRegex": "^D$"
         },
         "fortran": {
             "command": ["fortls"],
             "rootIndicationFileNames": [".fortls"],
-            "url": "https://github.com/hansec/fortran-language-server"
+            "url": "https://github.com/hansec/fortran-language-server",
+            "highlightingModeRegex": "^Fortran.*$"
         },
         "latex": {
             "command": ["texlab"],
-            "url": "https://texlab.netlify.com/"
+            "url": "https://texlab.netlify.com/",
+            "highlightingModeRegex": "^LaTeX$"
         },
         "go": {
             "command": ["go-langserver"],
             "commandDebug": ["go-langserver", "-trace"],
-            "url": "https://github.com/sourcegraph/go-langserver"
+            "url": "https://github.com/sourcegraph/go-langserver",
+            "highlightingModeRegex": "^Go$"
         },
         "python": {
             "command": ["python3", "-m", "pyls", "--check-parent-process"],
-            "url": "https://github.com/palantir/python-language-server"
+            "url": "https://github.com/palantir/python-language-server",
+            "highlightingModeRegex": "^Python$"
         },
         "rust": {
             "command": ["rls"],
             "rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"],
-            "url": "https://github.com/rust-lang/rls"
+            "url": "https://github.com/rust-lang/rls",
+            "highlightingModeRegex": "^Rust$"
         },
         "ocaml": {
             "command": ["ocamlmerlin-lsp"],
-            "url": "https://github.com/ocaml/merlin"
+            "url": "https://github.com/ocaml/merlin",
+            "highlightingModeRegex": "^Objective Caml.*$"
         }
     }
 }
@@ -2063,6 +2073,10 @@ and possible):
 Note that each "command" may be an array or a string (in which case it is
 split into an array).  Also, a top-level "global" entry (next to "server") is
 considered as well (see further below).
+
+The "highlightingModeRegex" is used to map the highlighting mode as used by Kate
+to the language id of the server. If no regular expression is given, the language id
+itself is used.
 </para>
 
 <para>
@@ -2672,7 +2686,7 @@ be used in the function statically or passed as arguments, by using the
 <userinput>${func(field)}</userinput> or <userinput>${<replaceable>field2=func(field)</replaceable>}</userinput>
 syntax in the snippet string.</para>
 <para>You can use
-the <ulink url="help:/katepart/development.html#dev-scripting-api">&kate; scripting API</ulink> 
+the <ulink url="help:/katepart/development.html#dev-scripting-api">&kate; scripting API</ulink>
 to get the selected text, full text, file name and
 more by using the appropriate methods of the <userinput>document</userinput>
 and <userinput>view</userinput> objects. Refer to the scripting API


More information about the kde-doc-english mailing list