daa84 / neovim-gtk Goto Github PK
View Code? Open in Web Editor NEWgtk ui for neovim
License: GNU General Public License v3.0
gtk ui for neovim
License: GNU General Public License v3.0
Pressing the Home
or End
keys does not change the cursor position as expected in the editor or on the ex command line.
Hi,
I tried out the ext_cmdline branch to see what the upcoming command line would look like, so please disregard this issue if you think it's not relevant.
The current implementation shows the command line as a popup, positioned next to the cursor, and that's confused me a bit since the commands do not tend to be relevant to the character under the cursor (they are usually related to the document or the vim instance itself).
Would it be possible to instead implement the popup in the upper-center part of the window itself. That's how it usually is in other editors and IDEs (vscode, sublime text and intellij come to mind, with what constitutes as an equivalent of a command prompt), with the equivalent of a wildmenu appearing below the popup prompt as a list.
I'm using Neovim Qt as my primary editor, but I'd like to try neovim-gtk as well, but the configuration file is not compatible (I have to move the config file every time I want to try gtk and then move it back). What about using the same configuration syntax, so it can be used side-by-side?
https://github.com/equalsraf/neovim-qt/blob/master/src/gui/runtime/plugin/nvim_gui_shim.vim
As in https://github.com/equalsraf/neovim-qt it would be cool to have this feature when you're able to start headless neovim-daemon and just connect to specific socket with GUI in any time, connect again you just closed GUI window and other useful stuff.
I can't type any capital Cyrillic letter, only lowercase letters can be typed. But interesting detail is that it happens only when I press Shift key, if I turn Caps Lock mode on I can do it as expected.
Stack versions:
OS: Manjaro i3 17.1.1
GTK: 3.22.26+47+g3a1a7135a2-3
Neovim: v0.2.3-385-gb616ef9b2
Neovim-GTK: master
Minimal setup:
init.vim
set showtabline=2
ginit.vim:
if exists('g:GtkGuiLoaded')
call rpcnotify(1, 'Gui', 'Font', 'Hack Nerd Font Mono 12')
call rpcnotify(1, 'Gui', 'Option', 'Tabline', 0)
call rpcnotify(1, 'Gui', 'Option', 'Popupmenu', 0)
let g:GuiInternalClipboard = 1
endif
Open nvim-gtk (does not show tabline):
Type Ex command :help
(the command line gets over-rendered by the statusline and the tabline is rendered):
See I am writing :help
again (notice the statusline):
I open the command-line window q:
:
If I resize the neovim-gtk window also fix the rendering, like changing the font size:
My interest is mainly for Windows which I assume should be easy to add.
RESULT
Plugins manager briefly appears then the both the plugin manager and the main window close.
EXPECTED
Plugins manager to open normally
thread 'main' panicked at 'already borrowed: BorrowMutError', src/libcore/result.rs:906:4
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::begin_panic
6: std::panicking::begin_panic_fmt
7: rust_begin_unwind
8: core::panicking::panic_fmt
9: core::result::unwrap_failed
10: <nvim_gtk::ui::UiMutex>::borrow_mut
11: nvim_gtk::ui::Ui::init::{{closure}}
12: gtk::auto::widget::window_state_event_trampoline
13:
14: g_closure_invoke
15:
16: g_signal_emit_valist
17: g_signal_emit
18:
19: gtk_main_do_event
20:
21:
22: g_main_context_dispatch
23:
24: g_main_loop_run
25: gtk_dialog_run
26: nvim_gtk::plug_manager::ui::Ui::show
27: nvim_gtk::ui::Ui::create_main_menu::{{closure}}
28: gio::auto::simple_action::activate_trampoline
29: g_closure_invoke
30:
31: g_signal_emit_valist
32: g_signal_emit
33:
34:
35:
36:
37:
38: g_main_context_dispatch
39:
40: g_main_context_iteration
41: g_application_run
42: nvim_gtk::main
43: __rust_maybe_catch_panic
44: std::rt::lang_start
45: __libc_start_main
46: _start
Uncaught panic, exiting
Aborted (core dumped)
Many years ago when I used MacVim, one of the benefits over console vim was that it automatically refreshed files when it regained focus. This can be great if you switch git branches or something then switch back. Instead of needing to remember to :checkt
it does it for you.
It freezes and after about 10-20 seconds it fails.
Here is the log:
$ nvim-gtk
Unknown error type: Wait timeout
Unknown error type: Wait timeout
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /checkout/src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread '<unnamed>' panicked at 'Can't join dispatch thread: Any', /checkout/src/libcore/result.rs:906:4
Unknown error type: Wait timeout
Unknown error type: Wait timeout
nUnknown error type: Wait timeout
Unknown error type: Wait timeout
thread 'main' panicked at 'Error run input command to nvim: GenericError("Wait timeout")', /checkout/src/libcore/result.rs:906:4
Neovim :version
:
NVIM v0.2.2
Build type: Debug
LuaJIT 2.0.5
Compilation: /usr/bin/cc -Wconversion -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/build/config -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/src -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/.deps/usr/include -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/.deps/usr/include -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/.deps/usr/include -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/.deps/usr/include -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/.deps/usr/include -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/.deps/usr/include -I/usr/include -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/build/src/nvim/auto -I/home/unclechu/.compile_n_build/neovim/neovim-v0.2.2-from-git/build/include
Compiled by unclechu@fedorafarm25
Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/home/unclechu/neovim-v0.2.2-from-git/share/nvim"
Run :checkhealth for more info
My neovim config: https://github.com/unclechu/neovimrc/
Hi,
I'm trying to run neovim-gtk on my computer (Linux 4.14, Debian, X11, integrated GPU) and it flickers a lot. I tried running neovim-gtk with an empty init.vim and also making the window smaller, nothing changed.
The only way to make the flickering stop on my computer is to focus another window.
I don't really know how to troubleshoot this issue, if you need more information, feel free to ask.
Pretty cool project by the way ! :)
After few hours of working I realized that neovim-gtk ate about 1GiB of RAM, when on start it's less than 16MiB, it's probably memory leak.
As per title, I am not able to enter the lesser then character ('<') when in insert mode, it simply does nothing. I can enter the greater then character ('>') though
I'm using rust stable. I can't reproduce this reliably, but for some reason, it crashes on startup, both with and without a file argument.
Name | Details |
---|---|
Neovim version | Development version, from commit neovim/neovim@43d3276 |
rustup --version |
1.6.0 (a11c01e8c 2017-08-30) |
cargo --version |
0.21.0 (5b4b82ae 2017-08-12) |
rustc --version |
1.20.0 (fd3d6973f4 2017-08-27) |
Operating system | Arch Linux |
Here's the backtrace. I installed it from the AUR, so that might explain why it's not showing other source code (it's not running from the same path it was built in):
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', src/ui_model/mod.rs:76:25
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: g_main_context_dispatch
14: <unknown>
15: g_main_context_iteration
16: g_application_run
17: <unknown>
18: <unknown>
19: <unknown>
20: __libc_start_main
21: <unknown>
EDIT: add neovim version
To keep in line with gnome 3's minimal design, it seems neovim-gtk would fit in better if tabs were in the header/titlebar area instead of the quick buttons that are there by default.
I successfully followed these instructions to configure the font and disable the external tabline. I was unable to add these declarations in $HOME/.config/nvim/ginit.vim so as they are automatically fired when neovim-gtk is open, though. Could you give me some pointers?
When launching neovim-gtk from terminal in tiling mode, it will consider the size of the previous instance, instead of the size of this instance's window. As a result of this, the airline-tabline on the top won't be shown unless I exit neovim-gtk and relaunch it to be on the exact same size as before.
Furthermore, if I last opened it in a small tile, when I open it again in full screen mode, it will be shown as in the picture.
I don't know if this error is related: ERROR:<unknown>: Error while reading: I/O error while reading marker byte: failed to fill whole buffer
. It's shown every time I close with :q
.
I'm using tiling window managers such as XMonad and i3, I often use folding for windows in i3 (you could look at attached screenshot to see how it looks like), when I have more than one windows of Neovim-gtk it's not obvious which one I actually need until I go and open it because window title is the same for all windows. It would be cool if I for instance call some rpc method to set my own window title suffix or/and prefix.
If you invoke a long terminal command, like those triggered by the fzf vim plugin the active tab's title becomes so wide that the window ends up becoming wider to fit it in.
It would be great to be able to add header bar buttons from e.g. the nvim config file. I believe this would probably require a nvim plugin for the communication with the UI.
With this, you could change the displayed buttons depending on the file type and potentially the mode the user is in.
I am not really sure if this problem is in neovim-gtk or somewhere else (it does not happen in neovim alone)
if I launch neovim-gtk from two different folders (one after the other), the neovim-gtk launched last will have the working directory of the first instance, so things like Ctrl-P will lookup files from the wrong folder.
Steps to reproduce:
I noticed that neovim-gtk crashes sometimes when I resize the window. Not happens everytime, and looks that since I disable the native tabline, happens a lot less.
thread 'main' panicked at 'slice index starts at 21 but ends at 15', /checkout/src/libcore/slice/mod.rs:752:4 note: Run with
RUST_BACKTRACE=1for a backtrace. Uncaught panic, exiting fish: 'nvim-gtk' terminated by signal SIGABRT (Abort)
Thanks for writing neovim-gtk! I was really pleased to see that it both supports ligatures and accepts Pragmata Pro as a font, which is not declared as monospaced and thus rejected by other programs (like neovim-qt).
I noticed the compose key does not work, do you think this could be fixed? For the record, a compose key is a dead key used to type characters not present on the keyboard. For instance compose + e + ' will insert an accentuated 'e' ('é'), more on this here. I have no issues with other GTK applications.
The title bar is ginormous.
A setting to hide it completely would be much appreciated.
Is there any method to get current font configuration?
Like kinda let result = rpcrequest(1, 'Gui', 'Font')
?
My monospace font is pretty big and it results in the text wrapping oddly everytime I open neovim. Is there a way for neovim to remember what size I set it last and open to that?
Just as I said in the title, works with the built-in(text-based) menu, but not with the nice GUI one. It is rendered in an invisible location, see the screenshot for a better understanding. The problem is in the interaction with YouCompleteMe (I tried removing all other options and plugins and it still didn't work). Without YCM the built-in menu(with ) works well enough, but with YCM also doesn't work.
The menu is actually bigger than it should be, so it gets outside the window and the screen. I tried moving the window to the side, but the menu is much bigger, so I haven't been able to see its beginning. My guess without looking at the code is that the pop-up menu doesn't "prune" autocomplete items' length, but the reason might be somewhere else.
Currently the WM_CLASS property is set to ".", "."
please set the WM_CLASS property to match WM_NAME.
$ xprop
...
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 70 by 48
program specified base size: 0 by 0
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = ".", "."
WM_ICON_NAME(STRING) = "NeovimGtk"
_NET_WM_ICON_NAME(UTF8_STRING) = "NeovimGtk"
WM_NAME(STRING) = "NeovimGtk"
_NET_WM_NAME(UTF8_STRING) = "NeovimGtk"
I wasn't able to start neovim-gtk today, because I was using old version of neovim. It wasn't obvious when debugging this issue, because the error message is rather generic:
thread 'main' panicked at 'Can't start nvim instance: Error { repr: Custom(Custom { kind: Other, error: NeovimError(1, "No such ui option") }) }', /checkout/src/libcore/result.rs:859
What about checking neovim version before starting it? Or at least mention required version in documentation to avoid runtime delay. This issue would also be resolved by packaging e.g. in RPM, but I guess it's too early for that :)
I personally have accent digraph to write accents. But when I do it in neovim-gtk it cuts one symbol off.
An example: foobár
Similar to equalsraf/neovim-qt#259
But there's no problem with Space, only Backspace types 27;2u
It would be nice to be able to paste the PRIMARY clipboard by pressing the middle mouse button or Shift-Insert.
It would be really neat if there could be releases via Flatpak, which should now be easier via Flathub
Denite works fine in neovim-qt and gnome-terminal, here's the terminal output:
Event set_icon([String(Utf8String { s: Ok("") })]) Event set_title([String(Utf8String { s: Ok("nvimrc (~/dotfiles) - NVIM") })]) ERROR 2018-02-20T07:02:19Z: nvim_gtk::nvim::ext: Unknown error type: Wait timeout (nvim_get_hl_by_name) ERROR 2018-02-20T07:02:29Z: nvim_gtk::nvim::ext: Unknown error type: Wait timeout (nvim_get_hl_by_name) ERROR 2018-02-20T07:02:39Z: nvim_gtk::nvim::ext: Unknown error type: Wait timeout (nvim_get_hl_by_name) ERROR 2018-02-20T07:02:49Z: nvim_gtk::nvim::ext: Unknown error type: Wait timeout (nvim_get_hl_by_name) ERROR 2018-02-20T07:02:59Z: nvim_gtk::nvim::ext: Unknown error type: Wait timeout (nvim_get_hl_by_name) ERROR 2018-02-20T07:03:09Z: nvim_gtk::nvim::ext: Unknown error type: Wait timeout (nvim_get_hl_by_name) Event set_icon([String(Utf8String { s: Ok("") })]) Event set_title([String(Utf8String { s: Ok("[denite] (~/dotfiles) - NVIM") })]) Event set_icon([String(Utf8String { s: Ok("") })]) Event set_title([String(Utf8String { s: Ok("nvimrc (~/dotfiles) - NVIM") })]) thread '<unnamed>' panicked at 'called
Result::unwrap()on an
Errvalue: "SendError(..)"', src/libcore/result.rs:906:4 note: Run with
RUST_BACKTRACE=1for a backtrace. thread '<unnamed>' panicked at 'Can't join dispatch thread: Any', src/libcore/result.rs:906:4 thread 'main' panicked at 'Error run input command to nvim: GenericError("Wait timeout (nvim_input)")', src/libcore/result.rs:906:4 Uncaught panic, exiting [1] 10255 abort (core dumped) nvim-gtk
When I run neovim-gtk and then issue e.g. ":colorscheme default", it panics.
$ cargo run --release
Finished release [optimized] target(s) in 0.0 secs
Running `target/release/nvim-gtk`
thread 'main' panicked at 'internal error: entered unreachable code: Resize event only can be produced by try_nvim_resize', src/shell.rs:839:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
In regular neovim, when the popup completion menu appears, the selected entry is hilited according to PmenuSel. I understand that this probably cannot be done with neovim-gtk, but currently there is no hilite or frame or whatsoever at all, which makes it impossible to navigate the completion list.
in the Makefile, the default installation path is /usr/local, this path need root permission, it will trigger error if not change to path with user permission because cargo can not run as root in default configuration. I believe ~/.local is better.
FYI I made a first pass at an AUR package for neovim-gtk: https://aur.archlinux.org/packages/neovim-gtk-git. This makes it easy to build and install on Arch Linux:
git clone https://aur.archlinux.org/neovim-gtk-git.git
cd neovim-gtk-git
makepkg -si
PS This thing is brilliant. The ligature support is fantastic and some of the best I've seen in any editor.
Typing a comment longer than 160 chars on a new line between lines 5 and 6 in this sample file triggers a panic every time:
1 describe 'TradingStrategy::DispatchDemandForecast', ->
2
3 describe '#desiredState', ->
4
5 it 'raises a not implemented error', ->
6 expect(=> @strategy.desiredState()).toThrowError('not implemented')
neovim-gtk/src/ui_model/line.rs
Line 172 in 05d6507
Nov 13 10:35:33 wes-thinkpad org.daa.NeovimGtk.desktop[15725]: thread 'main' panicked at 'index out of bounds: the len is 160 but the index is 160', src/ui_model/line.rs:172:9
It's possible that the Yggdroot/indentLine plugin is contributing to the problem. I have these settings:
let g:indentLine_enabled = 0
let g:indentLine_char = '│'
let g:indentLine_color_term = 239
let g:indentLine_color_gui = '#616161'
if has("autocmd")
" Set foldmethod to indentation for CoffeeScript files
autocmd BufNewFile,BufReadPost *.coffee setlocal foldmethod=indent
au FileType slim IndentLinesEnable
au FileType coffee IndentLinesEnable
endif
My init.vim
is located at /home/computer/.config/nvim
. Keymappings and theme don't get loaded when running with cargo run --release
. OS is Ubuntu 16.04.
Edit: Some keymappings actually work, but those with <F1>
, <F2>
etc. don't work.
When running ./neovim-gtk somefile
, it currently gives
(.:5982): GLib-GIO-CRITICAL **: This application can not open files.
and terminates.
Possible related to #58 (comment)
Looks that neovim-gtk window not have borders where I can click and drag to resize the window, except on the title bar.
I try with commit f9b20db , Kubuntu 17.10 + kubuntu backports + dark breeze gtk theme
I have customized tabline
by extension, and would prefer use this features instead of standard tabline provided by GUI, is it possible to switch back to text-based tabline
rendering?
Hi,
I am using a spanish layout and the keys are in the right place but accents don't appear.
Usually to set an accent in a letter "a" - "á", you have to press the accent key and the the letter.
It seems that that combination is not working.
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.