sassanh / qnvim Goto Github PK
View Code? Open in Web Editor NEWNeovim backend for Qt Creator
License: MIT License
Neovim backend for Qt Creator
License: MIT License
Say I am in fileA.cpp and use Texteditor.FollowSmybolUnderCursor with the shortcut provided in your example qnvim.vim file. This takes me to fileB.cpp as expected. However, when I go back to fileA.cpp (via QtCreator.GotoPreviousInHistory) the fileA.cpp will appear as empty and I have to restart QtCreator to see its contents again. Let me know if you can reproduce this or need more details.
In FakeVim, I can still use most of the QtCreator shortcuts, like F2 for following a symbol or Ctrl+K for opening the locator. However, with qnvim this doesn't seem to work. Is there a way to unmap some shortcuts in qnvim to send them directly to QtCreator?
If I trying to enable qnvim again I need to change opened file (or open a new one).
Steps to reproduce:
Expected vehavior:
qnvim becomes enabled again.
Actual behavior:
qnvim still disabled until the opened docuemnt will not be changed.
I will try to fix it myself tomorrow :)
I found that everytime I do anything (even just moving around in normal mode), the code model seems to be reloaded, i.e. cppcheck is run, the warnings turn grey for a short time, etc. Normally, this should only happen when you actually edit anything. Do you have a hint on how this could be fixed? Or is it an inherent problem of the neovim communication?
I have followed the instruction and installed the qnvim version 10.0.0 for qt creator of the same version on macos.
when trying to open any file it just crashes qt creator
report.txt
If I wanted to just download qt creator, and brew install nvim-qt
, how would I do that?
They work in FakeVim though, so it should be possible to add this to qnvim
Currently qnvim doesn't support splits. It doesn't crash, but it doesn't show splits neither. There's simply no relation between Qt Creators splits and Neovim splits.
It all started as a prove of concept, I just wanted to see if it's possible to have a neovim backend for Qt Creator. I never had the time to reorganize the codebase. It'd be great if codebase get better organized as it evolves.
I'm using Qnvim 5.0.2 on Debian GNU/Linux bookworm/sid x86_64.
When I try to close a file with :q<cr>
it stays open and the editor stops responding to any keyboard inputs.
I can still use the mouse to move the cursor, cut, paste and even close files.
In the original file I tried to close, the cursor continues to appear as a block.
If I close that file by mouse and view other files, the cursor now appears as a line.
How to install?
I failed to compile qnvim with the latest neovim-qt, the error is
../qnvimplugin.cpp:95:54: error: invalid use of incomplete type ‘class NeovimQt::InputConv’
QNVimPlugin::QNVimPlugin(): mInputConv(new NeovimQt::InputConv)
The class NeovimQt::InputConv has been removed from neovim-qt since equalsraf/neovim-qt@548bb1e
Currently the api of this plugin in Neovim side is in Vimscript, it would be more convenient if we can have a Lua api too.
Currently it only works with normal buffers, it should be able to show terminal/help/etc buffers in Qt Creator.
set wrap
doesn't work properly. When cursor is in the beginning of a line that is wrapped gj
may go to end of line or second character in next line instead of going to first character of next line.
It should be mentioned in the Readme I think.
Also, could clang-tidy, other QQC linters work on top of this plugin's view?
I'm using Qnvim 5.0.2 on Debian GNU/Linux bookworm/sid x86_64.
The nvim keybindings work, but none of the commands from the example qnvim.vim file which I put in ~/.config/nvim/ work.
When I open $MY(Q)VIMRC both lead to ~/.config/nvim/init.lua.
When I reassign either of them, they reset after I close QtCreator.
Current implementation have some issues:
It would be desirable to have a better command line.
Here are some examples of how command line is implemented in different editors:
In Neovim command line is one for each split and is used for both commands and messages. Some plugins transform the command line and messages into popup and notification.
In this plugin command line is in the status bar and is used both for commands and messages. I was unable to test multiline messages, since echo command is not implemented.
In this plugin, the command line is opened in the popup, messages are displayed in the status line or in "Output" pane, if they are long.
In IdeaVim command line is in local to the splits, and used both for messages and commands.
In FakeVim plugin, the status line is used for displaying short messages and for receiving commands, but I was unable to let it print the multiline message.
I currently have a prototype for the new command line implementation, that is similar to the one from IdeaVim plugin, but just as it was done 😁 I realized, that original Neovim has only one command line, and it makes no sense to keep it local to each split.
Furthermore, it complicates the code quite a lot and increases probability of bugs occurrence. However, I am not sure what design is the best for a single command line. Should it be just a single line above the status line? Should it respect Neovim cmdheight setting? Should it autohide?
We are compressing the plugin assets using 7zip in releases. As far as I know a 7zip unarchiver is not available in macOS or Linux out of the box, so to avoid extra work for users my suggestion is to either not compress the assets at all or compress it using gzip or bzip2 (for macOS and Linux) and zip (for Windows) which are widely used by developers.
Examples of some popular repositories:
Neovim uses gzip and zip: https://github.com/neovim/neovim/releases/tag/stable
Curl uses gzip, bzip2 and zip: https://github.com/curl/curl/releases/tag/curl-7_86_0
Ripgrep uses gzip, bzip2 and zip: https://github.com/BurntSushi/ripgrep/releases/tag/13.0.0
CMake uses gzip: https://github.com/Kitware/CMake/releases
Electron uses zip: https://github.com/electron/electron/releases/tag/v21.3.3
/cc @gikari
I noticed that plugin does not highlight searched items. Highlighting is also not works with such plugins as sandwich (It should show the word to which the modification will be applied.)
Is it possible to somehow access to neovim highlighting?
Good job!
But there is not enough function to save the position and size of the window, to restore when you restart.
The original author of this software, @sassanh is currently a little busy.
He has asked us for help, to get his project upstream: #1 (comment)
One issue is the license, as brought up by someone in #qt on Freenode.
This issue here is meant to lead through this process.
Hi,
First, thank you very much for your work. This is brilliant!
However, I tried to compile the plugin with the latest QTC 4.9.0-rc1, and it succeeded, but QTC won't start.
Things that I did:
Observation 1:
Run the built QTC (run my installed QTC version (also 4.9.0-rc1) results in the identical behavior):
A dialog pops up saying the dependencies (Core and TextEdit) is not found, qnvim plugin is not loaded.
Observation 2:
Copy the libCore.dylib and libTextEdit.dylib to the same folder as the plugin (~/Libarary ...),
run QTC:
The program fails to start.
Any ideas? I am on macOS 10.14, Qt version 5.12.1
If both relativenumber
and number
are enabled, it ruins the current line in the numbers column.
Please make a release compatible with QtCreator 10
Is it possible to have autocompletion in insert mode on typing? Without calling shortcut for rpcnotify(g:neovim_channel, 'Gui', 'triggerCommand', 'TextEditor.CompleteThis')
every time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.