Commit b0a93dc8 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

document highlightingModeRegex

parent 0d751c96
...@@ -2015,46 +2015,56 @@ and possible): ...@@ -2015,46 +2015,56 @@ and possible):
{ {
"servers": { "servers": {
"bibtex": { "bibtex": {
"use": "latex" "use": "latex",
"highlightingModeRegex": "^BibTeX$"
}, },
"c": { "c": {
"command": ["clangd", "-log=error", "--background-index"], "command": ["clangd", "-log=error", "--background-index"],
"commandDebug": ["clangd", "-log=verbose", "--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": { "cpp": {
"use": "c" "use": "c",
"highlightingModeRegex": "^(C\\+\\+|ISO C\\+\\+|Objective-C\\+\\+)$"
}, },
"d": { "d": {
"command": ["dls", "--stdio"], "command": ["dls", "--stdio"],
"url": "https://github.com/d-language-server/dls" "url": "https://github.com/d-language-server/dls",
"highlightingModeRegex": "^D$"
}, },
"fortran": { "fortran": {
"command": ["fortls"], "command": ["fortls"],
"rootIndicationFileNames": [".fortls"], "rootIndicationFileNames": [".fortls"],
"url": "https://github.com/hansec/fortran-language-server" "url": "https://github.com/hansec/fortran-language-server",
"highlightingModeRegex": "^Fortran.*$"
}, },
"latex": { "latex": {
"command": ["texlab"], "command": ["texlab"],
"url": "https://texlab.netlify.com/" "url": "https://texlab.netlify.com/",
"highlightingModeRegex": "^LaTeX$"
}, },
"go": { "go": {
"command": ["go-langserver"], "command": ["go-langserver"],
"commandDebug": ["go-langserver", "-trace"], "commandDebug": ["go-langserver", "-trace"],
"url": "https://github.com/sourcegraph/go-langserver" "url": "https://github.com/sourcegraph/go-langserver",
"highlightingModeRegex": "^Go$"
}, },
"python": { "python": {
"command": ["python3", "-m", "pyls", "--check-parent-process"], "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": { "rust": {
"command": ["rls"], "command": ["rls"],
"rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"], "rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"],
"url": "https://github.com/rust-lang/rls" "url": "https://github.com/rust-lang/rls",
"highlightingModeRegex": "^Rust$"
}, },
"ocaml": { "ocaml": {
"command": ["ocamlmerlin-lsp"], "command": ["ocamlmerlin-lsp"],
"url": "https://github.com/ocaml/merlin" "url": "https://github.com/ocaml/merlin",
"highlightingModeRegex": "^Objective Caml.*$"
} }
} }
} }
...@@ -2063,6 +2073,10 @@ and possible): ...@@ -2063,6 +2073,10 @@ and possible):
Note that each "command" may be an array or a string (in which case it is 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 split into an array). Also, a top-level "global" entry (next to "server") is
considered as well (see further below). 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>
<para> <para>
...@@ -2672,7 +2686,7 @@ be used in the function statically or passed as arguments, by using the ...@@ -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> <userinput>${func(field)}</userinput> or <userinput>${<replaceable>field2=func(field)</replaceable>}</userinput>
syntax in the snippet string.</para> syntax in the snippet string.</para>
<para>You can use <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 to get the selected text, full text, file name and
more by using the appropriate methods of the <userinput>document</userinput> more by using the appropriate methods of the <userinput>document</userinput>
and <userinput>view</userinput> objects. Refer to the scripting API and <userinput>view</userinput> objects. Refer to the scripting API
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment