GithubHelp home page GithubHelp logo

vhakulinen / gnvim Goto Github PK

View Code? Open in Web Editor NEW
1.8K 22.0 70.0 1.85 MB

GUI for neovim, without any web bloat

License: MIT License

Rust 97.76% Makefile 0.83% Lua 0.93% Shell 0.07% CSS 0.40%
rust neovim gtk nvim gui ui text-editor neovim-guis

gnvim's Introduction

GNvim Logo

GNvim - GTK4 Neovim GUI

Gnvim, opinionated Neovim GUI.

Screenshot of gnvim

For previous gtk3 version, checkout the legacy branch.

Install

NOTE: gnvim requires nvim version 0.9.5 or higher.

Flatpak

If you're using flatpak, you can build a GNvim flatpak locally:

$ # Install flatpak-builder
$ sudo apt install flatpak-builder
$ make install-flatpak-deps # Install required runtime and SDKs
$ make install-flatpak # Build and install the flatpak
$ # Optional: install gnvim runtime files (i.e. for `lua require('gnvim')`)
$ flatpak run com.github.vhakulinen.gnvim.Devel --install-runtime-files

System

Install system wide:

$ # Install cargo (e.g. the rust toolchain)
$ # Install gtk4 and libadwaita dev files, e.g. apt install libgtk-4-dev libadwaita-1-dev (see below)
$ make build
$ sudo make install

More detailed instructions regarding gtk4 requirements, see the gtk-rs book's instructions).

Documentation

See :h gnvim and/or runtime/doc/gnvim.txt.

Development

Gnvim comes with custom rpc client which uses code generation for generating bindings to the Neovim API. This is done by the scripts/generate-bindings.sh script and requires the moreutils package.

gnvim's People

Contributors

agraven avatar badosu avatar bfredl avatar gabmus avatar gaurav avatar ggouss avatar jacobmischka avatar llwwns avatar prabhugopal avatar smolck avatar teto avatar thematt avatar tim-seoss avatar tjwallace avatar vhakulinen 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnvim's Issues

Improve configurability

At the moment, configuration requires changing the .desktop file or running gnvim as a command.

It would be ideal to keep as much configuration as possible as vim global variables or respecting vim options, but if not feasible (e.g. for externalized features) use a xdg config file.

Synchronous commands after ui_attach

I've run into a couple of related issues. The problem seems to be that if synchronous commands are used after ui_attach, there's a possibility they will deadlock if nvim needs to get input from the user before proceeding (I know very little about the RPC interface). The cases I've run into are if there's an error in .vimrc, or if one of the files being edited has a swap file. The synchronous commands are:

  • nvim.command for opening the files as tabs. Can these be appended to the nvim command line instead, with the usual -p option for tabs?
  • nvim.ui_try_resize

Commenting out the code for these allows gnvim to proceed.

Failed to attach UI: NeovimError(1, "No such UI option: ext_linegrid")

Hello,

I have issues with awesome wm, and gnvim.
My awesome version (ubuntu 18.04) is v4.2

Here is my backtrace:

sh$ RUST_BACKTRACE=1 ./target/debug/gnvim --print-nvim-cmd
nvim cmd: "nvim" "--embed" "--cmd" "let g:gnvim=1" "--cmd" "set termguicolors" "--cmd" "let &rtp.=\',/usr/local/share/gnvim/runtime\'"
thread 'main' panicked at 'Failed to attach UI: NeovimError(1, "No such UI option: ext_linegrid")', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libcore/macros.rs:16
   9: <core::result::Result<T, E>>::expect
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libcore/result.rs:825
  10: gnvim::build
             at src/main.rs:119
  11: gnvim::main::{{closure}}
             at src/main.rs:139
  12: core::ops::function::impls::<impl core::ops::function::Fn<A> for &F>::call
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libcore/ops/function.rs:240
  13: gio::auto::application::activate_trampoline
             at /home/olivier/.cargo/registry/src/github.com-1ecc6299db9ec823/gio-0.5.1/src/auto/application.rs:526
  14: g_closure_invoke
  15: <unknown>
  16: g_signal_emit_valist
  17: g_signal_emit
  18: <unknown>
  19: g_application_run
  20: <O as gio::application::ApplicationExtManual>::run
             at /home/olivier/.cargo/registry/src/github.com-1ecc6299db9ec823/gio-0.5.1/src/application.rs:23
  21: gnvim::main
             at src/main.rs:142
  22: std::rt::lang_start::{{closure}}
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  23: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  24: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  25: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  26: std::rt::lang_start
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  27: main
  28: __libc_start_main
  29: _start

Do you have any idea about this error?

Regards,

packaging gnvim

I've been trying to package gnvim master but I hit

  Compiling onig_sys v69.1.0
   Compiling walkdir v2.2.7
   Compiling yaml-rust v0.4.2
error: failed to run custom build command for `gnvim v0.1.0 (/build/gnvim-fd50f79)`
process didn't exit successfully: `/build/gnvim-fd50f79/target/release/build/gnvim-2222836c9fe8348d/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Failed to get version from git', build.rs:18:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:70
             at src/libstd/sys_common/backtrace.rs:58
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::begin_panic
   6: build_script_build::main
   7: std::rt::lang_start::{{closure}}
   8: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
   9: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  10: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  11: main
  12: __libc_start_main
  13: _start
             at ../sysdeps/x86_64/start.S:120

warning: build failed, waiting for other jobs to finish...
error: build failed
note: keeping build directory '/tmp/nix-build-gnvim-0.1.1.drv-3'
builder for '/nix/store/dg5xylxnqp8x0ldiavhxp7czl5dp55hh-gnvim-0.1.1.drv' failed with exit code 101

My package used to work but I think the error is similar to the one in nvie/gitflow#126 , aka git describe fails because I am packaging master's HEAD and not a tag revision. Would it be possible to add the --always flag to the git describe call in build.rs ?
It would make packaging easier.

Cursor Appears at Bottom of Screen When Moving Around File With Keyboard

When moving in a file with the keyboard (j, k, l, h), the cursor first appears at the bottom right of the screen and then moves to where it should be in the file (This is a picture of it while the cursor is at the bottom right of the screen. After this, it appeared back at the correct position):

image

It does this erratically, and I have only noticed it while holding down the keys to move (most notably when moving up or down in a file).

The following diff stops this behavior, but I imagine this is not an ideal solution and only masks the real problem (something with neovim_lib, maybe?):

diff --git a/src/ui/grid/grid.rs b/src/ui/grid/grid.rs
index b2e61b4..0af02df 100644
--- a/src/ui/grid/grid.rs
+++ b/src/ui/grid/grid.rs
@@ -57,7 +57,7 @@ pub struct Grid {
     /// EventBox to get mouse events for this grid.
     eb: EventBox,
     /// Internal context that is manipulated and used when handling events.
-    context: Arc<ThreadGuard<Option<Context>>>,
+    pub context: Arc<ThreadGuard<Option<Context>>>,
     /// Pointer position for dragging if we should call callback from
     /// `connect_motion_events_for_drag`.
     drag_position: Arc<ThreadGuard<(u64, u64)>>,
@@ -326,6 +326,11 @@ impl Grid {
         let mut ctx = self.context.borrow_mut();
         let ctx = ctx.as_mut().unwrap();
 
+        // Prevents cursor from appearing at bottom of screen
+        if row == ctx.rows.len() as u64 - 1 {
+            return;
+        }
+
         // Clear old cursor position.
         let (x, y, w, h) = ctx.get_cursor_rect();
         ctx.queue_draw_area

WM_CLASS property not set

Not sure if we want to address this, but I ran into it when trying to configure GNvim to open automatically on a specific workspace in i3(-gaps). The WM_CLASS property is not set for GNvim, and so WM_CLASS defaults to ".".

If you want to see this for yourself, open up GNvim and a terminal, run $ xprop | grep "WM_CLASS" (or $ xprop) and click on the GNvim window. The output in the terminal will be something like this/include this:

WM_CLASS(STRING) = ".", "."

I don't know how this impacts usage by other users, but for i3 it hinders the ability to assign GNvim to a workspace, since it is done via this class property; in i3, all applications, regardless of their class, will satisfy the class property ".", so one can't specifically assign GNvim to a workspace (all applications will be assigned to said workspace that aren't already assigned elsewhere).

The following commit fixes this problem by setting GNvim's WM_CLASS property to GNvim in main.rs:

diff --git a/src/main.rs b/src/main.rs
index ef0cc46..5a44035 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -146,6 +146,7 @@ fn main() {
         gtk::Application::new("com.github.vhakulinen.gnvim", flags).unwrap();
 
     glib::set_application_name("GNvim");
+    gdk::set_program_class("GNvim");
     gtk::Window::set_default_icon_name("gnvim");
 
     app.connect_activate(move |app| {

It may also be possible to set this property via the gnvim.desktop file, but I have not tested enough to confirm this is true (see this article). It may be worth noting that some applications allow this to be set/changed via a --class CLI flag (Termite used here as an example, this works with Firefox too): $ termite --class <class name>.

See also:
https://developer.gnome.org/gdk3/stable/gdk3-General.html#gdk-set-program-class
https://gtk-rs.org/docs/gdk/fn.set_program_class.html

Feature request: scrollbars

Scrollbars are a pretty crucial feature for editing larger files, and one I sorely miss from gvim. It would be perfect if it could also obey settings from guioptions.

If pointed in the right direction, I'm more than willing to hack on this myself.

GUI colors not always set automatically

I have a light GTK theme but a dark vim theme. Is it possible to set the background of the command bar around the text so that it matches the vim colour scheme?

2019-05-03-17:43:42 748535973

Feature Request: option to show buffers in tabline

Currently in GNvim the tabline only shows tabs (which is of course to be expected considering the name). However, I think it would be nice to have the option to show the current buffers in the tabline too. I imagine doing it like vim-airline does would be ideal (where the buffers are shown by themselves if there is only one tab open, and tabs are shown on the tabline if more than one tab is open). See here: https://github.com/vim-airline/vim-airline#smarter-tab-line

This feature/option would fit my workflow (and maybe others’ too) which is buffer-oriented, but if added I think it should be disabled by default (as it is in vim-airline).

This would probably require a decent-sized refactor of the Tabline struct, but I’m not certain on how we would want to go about doing this. Any ideas? I’m fully willing to work on a PR for this feature (assuming it’s wanted) if pointed in the direction we want to go.

YCM Autocomplete Preview Blacked Out

In gnvim, YouCompleteMe's auto complete preview is blacked out, as the below screenshot shows.

Screenshot_20190427_181743

However, it is clearly readable in nvim from the terminal, as seen below.

Screenshot_20190427_182324

Could my neovim configuration (init.vim or .vimrc) be causing this, or is it something else? I can show my config files if needed.

vim-multiple-cursor panic after pressing ctrl-n twice

thread 'main' panicked at 'byte index 5 is out of bounds of ``', src/libcore/str/mod.rs:2010:9 note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace. fish: “gnvim” terminated by signal SIGILL (Illegal instruction)

multi-cursor plugin panics when pressing Ctrl-n twice with the above error.

Add Project Board(s)

Setting goals with a project board (or boards) for GNvim's next release(s) would help contributors to know where to focus their efforts and tell them what GNvim wants to become. That way, they would know what features should (and shouldn't) be added, what bugs need to be handled/fixed (before the next release), refactors that should be done, etc. (and it would likely help with efficiency).

Could you please provide some raison d'être vis-a-vis neovim-gtk?

It seems to me that this project targets exactly the same audience as neovim-gtk: both are in Rust built on the top of Gtk. Given neovim-gtk is older, I guess, there must be some compelling reason why you started a new project. What are the (planned) advantages over the other project? Why should I (as a possible new user) care about your project?

Add `--server` option to connect to specific nvim session?

nvim-qt has an option to attach to existing nvim sessions: https://github.com/equalsraf/neovim-qt/wiki/Remote-attachment

This enables us to use nvim-qt to attach to nvim running on remote servers via ssh, which is really useful. In this way, we are no longer being restricted to work on text-based terminals when connecting to remote servers.

I've inspected several other GUI alternatives for neovim, but it seems that nvim-qt is the only one that supports this currently. However, I don't quite like the current UI interfarce of nvim-qt.

I am wondering if gnvim would supports this? This would be really helpful since I am required to work on remote machines most of the time.

Thanks!

Invalid popupmenu position

One more issue stopping me from using gnvim.

popupmenu is not in the right place
Screenshot from 2019-07-11 17-39-34

At first I was using neovim 0.3.8, and Readme says gnvim requires latest master, so i installed latest neovim-git. No luck, popupmenu is still few lines lower than expected.

Even with empty vimrc.

BTW, gnvim -- u NONE is not showing popupmenu at all. With gnvim -- -u /dev/null menu is displayed, but not in the right place)

> yay -Q gnvim-git neovim-git gtk3 rust
gnvim-git r219.9ea48e9-1
neovim-git 0.3.4.r1258.g6eab3b925-1
gtk3 1:3.24.10-1
rust 1:1.35.0-1

Preview menu showing up on the top left corner

On neovim the preview menu is displayed at the right side of the completion menu, on my gnvim instance 0.1.2-6-g89e469e it is always positioned at the top left corner of the gnvim container.

Screenshot from 2019-04-11 12-57-49

Neovim version

NVIM v0.4.0-571-g21b108fe4
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-5a195e49-0097-4446-bde0-2ef4a665e7e5

Features: +acl +iconv +tui

Show current directory as part of title

Having the title always be a static Neovim makes it dificult to know where you are when alt-tabbing between multiple gnvim windows. It would be nice If the title could be something like Neovim - your/current/dir.

I've never used rust so I was a bit hesitant about opening a PR, but I did this locally and got what I was looking for:

diff --git a/src/ui/ui.rs b/src/ui/ui.rs
index 6285d46..6ad3b57 100644
--- a/src/ui/ui.rs
+++ b/src/ui/ui.rs
@@ -1,4 +1,5 @@
 use std::collections::HashMap;
+use std::env;
 use std::sync::mpsc::{Receiver, RecvTimeoutError};
 use std::sync::{Arc, Mutex};
 use std::thread;
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? n
@@ -103,7 +104,8 @@ impl UI {
     ) -> Self {
         // Create the main window.
         let window = gtk::ApplicationWindow::new(app);
-        window.set_title("Neovim");
+        let path = env::current_dir().unwrap();
+        window.set_title(format!("Neovim - {}",  path.display()).as_str());
         window.set_default_size(1280, 720);
 

Is there any guidance on where this would need to be in order to update the directory portion of the title anytime the user changes working directory?

1. Cannot display chinese/japanese characters (haven't tried other unicodes) probably. 2. How to paste ? 3. unknown input key for "Shift" etc. 4. unknown redraw event for popmenu etc.

  1. having trouble displaying unicode

screenshot-2019-04-20@20 16 49

As shown above, the left is Gnvim, right is nvim in terminal. Notice that the cursor in both pictures should be on same character but Gnvim seems to have cursor on 12 characters before.

Notice if I put cursor to the end of line, Gnvim's cursor is on whitespace.
screenshot-2019-04-20@20 19 21

And characters from a page (e.g. startify) before was not be cleared
screenshot-2019-04-20@20 48 56

  1. how to paste from clipboard?
    I tried Ctrl+v, Ctrl+Shift+v, but only showing '^'.

  2. whenever I press keystroke other than "0-9a-z", e.g., Shift, Alt, Win, F1,
    Shift and Alt key seems working, but F1-F8 doen't work (help page not showing),
    stdout shows
    screenshot-2019-04-20@20 30 51

  3. whenever I call command or it calls deoplete (whenever a window needs to be drawn)
    command
    screenshot-2019-04-20@20 35 19

deoplete
screenshot-2019-04-20@20 36 19

things seems to work but stdout shows
screenshot-2019-04-20@20 38 52

  1. snippet not showing where it is from, only showing when I Ctrl+n to it
    screenshot-2019-04-20@20 53 09

After Ctrl+n
screenshot-2019-04-20@21 01 06

I am using neosnippet, and it will show [ns] indicating it can be spanned. But in Gnvim, I can trigger the snippet but it is not showing me whether it can be spanned.

  1. does it support previewing feature for LanguageClient-neovim other than vim-lsp

Currently it's like this
screenshot-2019-04-20@21 03 30

Building instructions for macOS?

I'd love to try this out.

Is webkit2gtk-sys available somehow on macOS? It can't be installed via Homebrew and the link on "building on other systems" does not cover macOS either.

error: failed to run custom build command for `webkit2gtk-sys v0.7.0` 
--- stderr
`"pkg-config" "--libs" "--cflags" "webkit2gtk-4.0 >= 2.14"` did not exit successfully: exit code: 1
--- stderr
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit2gtk-4.0' found

warning: build failed, waiting for other jobs to finish...
error: build failed                                                                                                                                                             
GNVIM_RUNTIME_PATH=./runtime cargo run 

All popup menu icons are question mark icons

From the screenshots of GNvim in the wiki I assume that there should be icons of boxes, < >, etc. in the popup menu for auto completions. However, as the title states, mine only shows circled question marks:

image

Am I missing a package/font for my system? The GNvim runtime is loaded, and I have not installed GNvim; I am running it w/out installing using the GNVIM_RUNTIME_PATH=/path/to/gnvim/runtime cargo run command, as an FYI (although IIRC it did the same thing when it was installed on my previous Linux install).

Keymap switching doesn't work

The i_ctrl-^ does't switch keymaps.

:set keymap=ukrainian-jcuken
i<start typing anything>
ctrl-^ to switch back to English

Actual: 6 is printed
Expected: default keymap is activated

guifont: floating-point is not supported?

Hello.

Looks like floating-point numbers is not supported if font definition?

I trying to set guifont=Monospace:h11.25, but with no effect.
Or maybe there is another way?

[Bug] Netrw crashes gnvim

When I open gnvim from the terminal and go to Netrw by executing :Explore (or by any other method), it acts as expected and takes me to Netrw.

However, when I open gnvim outside of the terminal (namely executing it from Budgie's menu), whenever I attempt to open Netrw, gnvim immediately crashes with no error message or warning.

Edit: Fixed typo

Indentation issue in Terminal

How to reproduce

  • Open a :terminal
  • Run ls -al

What is expected

Output is correctly indented

What happens

Screenshot from 2019-04-30 15-47-13

It works correctly on gonvim, so I don't think it's an externalized issue.

'GenericError("Wait timeout (nvim_subscribe)")' error

Hey guys,

Thanks for the awesome project! I've tried to build it from source on Elementary OS 5.0 (based on Ubuntu 18.04) but I got error below (with RUST_BACKTRACE=1 option):

thread 'main' panicked at 'Failed to subscribe to 'Gnvim' events: GenericError("Wait timeout (nvim_subscribe)")', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: gnvim::build
  10: gio::auto::application::activate_trampoline
  11: g_closure_invoke
  12: <unknown>
  13: g_signal_emit_valist
  14: g_signal_emit
  15: <unknown>
  16: g_application_run
  17: <O as gio::application::ApplicationExtManual>::run
  18: gnvim::main
  19: std::rt::lang_start::{{closure}}
  20: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  21: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  22: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  23: main
  24: __libc_start_main
  25: _start

I have latest stable Rust compiler available (1.34) How can we fix it?

gvimrc not loaded

I use gnvim on Arch Linux, but my gvimrc file seems not be loaded after gnvim starts.

vimrc location: ~/.config/nvim/init.vim
gvimrc location: ~/.config/nvim/ginit.vim

BTW, the vimrc works fine

Package glib-2.0 was not found

My setup:

  • Ubuntu 18.04
  • Rustc 1.32.0

I get the following error when running make:

channi16@ICT0115123:~/v/gnvim$ make
cargo build --release
   Compiling onig_sys v69.1.0
   Compiling miniz-sys v0.1.12
   Compiling glib-sys v0.9.0
   Compiling byteorder v1.3.2
   Compiling log v0.4.7
   Compiling crc32fast v1.2.0
   Compiling idna v0.1.5
   Compiling rand_chacha v0.1.1
error: failed to run custom build command for `glib-sys v0.9.0`
process didn't exit successfully: `/var/www/vhosts/gnvim/target/release/build/glib-sys-a5c428d969f48a9a/build-script-build` (exit code: 1)
--- stderr
`"pkg-config" "--libs" "--cflags" "glib-2.0 >= 2.42"` did not exit successfully: exit code: 1
--- stderr
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found


warning: build failed, waiting for other jobs to finish...
error: build failed
Makefile:6: recipe for target 'build' failed
make: *** [build] Error 101

One of the requirements for GTk-rs for Fedora is that glib2 is must be installed, so it looks like I don't have glib2 installed either even though I'm on Ubuntu.

Scrollbar is not updated on wildmenu

When opening the menu, the scrollbar is not updated when reaching items outside the initial range.

How to reproduce:

  • Start gnvim
  • Type :<Tab>, the menu should open
  • Type <Tab> until the end of the list is reached or drag the scrollbar on the right
  • Notice the list is scrolled but scrollbar is pinned to the top

This happens on both external commandline and wildmenu. This does not occur on popupmenu.

If you have any pointers I'd be happy to try and fix this.

How can I make the cursor NOT blink?

OS: MX Linux 18.

NVIM v0.4.0-429-gf282324e1Build type: RelWithDebInfo

checkhealth

health#deoplete#check
========================================================================
## deoplete.nvim
  - OK: exists("v:t_list") was successful
  - OK: has("timers") was successful
  - OK: has("python3") was successful
  - OK: Python3.6.1+ was successful
  - INFO: If you're still having problems, try the following commands:
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
    $ nvim
    $ cat /tmp/log_{PID}
    and then create an issue on github

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo
    LuaJIT

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $VTE_VERSION='4601'
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0ms
  - INFO: $TERM: tmux-256color

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - INFO: pyenv: Path: /home/dave/.pyenv/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /home/dave/.pyenv
  - INFO: Using: g:python_host_prog = "/usr/bin/python2.7"
  - INFO: Executable: /usr/bin/python2.7
  - INFO: Python version: 2.7.13
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: pyenv: Path: /home/dave/.pyenv/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /home/dave/.pyenv
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /home/dave/.pyenv/versions/3.7.2/bin/python3
  - INFO: Python version: 3.7.2
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.

## Node.js provider (optional)
  - WARNING: `node` and `npm` (or `yarn`) must be in $PATH.
    - ADVICE:
      - Install Node.js and verify that `node` and `npm` (or `yarn`) commands work.

Font configuration

I see that gonvim renders the font in a different manner, the font seems to have more weight.

It improves with readability so I wonder how can an option for this be implemented in gnvim?

See below, guifont=Fira\ Code:h13, gnvim on the left, gonvim on the right:

Screenshot from 2019-04-24 14-11-31

Can you tag a new release?

I'd like to build a non-git AUR package and it would be excellent if you could tag the current master with some version.

Panic when opening Netrw

How to reproduce

  • mv .config/nvim/init.vim .config/nvim/init.vim_ (optional, bring the config back afterward)
  • Open gnvim with the terminal
  • Type :e .

What happens

The program panics leaving the output:

thread 'main' panicked at 'byte index 2 is out of bounds of ``', src/libcore/str/mod.rs:2085:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

What is expected

Vim's netrw is opened.

scrolloff setting cases line rendering problems

Hi there,

I'm getting rendering issues that I'm not sure how to exactly describe what I saw in words.

How to reproduce

  1. gnvim -- -u NONE
  2. Open up document longer than your screen height.
  3. :set scrolloff=999
  4. Scroll to a location your cursor is in the middle of the screen area.
  5. Hit o and hit Enter a few times.

Other notes

  1. This does not happen if one has set number. I reckon that the reason is cause the lines are redrawn to render the line numbers and so it shadows the problem.

gnvim version -- 0.1.3

crash when used with gnvim-lsp

I've packaged gnvim for nixos (at least on my computer):

When I add
Plug 'vhakulinen/gnvim-lsp' " load it only for gnvim
and start gnvim 0.1.1 I get

Not supported option set: arabicshape
Not supported option set: ambiwidth
Not supported option set: emoji
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: GenericError("Wait timeout (nvim_ui_try_resize)")', src/libcore/result.rs:1009:5

with a neovim with floating windows

      src = builtins.fetchGit {
        url = https://github.com/neovim/neovim.git;
        ref = "+refs/pull/6619/head";
      };

akin to

:version
NVIM v0.4.0-dev                                                                                                              
Build type: Release
LuaJIT 2.1.0-beta3
Compilation:
Compilé par nixbld

Features: +acl +iconv +tui
See ":help feature-compile"

         fichier vimrc système : "$VIM/sysinit.vim"
               $VIM par défaut : "/nix/store/w177ksf3nz8gvw7bijbrc6bgzwmbi643-neovim/share/nvim"

Is my nvim too new or shoudl it be handled already ?
Might be related: #10

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.