Code Monkey home page Code Monkey logo

neovim-ui's People

Contributors

erjanmx avatar mjlbach avatar smolck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neovim-ui's Issues

Pickers (pick one, many, async/sync)

In both nvim-dap and nvim-jdtls I've build some picker methods:

function M.pick_one_async(items, prompt, label_fn, cb)
function M.pick_one(items, prompt, label_fn)
function M.pick_many(items, prompt, label_f)

The items here is an arbitrary list of arbitrary items and label_fn is used to render out an item. So it receives an item and must return a string.
In theory items could also be a function that follows the iterator protocol, to support lazy data generation use-cases as well.
The implementation must then take care to call the callback or return the selected item. (The whole object from the options, not an index or so)

They've a inputlist based default implementation and there are some recipes how to replace them with fancier implementations. For example to use telescope instead.
I think it would be cool if vim.ui would contain these so that this pattern becomes more established and we have a more consistent UI experience across plugins.

I'm pretty happy with the API so far as it is both flexible enough and also simple to use. I've seen other picker APIs (e.g. in vscode), where are always extra mapping steps necessary - you need to map your structures to a {label:, value:} and then based on that figure out which of your items the user really selected.

Callbacks

nvim-lua/popup.nvim#4

@jbyuki did this awhile ago in popup.nvim but I forgot to merge -- since we're not really doing anything in popup.nvim at the moment, you may just want to implement that here.

Common methods per widget

It came up on IRC that we should have a common interface for widgets. This is mostly a placeholder for discussion.

-[ ] widget.close() -> Should we also enable a delayed invocation of this as a widget method like I did in notification.lua?
-[ ] widget.id() -> @smolck do we need this for vim.ui.layout?

Change border title on the fly

I don't know if this is currently possible (atleast i don't see a way in plenary.border, etc) but it would be cool if we can change border title on the fly.

What i mean is this:

  • For telescope we are going to introduce a way where you can change you previewer on the fly to get a new view on the selected entry: nvim-telescope/telescope.nvim#528
  • Now i want to make clear which previewer currently displays. Would be cool if the title can show this.
  • And because i can cycle between those previewers i want to update the title every time the previewer changes

I made add something for the time being in plenary or popup that makes this possible, it would be just cool if this will end up in the ui module as well so we can just easily update :)

Thanks for all your work :D

Neovim line size and image rendering

Maybe this is not the right place for this, but in the neovide discord there has been some talk about wanting a way to specify line sizes per line and to embed images.

Currently support for such things is done on a gui by gui basis rather than having a cohesive standard. Seems to me that such a thing should be specified by neovim (or some defacto standard format) and then implemented by each neovim gui.

Is this something that neovim-ui might support and or drive?

Image showcase

This is an issue to post pictures of WIP elements from nvim-ui. Please don't comment here, but open individual issues for feedback.

UI namespace for configuration options

Right now, we have separate methods for floating win and border win, it would be nice to have instead a global vim.ui.use_borders type option (which maybe could be overridden?) that would wrap a given UI in a border (not sure what the implementation might be like for other options).

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.