Introducing academic.nvim - An Academic English Spellcheck Dictionary for Neovim!
TL;DR: My plugin academic.nvim installs an academic English spellcheck wordlist as its own language, automatically updates it when needed, and adds `en-academic
` to Neovim's `spelllang
` table. It's very lightweight, and only compiles the .spl
file when (a) it's not already installed, or (b) the version in the plugin source is newer than the installed one.
It's just a spellcheck dictionary! Why a plugin?
I've recently been using Neovim to do all of my writing for school, job applications, etc. -- mostly in Latex and Markdown. As much as I love Neovim for this, I did find it lacking in the amount of words of available in the spellchecker. As I hunted around for plugins, I found vim-dirtytalk -- which is amazing for programming and technical terms, but still not quite where I wanted it to be for academic writing in Latex.
Sure, `ltex-ls
` exists, but that thing is heavy! It makes my laptop chug a lot, so as much as I love it (and definitely enable it when I'm proofreading,) I don't feel like a decent spellchecker should require an entire language server -- is there really no way to get a better wordlist into Neovim?
Enter Acamedic, a lovely little Hunspell dictionary that fits my needs exactly. The catch? It's a Hunspell dictionary. I figured out that I could use `unmunch
` to build the `.dic
` and `.aff
` files into a single plaintext wordlist, which can then be compiled by `:mkspell
` into a `.spl
` file. However, this requires a local installation of Hunspell and a bit of manual CLI labor -- annoying, and not feasible for everyone to do.
So, I decided to write a plugin that automates this whole process. I really would have liked it if something like this already existed when I was looking for it, so the next best thing is writing it myself in the hope that someone else will find it useful.
If you folks have any suggestions on how to improve the plugin (perhaps including word lists from other sources besides Acamedic?) please don't hesitate to comment here or open an issue on GitHub.
GitHub Link: https://github.com/ficcdaf/academic.nvim