Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>op.syntax

Dark deno-powered completion framework for neovim/Vim
Go to Latest
variable op.syntax
import { op } from "https://deno.land/x/ddc_vim@v4.3.0/deps.ts";
const { syntax } = op;

When this option is set, the syntax with this name is loaded, unless syntax highlighting has been switched off with ":syntax off". Otherwise this option does not always reflect the current syntax (the b:current_syntax variable does). This option is most useful in a modeline, for a file which syntax is not automatically recognized. Example, in an IDL file: /* vim: set syntax=idl : * / When a dot appears in the value then this separates two filetype names. Example: /* vim: set syntax=c.doxygen : * / This will use the "c" syntax first, then the "doxygen" syntax. Note that the second one must be prepared to be loaded as an addition, otherwise it will be skipped. More than one dot may appear. To switch off syntax highlighting for the current file, use:

:set syntax=OFF

To switch syntax highlighting on according to the current value of the 'filetype' option:

:set syntax=ON

What actually happens when setting the 'syntax' option is that the Syntax autocommand event is triggered with the value as argument. This option is not copied to another buffer, independent of the 's' or 'S' flag in 'cpoptions'. Only normal file name characters can be used, "/\*?[|<>" are illegal.

(default empty)

not available when compiled without the +syntax feature

type

LocalOption<string>