Fancy Emacs integration with the Console Version of StarDict
Go to file
TEC f9b3de4d9c
buffer kill hook: check process live before kill
2022-05-01 22:32:49 +08:00
.github/workflows Now on melpa 2021-02-04 14:12:09 +08:00
.gitattributes Overhaul sdcv for fanciness 2020-07-30 01:03:09 +08:00
LICENCE Overhaul sdcv for fanciness 2020-07-30 01:03:09 +08:00 Add stage badge to Readme 2021-11-12 02:41:09 +08:00
lexic.el buffer kill hook: check process live before kill 2022-05-01 22:32:49 +08:00
lexic.gif Rename project 2020-08-08 22:44:59 +08:00

Emacs Lexical Information Viewer

It's nice to know more about the words you're using. Online dictionaries have proliferated and become quite useful, and there are some nice packages available like define-word which make use of such online resources.

However, the quicker I can know more about the words I'm using, the better! Offline dictionaries are obviously the way to go then, and the Console implementation of StarDict already has a package or two for Emacs which I can build off.

However, I'd like to really focus on the words, and making it easy and intuitive as possible to gain a greater understanding of the words and phrases we use.

Thus, I wanted the focus here to not be on the specific backend used (though only sdcv has been implemented as of yet). A near-term goal is to rewrite the implementation to abstract away the specific tool used, allowing for online tools among other backends (such as any future GoldenDict CLI). From there it could be nice to allow for combination of multiple tools (e.g. sdcv + online service).

This has rich support for the following dictionaries:

If there's something you feel is missing, feel free to make an issue — or even better, a PR!


  • The command line stardict tool sdcv (support for other backends is planned)
  • (optional) visual-fill-column-mode


If you happen to use Doom, you may find this section of my config interesting.

In order to recognise format one of the supported dictionaries, Lexic matches the bookname= parameter from the StarDict .ifo file against the entries in lexic-dictionary-specs. Lexic needs to do this, because formatting is inconsistent, and so must be implemented on a per-dictionary basis.

For example, if I downloaded a copy of Soule's English Synonyms, I'd need to make sure that the SoulesSynonymns.ifo file contains the line bookname=Soule's Dictionary of English Synonyms. Check the value of lexic-dictionary-specs to see what it expects for other dictionaries supported by default.

Then, if I open a new Emacs session, and look for a synonym I should see it formatted nicely 🙂.