-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap : non-buffer widgets and communication #483
Comments
It's a good idea to review existing issues and PRs before proposing potential duplicates.
|
I tried to look for older issues but basically my only keywords were 'Qt widgets'. I provided these examples just on the top of my head while writing the issue, but I guess the main point I want to get at is that I'd like to know if @equalsraf plans to integrate these kind of features to nvim-qt or to concentrate on this core widget and provide an API to use in "bigger" projects. Another thing I don't totally understand, since you're here :) : if nvim core provides UI features, does that mean that the nvim process will pass calls through msgpack and UI projects will have to correctly answer the calls ? Or does it mean that it's implemented in TUI and the same renderer for the TUI buffer and the GUI one will automatically get picked up to process the popup/floating window ? Or both maybe ? |
Hi @gagbo. This will run a bit long I'm afraid, bear with me
My "original" plan was never to go as far as Oni, Oni has a very clear idea of where it wants to go in terms of UX and what type of IDE it wants to be. Honestly I dont. My main goal was to provide a library people could use to build other components, or a bare bones UI that adheres closely to the Vi way of doing things. As a rule of thumb, if a feature would be generally applicable to any neovim UI, I prefer to push it upstream. I might use this project to test or bootstrap the idea but if it is a good idea the best method to ensure it is well supported is to discuss it and contribute upstream even if at times it delays its arrival here.
I have nothing against doing this, I would like to point out a couple of things first:
And now for a more practical answers to your questions 😄
This already happens. Either because neovim does this as part of its UI protocol, or because neovim-qt uses it to provide additional features - check the src/gui/runtime/ folder for a neovim plugin whose purpose is to support features in the UI.
The later is a topic of significant debate in neovim/neovim. So both.
For figuring out future directions you should check the neovim issue tracker (example). In fairness neovim-qt has not been keeping up to date with all the features in the UI protocol - we are missing multiple of the externalized widgets (search for ext_ in neovim) not to mention the new protocol for drawing optimisations and floating windows. You listed some features, allow me to extend that list along with some comments
I just realised I have not addressed the main title of the issue which is Roadmap sadly I've ran out of time for today :) I hope this helps to provide some context. Feel free to ask more questions. |
I'll give a few of my thoughts here, and even if my style sounds a little definitive at times, I'm really just exposing my point of view for you to correct the way I see things
As far as I understand, if an Event (KeyPress, KeyRelease, or Mouse) happens in a child widget and this widget does not ack it, the event gets passed to the parent. I am not a Qt wizard, so I don't know if this is practical at all, but we could imagine a widget architecture where :
Another solution would be to have all widgets catch every event, but have the widgets communicate through signals/slots. This is probably the cleanest way in my opinion, since it does not lock us for multiple instances of nvim at first sight.
With Qt6 coming in a not too distant future and seeing the tone of this Qt contributor presentation, it may be wiser to try to use Qt models sparingly (They don't seem to believe too much in using Q variants as much as possible anymore), but I suppose this kind of issues may come later
I'll try to see if there's something not too big I can bring to the table
Since we're in a Qt application, maybe we could use the Super key to change focus between panels ? In #254 at least, it seems that the only missing thing is changing between panes with the keyboard (meaning each panel updates the other accordingly, and that using the mouse works as expected) Thanks for this answer, it helps a lot :) |
There are only two things in life which are definitive :)
That is the gist of it. There are alternatives but for most cases this works well - even here I dont think we gain anything by doing it differently. What makes the neovim case particularly hard is that the user may have created a mapping in neovim to do something else (using nmap, imap, etc) and if you start handling that input differently you might be breaking his expectations.
This is news to me. I actually like the models/views framework.
Quick suggestions
Or we can just let the user decide. you can have gui specific settings being set in ginit.vim as well as rpc requests that operate on the panel (e.g. open/close) |
It's mostly the containers, I've been thinking this since I saw this talk from 2017 CppCon
I'm not totally finished looking at the code in #484 but it looks like it actually provides (neo)vim commands to send the correct messages to the widgets to interact (These lines). Maybe the better style would be to make it a |
Hello,
First of all, thanks for making this, I've been using this gui as my main GUI (n)vim implementation and it's really been helpful 👍
I have a lot of newcomer questions about the direction of the project, and how it might evolve. I am going to have a little time to delve a little into C++ programming and Qt, and I think I'll just try to make a small explorer widget which could communicate with the NeovimConnector to have a file explorer using as many Qt features as possible.
I don't think it's going to be merged anyway, but I wondered if you ever planned to create widgets/applications which would try to do what Onivim does : enhance the feature set of Neovim using "native" (or at least non-vimscript) code.If so, do you have an idea already of the architecture such a project would need ? Sorry if it's too vague now, but if you have any question I would be happy to answer them.
Basically I'm thinking :
These are some features we could add in a C++/Qt app which could then just use nvim-qt as an editor widget.
The text was updated successfully, but these errors were encountered: