liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.88k stars 89 forks source link

Overwrite `spell` option for preview windows #424

Closed lygamac closed 2 years ago

lygamac commented 2 years ago

Is your feature request related to a problem? Please describe. Preview of folds uses the same filetype as the document. However it doesn't inherit the options.

With spell enabled with the default spell=en, previewing any fold in a document will show spellbad for every other language despite having the correct spell set in the document. (For example, by adding // vim:spelllang=es or // vim:spelllang=CJK at the end of the document.)

Describe the solution you'd like Add an option to inherit documents options (not only global options), or able to disable spell completely for the preview window.

Describe alternatives you've considered autocmd with preview windows. However it didn't worked.

Additional context image

liuchengxu commented 2 years ago

I think it makes sense to disable the spell check completely in the preview window, now it does.