Giter Site home page Giter Site logo

Tooltip support about eovim HOT 2 OPEN

jeanguyomarch avatar jeanguyomarch commented on September 24, 2024
Tooltip support

from eovim.

Comments (2)

jeanguyomarch avatar jeanguyomarch commented on September 24, 2024

Mhh... let me try to rephrase, to see if I understood you correctly. Let say that you have a vim plugin that scans the current buffer for information. For example: finding an URL below the cursor. When the plugin does detect the URL, it wants the GUI client (Eovim) to trigger a widget at a given position (e.g. line+column) to make it contain additional information or controls (e.g. the widget could contain a button "Open"). Something like what is show there: https://fau.re/blog/20141019_terminology_gravatar.html.

That would indeed be a nice feature to have. Actually, you can already make it, but is would require some work, as you would need to implement an Eovim plugin.

If we take my previous example, upon detecting an URL under the cursor, the neovim plugin would run something like:

:call Eovim("tooltip", {'column': xx, 'line': yy, 'data': '...'})

Here data is a bit too generic, but I believe we can pass instead different keys:

  • text, taking a string with markup, to have rich text display,
  • run_command, which would generate a button with some explicative text (e.g. "Open URL") which upon being pressed would execute a command (e.g. xdg-open <url>).
  • ...

Please tell me this is somewhat what you had in mind, and I'll try to add a new Eovim plugin that implements a tooltip functionality.

from eovim.

yshui avatar yshui commented on September 24, 2024

Yep, that's basically it.

I actually have an implementation of this for vanilla neovim: yshui/tooltip.nvim

from eovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.