Grammar & Spell Checking Blog Posts with LTeX
Friction Log
-
Install
ltex-ls
brew install ltex-ls
-
Get path to
ltex-ls
readlink -f $(brew --prefix ltex-ls) # /opt/homebrew/Cellar/ltex-ls/15.2.0
-
Install LTeX - LanguageTool grammar/spell checking VS Code Extension
-
Update
ltex.ltex-ls.path
in VS Code’s settings -
Reset & Restart LTeX Extension
-
Test it out!
I used the following text:
This is an mistake.
It can even fix it!
Results
I’m glad I spent the hour installing & correcting things! This would’ve been a lot less work if I followed a few rules:
-
Always wrap shell commands & package names in
backticks
. NPM is a word, butnpm
is a command. -
Always wrap shell output in code fences:
Any invalid prose will throw false-positives here.
While you can put anything here ERROR: MakingUpStuff.js#34:10
-
Avoid clever words like
Vue-ify
,templatize
, etc.
I’d love to set up a Husky pre-commit hook, but ltex-cli
doesn’t seem to correctly process .mdx
files outside of VS Code 🤔