Skip to main content
Module

x/ddc_vim/deps.ts>op.spelllang

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

A comma-separated list of word list names. When the 'spell' option is on spellchecking will be done for these languages. Example:

set spelllang=en_us,nl,medical

This means US English, Dutch and medical words are recognized. Words that are not recognized will be highlighted. The word list name must consist of alphanumeric characters, a dash or an underscore. It should not include a comma or dot. Using a dash is recommended to separate the two letter language name from a specification. Thus "en-rare" is used for rare English words. A region name must come last and have the form "_xx", where "xx" is the two-letter, lower case region name. You can use more than one region by listing them: "en_us,en_ca" supports both US and Canadian English, but not words specific for Australia, New Zealand or Great Britain. (Note: currently en_au and en_nz dictionaries are older than en_ca, en_gb and en_us). If the name "cjk" is included East Asian characters are excluded from spell checking. This is useful when editing text that also has Asian words. Note that the "medical" dictionary does not exist, it is just an example of a longer name.

As a special case the name of a .spl file can be given as-is. The first "_xx" in the name is removed and used as the region name (_xx is an underscore, two letters and followed by a non-letter). This is mainly for testing purposes. You must make sure the correct encoding is used, Vim doesn't check it. When 'encoding' is set the word lists are reloaded. Thus it's a good idea to set 'spelllang' after setting 'encoding' to avoid loading the files twice. How the related spell files are found is explained here: spell-load.

If the spellfile.vim plugin is active and you use a language name for which Vim cannot find the .spl file in 'runtimepath' the plugin will ask you if you want to download the file.

After this option has been set successfully, Vim will source the files "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang' up to the first character that is not an ASCII letter or number and not a dash. Also see set-spc-auto.

(default "en")

not available when compiled without the +syntax feature

type

LocalOption<string>