Notes and languages
I used to have a hard time taking notes in a consistent way. I’m not saying I didn’t take notes as a student back in the day. I did, but I rarely went back to them, and I usually didn’t set up a system that was consistent and structured for my notes. Some people are really into taking notes, so they have a fancy system in place (e.g., Obsidian, keywords, etc.); others almost never take notes, so when they do take notes they just open an editor or a general app and go for it. I’ve always been somewhere in between these two extremes. These days, I use plain md files in NeoVim inside a given directory. This allows me to have snippets for a wide range of objects I’d need while taking notes, and I don’t have to leave the terminal, which is where I prefer to work (see my workflow here). Searching notes becomes easy, and files are synced across computers. This is essentially all I need. Ultimately, if taking notes isn’t a pleasant task, I know I won’t do it consistently.
Three things I like to have
For language notes specifically, which is very often the main note-taking activity in my everyday life besides meetings, I want to have 1) a reliable spellcheck that I can customize as well as 2) a quick way to look up words. You may be wondering what the fuss is about, since these are basic things you find even in Apple Notes. That is true. But I want a unified dictionary for spellchecks for all of my tasks: from writing notes to writing a paper to producing slides. NeoVim allows me to use a single tool for everything, and it’s fast: same place for snippets, keymaps, abbreviations, plugins, as well as spellchecks and word definitions. Essentially, I want to be 2-3 key presses away from anything I might need or want.
Spellchecks are easy to add to your NeoVim configuration, so I have keymaps for English, French, Italian and Portuguese. The dictionary lookup is less straightforward (see below), but there are already several dictionaries inside Mac OS, so you can use an agent to code a plugin for you. That’s what I did, and it works quite well (see below). Note that if you have several English dictionaries activated/installed, all of their outputs will show. For example, I have English-French, English-Italian, etc. Thus, when I ask for the definition of a given English word, I have a comprehensive result. It’s visually clear, but it won’t be succinct depending on how many dictionaries you have.
The plugin works well when I’m writing, but sometimes I just want to look up a word without opening a file. For that, I made Lexis, which is basically a terminal version of the dictionary app on Mac OS (Figure 2). Lexis doesn’t come with any dictionaries. It reads the ones you’ve activated in Dictionary.app (in the order you set there), so there are no copyright issues: nothing is copied or shared. You type a word, and the sidebar lists only the dictionaries that have an entry for it. The keys are the same as Conjugo’s (see below), and the entry has a cursor, so you can move around with the usual vim motions and yank a word or a line.
Another feature I like to have is 3) a way to check conjugation tables. Different websites offer that option, but they’re usually filled with annoying ads (who designs those websites…?). Conjugo is a solution to that. It’s essentially a conjugation app for the terminal. It has a simple task. The app covers English, French, German, Italian, Portuguese, Russian and Spanish (German and Russian are recent additions). Russian verbs also show their aspect partner (говорить and сказать, for example), and you can jump from one to the other.
To use Conjugo directly from NeoVim, I then created a plugin that essentially takes me from verb under cursor to conjugation table (on a floating window where the current form of the verb is highlighted). Details on the plugin can also be found on the repository of Conjugo.
Here’s a quick demo of all three elements working together in a single document (in French for this example).
Lexis and Conjugo together
The two apps know about each other. If you have both installed, pressing C on a verb in Lexis opens its conjugation table in Conjugo, and pressing D in Conjugo opens the dictionary entries for the verb you’re looking at. Inflected forms work too: C on parlerions opens parler, with that form highlighted. Quitting one app takes you back to the other, so you can go back and forth with C D C D. Both apps also work if your keyboard is set to Cyrillic, which was a fun problem to solve (j is not j when you’re typing in Russian).
You can install both with uv. If you don’t have uv yet, install it first (you don’t need Python: uv will download it if necessary):
curl -LsSf https://astral.sh/uv/install.sh | sh # or: brew install uvThen:
uv tool install git+https://github.com/guilhermegarcia/lexis
uv tool install git+https://github.com/guilhermegarcia/conjLexis needs Mac OS, since it relies on the dictionaries in Dictionary.app. Conjugo works on any system.
My spellcheck setup
Here’s exactly how my spellcheck works. There’s no plugin: it’s NeoVim’s built-in spellcheck with a few lines of configuration on top of LazyVim. Spellcheck is off by default, and I turn it on for one language at a time. \Ls followed by a letter (e, f, i or p) turns on English, French, Italian or Portuguese. Pressing the same keys again turns it off, and pressing another letter switches languages.
-- lua/config/keymaps.lua
local function set_spell_language(lang)
if vim.wo.spell and vim.bo.spelllang == lang then
vim.opt_local.spell = false
return
end
vim.opt_local.spell = true
vim.opt_local.spelllang = { lang }
vim.opt_local.spellfile = vim.fn.stdpath("config") .. "/spell/" .. lang .. ".utf-8.add"
end
for key, lang in pairs({ e = "en", f = "fr", i = "it", p = "pt" }) do
vim.keymap.set("n", "\\Ls" .. key, function()
set_spell_language(lang)
end, { desc = "Spellcheck (" .. lang .. ")" })
endThe important line is the last one in the function: each language has its own list of words I’ve added. When I press zg on a word I want to keep, it goes into the list for the language I’m checking, so French words never end up in my English dictionary. The usual keys do the rest: ]s and [s jump to the next and previous misspelled word, and z= shows suggestions.
LazyVim turns on spellcheck automatically in Markdown and other text files. I don’t want that, since I often write in a language other than English, so I removed it in lua/config/autocmds.lua:
pcall(vim.api.nvim_del_augroup_by_name, "lazyvim_wrap_spell")NeoVim comes with the English dictionary. The first time you set spelllang to another language, NeoVim offers to download its dictionary into ~/.config/nvim/spell/. My word lists live in that folder too. I keep my configuration in a git repository (with chezmoi), so the same dictionary follows me across computers, whether I’m writing notes, a paper or slides.
Copyright © Guilherme Duarte Garcia



