Home Explore Blog CI



neovim

18th chunk of `runtime/doc/syntax.txt`
a899b0cf6cf8da6c09fbeaf424282fe6733d12db75f636a80000000100000fa0
	*groff.vim* *ft-groff-syntax*

The groff syntax file is a wrapper for |nroff.vim|, see the notes
under that heading for examples of use and configuration.  The purpose
of this wrapper is to set up groff syntax extensions by setting the
filetype from a |modeline| or in a personal filetype definitions file
(see |filetype.txt|).


HASKELL			     *haskell.vim* *lhaskell.vim* *ft-haskell-syntax*

The Haskell syntax files support plain Haskell code as well as literate
Haskell code, the latter in both Bird style and TeX style.  The Haskell
syntax highlighting will also highlight C preprocessor directives.

If you want to highlight delimiter characters (useful if you have a
light-coloured background), add to your vimrc: >
	:let hs_highlight_delimiters = 1
To treat True and False as keywords as opposed to ordinary identifiers,
add: >
	:let hs_highlight_boolean = 1
To also treat the names of primitive types as keywords: >
	:let hs_highlight_types = 1
And to treat the names of even more relatively common types as keywords: >
	:let hs_highlight_more_types = 1
If you want to highlight the names of debugging functions, put in
your vimrc: >
	:let hs_highlight_debug = 1

The Haskell syntax highlighting also highlights C preprocessor
directives, and flags lines that start with # but are not valid
directives as erroneous.  This interferes with Haskell's syntax for
operators, as they may start with #.  If you want to highlight those
as operators as opposed to errors, put in your vimrc: >
	:let hs_allow_hash_operator = 1

The syntax highlighting for literate Haskell code will try to
automatically guess whether your literate Haskell code contains
TeX markup or not, and correspondingly highlight TeX constructs
or nothing at all.  You can override this globally by putting
in your vimrc >
	:let lhs_markup = none
for no highlighting at all, or >
	:let lhs_markup = tex
to force the highlighting to always try to highlight TeX markup.
For more flexibility, you may also use buffer local versions of
this variable, so e.g. >
	:let b:lhs_markup = tex
will force TeX highlighting for a particular buffer.  It has to be
set before turning syntax highlighting on for the buffer or
loading a file.


HTML						*html.vim* *ft-html-syntax*

The coloring scheme for tags in the HTML file works as follows.

The  <> of opening tags are colored differently than the </> of a closing tag.
This is on purpose! For opening tags the 'Function' color is used, while for
closing tags the 'Identifier' color is used (See syntax.vim to check how those
are defined for you)

Known tag names are colored the same way as statements in C.  Unknown tag
names are colored with the same color as the <> or </> respectively which
makes it easy to spot errors

Note that the same is true for argument (or attribute) names.  Known attribute
names are colored differently than unknown ones.

Some HTML tags are used to change the rendering of text.  The following tags
are recognized by the html.vim syntax coloring file and change the way normal
text is shown: <B> <I> <U> <EM> <STRONG> (<EM> is used as an alias for <I>,
while <STRONG> as an alias for <B>), <H1> - <H6>, <HEAD>, <TITLE> and <A>, but
only if used as a link (that is, it must include a href as in
<A href="somefile.html">).

If you want to change how such text is rendered, you must redefine the
following syntax groups:

    - htmlBold
    - htmlBoldUnderline
    - htmlBoldUnderlineItalic
    - htmlUnderline
    - htmlUnderlineItalic
    - htmlItalic
    - htmlTitle for titles
    - htmlH1 - htmlH6 for headings

To make this redefinition work you must redefine them all with the exception
of the last two (htmlTitle and htmlH[1-6], which are optional) and define the
following variable in your vimrc (this is due to the order in which the files
are read during initialization) >
	:let html_my_rendering=1

If you'd like to see an example download mysyntax.vim at
https://www.fleiner.com/vim/download.html

You can also disable this rendering by adding

Title: Syntax Highlighting for Haskell and HTML
Summary
This section details syntax highlighting for Haskell and HTML. For Haskell, it covers options for highlighting delimiters, booleans, types, debug functions, and handling of operators with hash symbols, as well as controlling TeX markup in literate Haskell code. For HTML, it describes tag coloring, attribute naming, and customization options for rendering text within specific HTML tags (<b>, <i>, <u>, etc.) by redefining syntax groups and setting the html_my_rendering variable.