New completion annotations and a minor improvement to aesthetics
Hey Augusto, thanks for developing this excellent package! I've made some additions to completion annotations, along with a minor improvement (in my opinion) to aesthetics.
Changes:
- When displaying document names to the user in contexts such as completions or minibuffer messages, we now use document titles instead of slugs. Thus, instead of "python~3.13" as a completion candidate, we have "Python 3.13".
devdocs--read-entrypreviously displayed document annotations in a manner similar to Marginalia without actually using Marginalia's facilities. This is not a problem when using Vertico, but it causes misalignment in annotations when using Emacs' built-in completion buffer. I replaced the existing annotation function with two separate ones, for built-in completion and Marginalia. The built-in completion uses a newly introduced variabledevdocs-annotation-separator(default:———) to separate annotations from completion candidates.devdocs--read-documentnow displays detailed version information as annotations for documents. Previously, without such annotations, for some documents it was not possible to know (without going to the DevDocs webpage or downloading the document) the exact versions that were being used. Similar to the above, these annotations support both the built-in completion and Marginalia. If the detailed version information is already present in the document title, we do not display it again as an annotation. Thus, "Python 3.13" has the annotation "3.13.5", but "PyTorch 2.7" has no annotation because theversionandreleasefields in its metadata are both "2.7".
Here are two screenshots showing the new annotations:
Hi, thanks for the PR and sorry for the late reply. As a first check that I can accept this change, have you signed the FSF copyright papers (cf. https://github.com/astoff/devdocs.el?tab=readme-ov-file#contributing)?
I've started the process; currently waiting for a disclaimer from my university.
Sorry for the long delay. I've finally signed the FSF copyright papers.