mirror of
https://github.com/preservim/vim-wordy.git
synced 2025-11-17 06:13:39 -05:00
GH-15: flag words as rare instead of bad in NeoVim
This change marks all words in all dictionaries as rare words so that NeoVim highlights them as SpellRare instead of SpellBad. This lets you distinguish between wordy writing and normal misspellings, respectively. In order for this to work, your NeoVim needs to be patched as follows: https://github.com/neovim/neovim/pull/2456 https://groups.google.com/forum/#!topic/vim_dev/rPWOoR3ZgSA See `:help spell-wordlist-format` for details about dictionary markings.
This commit is contained in:
@@ -31,6 +31,9 @@ function! wordy#init(...) abort
|
||||
let l:encoding = get(l:args, 'encoding', 'utf-8')
|
||||
for l:dict in l:dicts
|
||||
let l:data_dir = g:wordy_dir . '/data'
|
||||
if has('nvim')
|
||||
let l:data_dir = l:data_dir . '-neovim'
|
||||
endif
|
||||
let l:src_path = l:data_dir . '/' . l:lang . '/' . l:dict . '.dic'
|
||||
if filereadable(l:src_path)
|
||||
let l:spell_dir = g:wordy_dir . '/spell'
|
||||
|
||||
Reference in New Issue
Block a user