Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell check enabled but not working #344

Open
medwatt opened this issue Oct 1, 2020 · 7 comments
Open

Spell check enabled but not working #344

medwatt opened this issue Oct 1, 2020 · 7 comments
Assignees
Labels

Comments

@medwatt
Copy link

medwatt commented Oct 1, 2020

I have spell check enabled for markdown documents. For some reason, with this plugin enabled, no spelling mistakes are detected. If I disable this plugin, the errors are detected.

I'm using Neovim 0.5 on Windows 10.

@ravl1084
Copy link

I see the same on Ubuntu 18, Vim 8

@meck
Copy link

meck commented Jan 16, 2021

Same issue but i notices spelling only stops working if i set a custom g:pandoc#syntax#codeblocks#embeds#langs without it spelling works fine.

@N3on1x
Copy link

N3on1x commented Mar 1, 2021

I had the same issue. After troubleshooting I found that the syntax file for java located at $VIMRUNTIME/syntax/java.vim messes with the syntax spell option by setting: syntax spell default. This overwrites the spell check setting syntax spell toplevel set in syntax/pandoc.vim.

Removing 'java' from my g:pandoc#syntax#codeblocks#embeds#langs list in .vimrc solved the problem.

The current setting can be verified by typing :syntax spell in a buffer.
Setting the spell checking to toplevel also fixes the problem for the current buffer: :syntax spell toplevel

@alerque
Copy link
Member

alerque commented Mar 2, 2021

Great tip @NicolajNiels1. That might explain why I've never been able to replicate various reports like this (I don't have Java enabled as a possible embedded language) and why it keeps coming up. It might not be just Java either, perhaps there are other languages that trip people up.

I wonder if this is something we can mitigate by saving / restoring the setting after loaded embedded syntaxes. I think we do that already for some other settings.

@meck
Copy link

meck commented Mar 2, 2021

I checked and the my problems is traceable to haskell in g:pandoc#syntax#codeblocks#embeds#langs so its not only java

@alerque
Copy link
Member

alerque commented Mar 2, 2021

Thanks @meck, I think we're on to something. I'm pretty sure there is a way we can block this change.

@alerque alerque added the bug label Mar 2, 2021
@N3on1x
Copy link

N3on1x commented Mar 3, 2021

I checked and the my problems is traceable to haskell in g:pandoc#syntax#codeblocks#embeds#langs so its not only java

Running grep -irn "syntax spell default" * when located in $VIMRUNTIME/syntax yields the following for me, confirming that it might not only be a problem with java:

groovy.vim:226:  syntax spell default  " added by Bram
java.vim:161:  syntax spell default
papp.vim:29:  syntax spell default  " added by Bram
spyce.vim:22:syntax spell default  " added by Bram

(Of course this is dependent on which vim distribution you are using. I am using macvim installed via homebrew. )

@alerque alerque self-assigned this Mar 3, 2021
lukhar pushed a commit to lukhar/.nvim that referenced this issue Sep 19, 2021
Removed those two as they were causing spell check to fail on markdown
files. More details here: vim-pandoc/vim-pandoc-syntax#344. Possible workaround could include ensuring that `:syntax spell toplevel` is set when markdown file is loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants