kamykn / spelunker.vim

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

Shows word as misspelled after SpelunkerAdd, doesn't only after editor restart #35

Closed rasuru closed 4 years ago

kamykn commented 4 years ago

@rasuru Sorry, I'm trying to find out this problem, but same problem does not occur with my Vim. Can you tell me your situation when the problem occurred.

1) Please tell me your spelunker.vim settings. 2) Does the problem occur with a specific words?

I need more information to replicate the same behavior you reported.

kamykn commented 4 years ago

I fix some bugs, maybe it's been fixed. Please update the plugin and make sure the problem is fixed.

https://github.com/kamykn/spelunker.vim/commit/9bfe895a418982be03e9501b797cb7bddbbedabf https://github.com/kamykn/spelunker.vim/commit/d0f892ae9ee03ed7a29f8f7878018dfe6078d36b

rasuru commented 4 years ago

@kamykn Thank you for your fast reply! Here is everything connected to spelunker in my init.vim:

Plug 'kamykn/spelunker.vim', { 'commit': 'd0f892a' } " spell checking
" spelunker
let g:enable_spelunker_vim_on_readonly = 1
let g:spelunker_check_type = 1
let g:spelunker_highlight_type = 2
set nospell " instead use spelunker

The behavior is the same when I just add a single word with zg (tried Zg, zw, Zw too). Vim just prints Word 'autocomplete' added to ~/.config/nvim/spell/en.utf-8.add to cmd. Maybe I need to tweak some native Vim settings?

kamykn commented 4 years ago

@rasuru Thank you for sharing your settings, I was able to reproduce this bug. I found out there are matchdelete() bug with nvim. https://github.com/neovim/neovim/issues/12110

I've added code to spelunker.vim to resolve this bug. Please try updating spelunker.vim plugin.

rasuru commented 4 years ago

Unfortunatly, the behavior is the same :(

Also, when I use :SpelunkerAddAll it prints this:

screenshot

I hope it will help. Thanks for your work!

kamykn commented 4 years ago

@rasuru

Also, when I use :SpelunkerAddAll it prints this:

I think this error message should have been fixed in pullrequest #38. If you get this message, spelunker.vim may not be latest version.

rasuru commented 4 years ago

I checked the version and also tried to update, but I already do have the latest one :man_shrugging:

kamykn commented 4 years ago

The behavior is the same when I just add a single word with zg (tried Zg, zw, Zw too).

Vim native commands is zg/zw, but spelunker.vim's commands is Zg/Zw or ZG/ZW. If you use zg/zw commands, highlighting are not updating. Please use Zg/Zw or ZG/ZW command instead of them.

rasuru commented 4 years ago

But I tried all combinations. It just doesn't work.

kamykn commented 4 years ago

Please could you check vim plug setting is updated?

Plug 'kamykn/spelunker.vim', { 'commit': 'd0f892a' } " spell checking

Is already updated this line to Plug 'kamykn/spelunker.vim' " spell checking?

If plugin will not update or already updated, please let me know what is your spelunker.vim's current commit hash ?

kamykn commented 4 years ago

@rasuru I found another nvim's bug. If you repeatedly run zg/zw commands for the same word, it will be added them to ~/.config/nvim/spell/en.utf-8.add many times. Spelunker.vim ZG/Zg and ZW/Zw commands also uses zg/zw command too, Spelunker.vim has same problem.

If your ~/.config/nvim/spell/en.utf-8.add is like a below, it doesn't work well. (This behavior is not reproduced by vim8.)

スクリーンショット 2020-04-27 23 00 32
rasuru commented 4 years ago

Yes, I updated the line. Current commit: b37ab6b8bc468051ff231abb9b4e379e328309e2

There were duplications in this file and I deleted them, but everything works like before. I need to restart the editor, only then the highlighting is gone.

kamykn commented 4 years ago

@rasuru I found a small bug about highlights and fixed it. Please try updating spelunker.vim plugin 🙏 (648f664)

rasuru commented 4 years ago

Hey, everything works as expected! Good job! :smile: