equalsraf / neovim-qt

Neovim client library and GUI, in Qt5.
https://github.com/equalsraf/neovim-qt/wiki
ISC License
1.83k stars 171 forks source link

[Discussion] Beyond vim: make neovim-qt easily embedable or extensible, and support for viewing HTML #413

Closed qwfy closed 6 years ago

qwfy commented 6 years ago

Vim really is a great text editor, but some times, a text interface is far from sufficient, for example:

On the other hand, various IDEs have great support for common or domain specific GUIs. For example, Atom has live preview for markdown and graphviz, Spyder and PyCharm can display plots, view data as a grid, etc.. But every time I want to edit something it it, I feel like lacking another two hands - one hand to hold the mouse so I can go to some other line, one hand to hold the Ctrl and Shift when the need arise (yes you can configure them, but with so many shortcuts, I tend to just give up and use the default setting), and the rest two to do the actual typing. Yes, they offer vim emulation - but usually they are slow and incomplete and don't support your vimrc and vim plugins.

By making neovim-qt embedable, applications like Spyder, ReText and QOwnNotes can choose to use something like editorWidget = new NeovimQt() instead of implementing their own editor, they may choose not to, but judging by those various vim mode emulators, I think some of them will - they are emulating vim for a reason, either because the developer himself is a vim user, or they care about vim users, since vim tends to spoil its users, once you learned it, you don't really want to use another editor.

If the GUI part of the neovim-qt is easily extensible, applications may be built as a plugin to neovim-qt (can choose not to be a plugin of vim).

Add support for viewing HTML alone would make a huge difference, QtWebEngine can be used to render html.

This is a huge change both in code and in philosophy, and requires lots of effort. I think this is something fundable and will make neovim-qt shine among all the neovim GUIs, even among other editors.

justinmk commented 6 years ago

NeovimQt widget would be useful (for Qt-based apps at least), but I'm not sure where you're going with most of the use-cases you listed. Nvim itself already has a robust API + UI events for most embedding scenarios. E.g. a PyCharm integration would use Nvim directly, it would not have much use for Nvim-Qt.

qwfy commented 6 years ago

I think something more than a terminal nvim wrapped in a GUI is needed. (I'm not ungrateful for this project, I'm sure there is a lot of effort behind this). Supporting for using QML as a plugin system may be a long shot, but, at least, something like viewing HTML should be supported. Not everything is text.

justinmk commented 6 years ago

Nvim core is decoupled from the terminal UI.

qwfy commented 6 years ago

Yeah, but neovim-qt is still a terminal-ish app. Thanks for the comment, I'm closing this, since I don't think many people are interested in this.

saks commented 5 years ago

@qwfy, as far as I understand, TUI that comes with nvim has no way to render any HTML at all, but qt-based app (like neovim-qt) definitely can. Right now vim users can only read docs directly from nvim in text or markdown format which is far from ideal at times. If neovim-qt will be able to render HTML, this will be such a huge improvement!

egolep commented 2 years ago

I would be interested too! Expecially, I would really appreciate the ability to see plots in a terminal pane used for REPL or in a specialized pane. I do have the ability to do this with terminal emulators like kitty or wezterm, but: a- I don't want to use a GPU-accelerated terminal for my regular stuff b- I always ended up with problem when trying to use my configuration via ssh Having a fully integrated experience (and I see neovim-qt already gives the opportunity to attach to a remote instance via tcp) would be great!