macvim-dev / macvim-dev/macvim

Epic: Support dictionary/data lookup in MacVim

Ouverte
#1,311 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Epic
Langage dominant
Vim Script
Étoiles
7.9k
Forks
691
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

It is useful to support the ability to look up a piece of selected / highlighted text in MacVim and show a OS popup that gives you more information. #1191 was the original issue, but this work has ballooned as this becomes more ambitious and need to span multiple commits. Using this epic to track the work and elicit ideas / brainstorm.

  • #1312
    • Basic implementation to support looking up text in the Core Text view:
  • #1313
    • Data detection. Should detect URLs, addresses, etc, using NSDataDetector. Note that WebKit/NSTextView use an internal "Reveal" API, which we don't have access to as a third-party software, so we will not be able to do as good as job as them, especially for things like package tracking and airline numbers.
    • Looking up selected texts (when in visual mode) should look up the whole text, not just the individual words.
  • #1315
    • Vimscript API support to look up arbitrary data. Add a new function showdefinition() so that we can programmatically invoke this.
    • Right click menu should show a "Look Up" item. This makes it easier to trigger the look up without need a trackpad as Ctrl-Cmd-D is a little unwieldy and harder to discover.
  • Others
    • Autocmd to intercept lookups and override what to do (see custom popup as an example)
    • Custom popup. This would allow us to popup arbitrary dialog boxes with Markdown / HTML support using NSPopUp. E.g. show documentation in richer format.
      • Extend balloon to support using this. Right now balloon is too barebone and text only
    • Add documentation to a new doc folder for technical details and general guidelines. Would be a nice time to update the src/MacVim/README file which hasn't been updated forever.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par examiner le travail de lookup terminé dans #1312, #1313 et #1315, puis inspectez l’exemple de popup personnalisé et le src/MacVim/README existant. Le périmètre restant comprend un autocmd, des popups personnalisés plus riches, la prise en charge de balloon et la documentation ; le design souhaité et les critères d’achèvement doivent donc être clarifiés avant l’implémentation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
macos, vim
Domaine
desktop
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.