Giter Site home page Giter Site logo

qnvim's People

Contributors

gikari avatar sassanh avatar shatur 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  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

qnvim's Issues

Texteditor.FollowSmybolUnderCursor breaks previous file.

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.

Use normal QtCreator Shortcuts

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?

Enabling qnvim back requires buffer switch

If I trying to enable qnvim again I need to change opened file (or open a new one).

Steps to reproduce:

  1. Open editor.
  2. Toggle qnvim - it becomes disabled.
  3. Toggle qnvim again.

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 :)

Every movement seems to reload the code model (warnings, cppcheck, etc.)

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?

Split windows

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.

Organize Codebase

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.

nvim crashes on :q<cr>

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.

Can not compile with the latest neovim-qt

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

Provide Lua api

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.

Show other types of buffers

Currently it only works with normal buffers, it should be able to show terminal/help/etc buffers in Qt Creator.

Wrap

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.

Connections from other clients

It it possible to prevent connections from other clients? For example, if I launching Neovim Qt from nvr it automatically sends opened file to Qt Creator which is not what I want.

For example, firenvim does not have this issue.

$MYVIMRC and $MYQVIMRC point to ~/.config/nvim/init.lua

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.

Better command line

The Problem

Current implementation have some issues:

  1. The command line blocks Qt Creator search bar functionality.
  2. The command line is too small. It is unsuitable for displaying long messages.

It would be desirable to have a better command line.

Here are some examples of how command line is implemented in different editors:

Neovim

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.

image

VSCode (VsCodeVim)

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.

image

VSCode (Neovim plugin)

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.

image

JetBrains IDEs (IdeaVim)

In IdeaVim command line is in local to the splits, and used both for messages and commands.

image

Qt Creator (FakeVim)

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.

image

Solution

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.

image

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?

Avoid using 7zip for assets in releases

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

qtcreator crash

I download the release (libQNVim-1.2.0-qtcreator-4.9.1-x86_64.so) in my qt-creator plugin directory
my qt-creator version is official release (see below), I also load this plugin
Uploading image.png…

when I open a file, qt-creator crash
Uploading image.png…

Search highlighting

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?

Cursor blinking and size

  1. The cursor is blinking even in normal mode, is there a way to turn this off?
  2. When I zoom with Ctrl+Mouse wheel, the cursor width stays the same instead of adjusting to the current font size.

Window size and position

Good job!
But there is not enough function to save the position and size of the window, to restore when you restart.

Qt Creator crashes on startup after this plugin is installed (4.9.0-rc1, macOS 10.14)

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:

  1. checkout qt-creator v4.9.0-rc1 and build
  2. checkout neovim-qt and build
  3. modify the qvim.pro file and build

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

Relative Number

If both relativenumber and number are enabled, it ruins the current line in the numbers column.

Complete as you type

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.

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.