aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/syntax.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/syntax.txt')
-rw-r--r--runtime/doc/syntax.txt48
1 files changed, 31 insertions, 17 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index ebc7ff6b80..e423c59efe 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1045,33 +1045,47 @@ This works immediately.
CLOJURE *ft-clojure-syntax*
-The default syntax groups can be augmented through the
-*g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The
-value should be a |Dictionary| of syntax group names to a |List| of custom
-identifiers:
+ *g:clojure_syntax_keywords*
+
+Syntax highlighting of public vars in "clojure.core" is provided by default,
+but additional symbols can be highlighted by adding them to the
+|g:clojure_syntax_keywords| variable. The value should be a |Dictionary| of
+syntax group names, each containing a |List| of identifiers.
>
let g:clojure_syntax_keywords = {
- \ 'clojureMacro': ["defproject", "defcustom"],
- \ 'clojureFunc': ["string/join", "string/replace"]
+ \ 'clojureMacro': ["defproject", "defcustom"],
+ \ 'clojureFunc': ["string/join", "string/replace"]
\ }
<
Refer to the Clojure syntax script for valid syntax group names.
-If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only
-language constants and special forms are matched.
+There is also *b:clojure_syntax_keywords* which is a buffer-local variant of
+this variable intended for use by plugin authors to highlight symbols
+dynamically.
+
+By setting the *b:clojure_syntax_without_core_keywords* variable, vars from
+"clojure.core" will not be highlighted by default. This is useful for
+namespaces that have set `(:refer-clojure :only [])`
+
-Setting *g:clojure_fold* enables folding Clojure code via the syntax engine.
-Any list, vector, or map that extends over more than one line can be folded
-using the standard Vim |fold-commands|.
+ *g:clojure_fold*
-Please note that this option does not work with scripts that redefine the
-bracket syntax regions, such as rainbow-parentheses plugins.
+Setting |g:clojure_fold| to `1` will enable the folding of Clojure code. Any
+list, vector or map that extends over more than one line can be folded using
+the standard Vim |fold-commands|.
-This option is off by default.
+
+ *g:clojure_discard_macro*
+
+Set this variable to `1` to enable basic highlighting of Clojure's "discard
+reader macro".
>
- " Default
- let g:clojure_fold = 0
+ #_(defn foo [x]
+ (println x))
<
+Note that this option will not correctly highlight stacked discard macros
+(e.g. `#_#_`).
+
COBOL *cobol.vim* *ft-cobol-syntax*
@@ -4768,7 +4782,7 @@ in their own color.
Doesn't work recursively, thus you can't use
":colorscheme" in a color scheme script.
- To customize a colorscheme use another name, e.g.
+ To customize a color scheme use another name, e.g.
"~/.config/nvim/colors/mine.vim", and use `:runtime` to
load the original colorscheme: >
runtime colors/evening.vim