Home Explore Blog CI



neovim

18th chunk of `runtime/doc/spell.txt`
db3a316cfbc4d5fb8af23d1b71c571f3fafc80668b8014010000000100000fae
 a
prefix cannot be compounded after another word, and a word with a suffix
cannot be compounded with a following word.  Thus the affix cannot appear
on the inside of a compound word.  This can be changed with the
|spell-COMPOUNDPERMITFLAG|.

							*spell-NEEDCOMPOUND*
The NEEDCOMPOUND flag is used to require that a word is used as part of a
compound word.  The word itself is not a good word.  Example:

	NEEDCOMPOUND & ~

							*spell-ONLYINCOMPOUND*
The ONLYINCOMPOUND does exactly the same as NEEDCOMPOUND.  Supported for
compatibility with Hunspell.

							*spell-COMPOUNDMIN*
The minimal character length of a word used for compounding is specified with
COMPOUNDMIN.  Example:
	COMPOUNDMIN 5 ~

When omitted there is no minimal length.  Obviously you could just leave out
the compound flag from short words instead, this feature is present for
compatibility with Myspell.

							*spell-COMPOUNDWORDMAX*
The maximum number of words that can be concatenated into a compound word is
specified with COMPOUNDWORDMAX.  Example:
	COMPOUNDWORDMAX 3 ~

When omitted there is no maximum.  It applies to all compound words.

To set a limit for words with specific flags make sure the items in
COMPOUNDRULE where they appear don't allow too many words.

							*spell-COMPOUNDSYLMAX*
The maximum number of syllables that a compound word may contain is specified
with COMPOUNDSYLMAX.  Example:
	COMPOUNDSYLMAX 6 ~

This has no effect if there is no SYLLABLE item.  Without COMPOUNDSYLMAX there
is no limit on the number of syllables.

If both COMPOUNDWORDMAX and COMPOUNDSYLMAX are defined, a compound word is
accepted if it fits one of the criteria, thus is either made from up to
COMPOUNDWORDMAX words or contains up to COMPOUNDSYLMAX syllables.

						    *spell-COMPOUNDFORBIDFLAG*
The COMPOUNDFORBIDFLAG specifies a flag that can be used on an affix.  It
means that the word plus affix cannot be used in a compound word.  Example:
	affix file:
		COMPOUNDFLAG c ~
		COMPOUNDFORBIDFLAG x ~
		SFX a Y 2 ~
		SFX a 0 s   . ~
		SFX a 0 ize/x . ~
	dictionary:
		word/c ~
		util/ac ~

This allows for "wordutil" and "wordutils" but not "wordutilize".
Note: this doesn't work for postponed prefixes yet.

						    *spell-COMPOUNDPERMITFLAG*
The COMPOUNDPERMITFLAG specifies a flag that can be used on an affix.  It
means that the word plus affix can also be used in a compound word in a way
where the affix ends up halfway through the word.  Without this flag that is
not allowed.
Note: this doesn't work for postponed prefixes yet.

						    *spell-COMPOUNDROOT*
The COMPOUNDROOT flag is used for words in the dictionary that are already a
compound.  This means it counts for two words when checking the compounding
rules.  Can also be used for an affix to count the affix as a compounding
word.

						*spell-CHECKCOMPOUNDPATTERN*
CHECKCOMPOUNDPATTERN is used to define patterns that, when matching at the
position where two words are compounded together forbids the compound.
For example:
	CHECKCOMPOUNDPATTERN o e ~

This forbids compounding if the first word ends in "o" and the second word
starts with "e".

The arguments must be plain text, no patterns are actually supported, despite
the item name.  Case is always ignored.

The Hunspell feature to use three arguments and flags is not supported.

							*spell-NOCOMPOUNDSUGS*
This item indicates that using compounding to make suggestions is not a good
idea.  Use this when compounding is used with very short or one-character
words.  E.g. to make numbers out of digits.  Without this flag creating
suggestions would spend most time trying all kind of weird compound words.

	NOCOMPOUNDSUGS ~

							*spell-SYLLABLE*
The SYLLABLE item defines characters or character sequences that are used to
count the number of syllables in a word.  Example:
	SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~

Before the first slash is the set of characters that are counted for one
syllable, also when repeated and mixed, until the next character

Title: Compound Word Limitations and Additional Settings
Summary
This section delves into further configurations for compound words. It covers COMPOUNDWORDMAX to limit the number of concatenated words, COMPOUNDSYLMAX to limit syllables, and flags like COMPOUNDFORBIDFLAG and COMPOUNDPERMITFLAG to control affix usage. It also introduces the COMPOUNDROOT flag for words already compounded, CHECKCOMPOUNDPATTERN to forbid compounding based on character patterns, NOCOMPOUNDSUGS to disable compound suggestions, and SYLLABLE to define characters for syllable counting.