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

Doesn't work on scratch buffers. #5

Open
jtrv opened this issue Jan 23, 2024 · 4 comments
Open

Doesn't work on scratch buffers. #5

jtrv opened this issue Jan 23, 2024 · 4 comments

Comments

@jtrv
Copy link

jtrv commented Jan 23, 2024

Skyspell highlighter doesn't seem to work in scratch buffers.

Steps to reproduce:

echo "mispelling" > test.txt
cat test.txt | kak -n -e 'eval %sh{skyspell-kak init}; skyspell-enable en_US'
kak -n -e 'eval %sh{skyspell-kak init}; skyspell-enable en_US' test.txt
@dmerejkowsky
Copy link
Contributor

This is hard to fix. skyspell-kak delegates the spell checking to the skyspell_core crate, which assumes the text you want to check is inside a text file.

That's why skyspell-enable uses a BufWritePost hook, and this obviously cannot work for scratch buffers.

We could have skyspell parse the contents of the scratch buffers using stdin for instance, but it's a big change.

I'm also interested to know what kind of scratch buffers need spell checking - can you elaborate on this ?

@jtrv
Copy link
Author

jtrv commented Oct 15, 2024

I often open a scratch to type / modify some text, and then I copy and paste the result to the browser, chat, etc.

@dmerejkowsky
Copy link
Contributor

dmerejkowsky commented Dec 7, 2024

Oh I see - looks like a legitimate request. We'll need to make sure skyspell_core can handle stdin then.

@dmerejkowsky
Copy link
Contributor

We made a little progress - we now have a new TokenProcessor API in skyspell_core 5.0 which should make implementing this easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants