macvim-dev / macvim-dev/macvim

Epic: Support dictionary/data lookup in MacVim

Abierto
#1,311 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Epic
Lenguaje dominante
Vim Script
Estrellas
7.9k
Forks
691
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza revisando el trabajo de lookup completado en #1312, #1313 y #1315; después, inspecciona el ejemplo de popup personalizado y el src/MacVim/README existente. El alcance restante incluye un autocmd, popups personalizados más completos, compatibilidad con balloon y documentación, por lo que es necesario aclarar el diseño deseado y los criterios de finalización antes de la implementación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
macos, vim
Área
desktop
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.