In Swedish, you make compound words by just adding words together right after each other without a space in between as in English. You can make almost any combination, e.g. "staff matters" is "personal" (staff) and "ärenden" (matters) added together like "personalärenden". The vim spell check marks compound words like this as wrong. How can I make vim recognize words as correct if they consist of several correct words?
EDIT: I researched it a bit more. Whether or not a word can be part of a compound word or not is decided in the dictionary files (the
.aff) with some kind of flags. The
.spl file that vim downloaded for Swedish apparently wasn't based on
.aff files with these flags.
LibreOffice has no problem with the compound words so I tried downloading the Swedish dictionary from their extensions website. I then created a
.spl file that vim can use with
:mkspell sv sv_SE
and put the resulting
Even though LibreOffice and vim now use the same dictionary, vim marks words as wrong even when LibreOffice accepts them.