How to edit Logseq's user dictionary?

I’m trying to edit Logseq’s custom user dictionary because I’ve added a few words to it that I no longer want to consider valid, however manually editing %APPDATA%\Logseq\Custom Dictionary.txt doesn’t work. (~/.config/logseq/Custom Dictionary.txt on *nix-based systems I believe.)

  1. Close Logseq.
  2. Delete the contents of Custom Dictionary.txt.
  3. Open Logseq.
  4. Words that now should be misspelled are still considered valid.

It seems that Logseq is caching the previously added dictionary values in some way. Refreshing / re-indexing does not help, neither does deleting Custom Dictionary.txt.backup. I also tried Clear Cache found under Settings > Advanced which did not remedy the situation.

What can I change or delete without risking the integrity of my graph which will bring things back into alignment?

Ideally the user dictionary could be managed via Logseq in the future.


Logseq 0.9.1
Windows 11

macOS: Apparently, the answer to this question for Macs can be found here.

I had the thought to check on Windows’ own dictionary and indeed, the misspelled words are listed there (just search for “dictionary” in Windows’ Settings and you should find it under Inking and typing personalization.

The problem now is that this UI doesn’t allow to only remove a single word. All it provides is a button at the top named Clear your customized dictionary and I don’t want to lose the other words that have been added by other programs.

Guide for Windows

  1. After some research, it looks like this Windows dictionary list is stored in a file called default.dic located here: %APPDATA%\Microsoft\Spelling\neutral. This file can be edited and you can add or remove words from it as you please. Save the file after making any edits, of course.
    • After step 2: You may need to check any other language folders under %APPDATA%\Microsoft\Spelling for their default.dic files too, but only if changes to this file aren’t having any effect in Logseq.
  2. If the word was initially added to the dictionary via Logseq, you will have to also remove it from %APPDATA%\Logseq\Custom Dictionary.txt (otherwise the word will continue to be displayed as valid).
    • Note: I haven’t been able to remove words from this file without it being reset to a blank list after restarting Logseq (probably due to the incorrect checksum value), but for my purposes, this is fine as the end result of these steps is my desired goal: Squigglies when I want them in Logseq, and none when I don’t. What unintended side effect this may have is not known to me.
  3. Finally, restart Logseq.

Hopefully this won’t be such a manual process in future Logseq releases.

Some tips

  • Words that you know will be written both using a leading capital letter and as lowercase, you only need to add the lowercase variant to cover both scenarios.
  • If the word is only in the Windows default.dic file and not Logseq’s Custom Dictionary.txt: After saving the DIC file and if you’re in a block with any words affected by your dictionary changes, click out of the block and then back into it see the effect in Logseq immediately.
  • To avoid needing to remove a word from two different files each time you want to remove a word, don’t initially add the word via Logseq (as that’s when it writes to Custom Dictionary.txt), instead, edit the default.dic directly. This way, to remove a squiggly underline from a word in Logseq you only need to edit the one default.dic file, and you won’t need to restart Logseq either.
1 Like