sassanh / qnvim

Neovim backend for Qt Creator
MIT License
136 stars 8 forks source link

Install instructions #1

Closed ShalokShalom closed 6 years ago

ShalokShalom commented 6 years ago

How to install?

sassanh commented 6 years ago

I suggest using the temp branch of this repository.

This is the overview of steps to install it:

  1. Build Qt Creator from Git (https://wiki.qt.io/Building_Qt_Creator_from_Git)
  2. Clone and compile https://github.com/equalsraf/neovim-qt
  3. Open the .pro file as a project in your offical Qt Creator (not the one you built.)
  4. Install devel package of msgpack.
  5. Setup locations to Qt Creator build and neovim-qt in .pro file.
  6. Setup locations to your Qt Creator build in Projects tab.
  7. Build and run inside the official Qt Creator.
  8. (Optional) Put the built library in the location that Qt Creator expects plugins (base on your OS) and use the built Qt Creator instead of the official version.

If you wanna use it with official version you should check out that version in step 1 (instead of building the master branch of Qt Creator.) Older versions of Qt Creator don't run plugins built with newer versions.

This plugin is in its early stages, it has some minor bugs but I'm using it to develop Qt apps and it's OK. I'm willing to help if you run into any problems.

ShalokShalom commented 6 years ago

Thanks a lot dear, you like to introduce this into your README? :)

sassanh commented 6 years ago

I rather wait a little while till it's stable. But if you do steps above without running into any problems then we can add these to README.md. Feedback would be appreciated.

ShalokShalom commented 6 years ago

Is it QtCreator with the NeoVim keybindings, or more? Can I use Vim extensions? Like for other languages?

sassanh commented 6 years ago

It runs a Neovim instance in the background, so your init.rc file is read and all your plugins should work (all my ~110 vim plugins work.)

ShalokShalom commented 6 years ago

Oh fine ^-^

That is extra awesome.

I will test soon :D

sassanh commented 6 years ago

@ShalokShalom I totally forgot about neovim-qt, I just updated the installation instructions.

ShalokShalom commented 6 years ago

I am done with the steps 1-3 Since I am new to programming: How to succeed?

Setup locations to Qt Creator build and neovim-qt in .pro file.

How?

And my distribution ships always the current version of Qt Creator, does this mean I can use it instead of the git build?

sassanh commented 6 years ago

@ShalokShalom I'm glad you passed those 3 steps, you can do step 4 this way: Open qnvim.pro Set isEmpty(IDE_SOURCE_TREE): IDE_SOURCE_TREE (Line 19) to the qt-creator directory full path. Set isEmpty(IDE_BUILD_TREE): IDE_BUILD_TREE (Line 24) to the qt-creator-build directory full path. Set INCLUDEPATH (Line 52) to the <path to>/neovim-qt/src Set Libs (Line 53) to this: -L<path to neovim-qt/build/lib -lneovim-qt -lneovim-qt-gui -lmsgpackc`

Note that msgpackc should also be installed on your system, I hope your distro has this package in its package manager.

sassanh commented 6 years ago

And this is how next step is done:

  1. Go to Projects mode (at the left side of Qt Creator).
  2. Active Project should be qnvim and in Build & Run Desktop ... should be selected. Under Desktop ... select Run and in the right side under Run title set Executable to <full path to>/qt-creator-build/bin/qtcreator and working directory to <full path to>/qt-creator-build/bin.
ShalokShalom commented 6 years ago

I will do this today. If msgpackc isnt in the distro (KaOS) will I build it. Thanks a lot

By the way: Do you think about deploying Qt Creator combined with your project?

So, really as a new IDE?

I see future for it, since the integration of Vim into an existing IDE in Way is quite unique and it opens the development for a lot of other languages on Qt Creator and Qt Designer, plus it is probably one of the most advanced modern UIs for modular editors.

I can imagine a ready Linuxbrew, AppImage, Flatpak and so on, in order to make it more accessible.

sassanh commented 6 years ago

If msgpackc isnt in the distro (KaOS) will I build it

Yes in that case you should clone and build it. But if your distro has neovim, it should probably contains msgpack-dev too.

By the way: Do you think about deploying Qt Creator combined with your project?

No, it's just a plugin for Qt Creator, the total amount of code in this project is less than one percent of Qt Creator's code base (even less than .1 percent). The future of this project is:

  1. Get stable.
  2. Ask Qt Creator guys to embed it in official Qt Creator (like many other plugins) the reason is it's hard for end users to compile plugins for Qt Creator (as it needs cloning the whole Qt Creator's code base and building it) and it's hard thing to do to provide compiled version of plugin for different distros, so I hope they accept to embed this plugin. Then everyone can easily use it. In my opinion a new IDE is not a good idea morally and logically.
ShalokShalom commented 6 years ago

Yes in that case you should clone and build it. But if your distro has neovim, it should probably contains msgpack-dev too.

Oh, I already build it for that xD

In my opinion a new IDE is not a good idea morally and logically.

Why? Even if the Qt Creator guys refuse to integrate it?

sassanh commented 6 years ago

There's no reason they refuse to integrate it when it's stable. I can't publish an IDE that's based on 2 code bases (Qt Creator and Neovim) while I have no idea how %99.9 of their code base works. It's just a tiny plugin for Qt Creator. It may be helpful for vim users who code in Qt Creator (I hope so) but all the credit is for Qt guys and Neovim guys.

As I said I don't see any reasons that Qt guys refuse to integrate it but even if they refuse for some reason people using this plugin in different distros can help to publish different builds of this plugin so that people can copy/paste to their Qt Creator plugins directory. I'll prepare macOS and Ubuntu versions.

ShalokShalom commented 6 years ago

Thanks a lot

sassanh commented 6 years ago

I added install instructions to README.md I guess we can close it, feel free to reopen it in case you think there's more to do for this issue.

ShalokShalom commented 5 years ago

Is it finally ready to be released within Qt Creator?

sassanh commented 5 years ago

@ShalokShalom this is the related thread in Qt's Jira: https://bugreports.qt.io/browse/QTCREATORBUG-20743 Unfortunately I don't have any time to do their procedure, help would be appreciated.

ShalokShalom commented 5 years ago

Superb. I have posted it in the Neovim IRC, in order to gain attention. Hope this helps