kamykn / spelunker.vim

Improved vim spelling plugin (with camel case support)!
MIT License
359 stars 21 forks source link

Some words are not highlighted with spelunker_check_type = 2 or with custom group #44

Closed Nodman closed 4 years ago

Nodman commented 4 years ago

Hello and thank you for awesome plugin!

I recently installed spelunker on neovim v0.4.3 and noticed strange behaviour: When using default settings everything works as expected but as soon as I set let g:spelunker_check_type = 2 some incorrectly spelled words stops highlighting. For example I have this test file test.tsx with only two lines:

export const isChosed = false;
export const valiateStatus = true;

word "Chosed" will not be highlighted with settings above but will be highlighted with default settings, word "valiate" will be highlighted always, with any settings. This problem also appears when using custom groups (even with default let g:spelunker_check_type = 1):

let g:spelunker_disable_auto_group = 1

augroup spelunker
  autocmd BufWinEnter,BufWritePost *.js,*.jsx,*.json,*.md,*ts,*tsx call spelunker#check()
augroup END

at last: using let g:spelunker_check_type = 2 will check spelling on some readonly buffers like vim-startify

kamykn commented 4 years ago

Hi, @Nodman ! Thank you for using my VIm plugin!

I'm trying to reproduce this problem in my Neovim, but I can't. This GIF is a screen recording of the NVIM on my MAC. neovim-2020052502

I'm thinking it might be a word that is already on the spelling list. Could you check if chosed is registered in the ~/.config/nvim/spell/en.utf-8.add?

kamykn commented 4 years ago

Or maybe it's the same issue with this Issue(#35), so please try updating the plugin.

Nodman commented 4 years ago

Hi ,@kamykn! Thank you for the fast response! I tried to do the same thing as you did (launching vim with clean setup) and it seems in this case everything works well. However in my full setup problem is still appears but not every time (I will show it on the GIF). At this point I don't really understand where problem could come from. I also removed spell folder and checked for plugin updates. Screen Recording 2020-05-26 at 23 24 50

Nodman commented 4 years ago

I think I found the problem. There was another source for spell words LWScreenShot 2020-05-26 at 23 53 16 I don't really understand how vim picked this file but, yeah there was word "chosed" in there, after removing this folder - everything works as expected.

Thank you for help!

PS. Still, is there any way to turn off spell check for vim-stratify buffer when using let g:spelunker_check_type = 2

kamykn commented 4 years ago

PS. Still, is there any way to turn off spell check for vim-stratify buffer when using let g:spelunker_check_type = 2

Unfortunately, there is no way to turn off spell check in vim-startify. So far, I haven't found any ideas to solve this.