vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.85k stars 68 forks source link

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. #27

Closed alexlai97 closed 5 years ago

alexlai97 commented 5 years ago
  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

vhakulinen commented 5 years ago
  1. My guess is that this is something to do with double-width characters, but I might be wrong. I have a idea how to fix this; can you give me some piece of text that reproduces the problem you're describing?
  2. There isn't any clipboard support built in to gnvim. You'll have to use nvim registers, at least for now.
  3. "Failed to turn input...." isn't something you need to worry about. They are there for debugging purposes. I should probably turn those off.
  4. I don't understand what the problem here is. Unknown redraw event messages are printed to stdout when gnvim receives a redraw event it doesn't recognize (e.g. aren't implemented nor silenced).
  5. That information on the completion menu is (currently) only shown on the selected item (its the menu part of the completion item).
  6. The hover support for vim-lsp is implemented by https://github.com/vhakulinen/gnvim-lsp, but similar support for LanguageClient-neovim should be trivial to implement. See :h gnvim-cursor-tooltip and related functions.
badosu commented 5 years ago

There isn't any clipboard support built in to gnvim. You'll have to use nvim registers, at least for now.

Just for additional context, you can use (in normal mode) "+p to paste from the regular clipboard (ctrl+c) and *+p to past from the selection clipboard (text you have previously selected with the mouse)

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

I am not sure if by that you mean the gnvim-lsp plugin or the floating window preview that some plugins already implement. If you mean floating window support, it's handled by neovim separately for now, see https://github.com/vhakulinen/gnvim/issues/23. You also need the development version of neovim.

alexlai97 commented 5 years ago
  1. My guess is that this is something to do with double-width characters, but I might be wrong. I have a idea how to fix this; can you give me some piece of text that reproduces the problem you're describing?

The string was "可不可以显示长句子?中文、日本語を勉強しています。"

  1. "Failed to turn input...." isn't something you need to worry about. They are there for debugging purposes. I should probably turn those off.

But "F1" in terminal nvim will show help page, while in gnvim there is no response. I also have keybindings for F3, F8, neither shows response in gnvim.

  1. I don't understand what the problem here is. Unknown redraw event messages are printed to stdout when gnvim receives a redraw event it doesn't recognize (e.g. aren't implemented nor silenced).

When I press shift+semicolon, it will show the a window with ":" in it. At the same time, stdout prints unknown redraw event, which confuses me. But nothing breaks and things work as expected.

  1. That information on the completion menu is (currently) only shown on the selected item (its the menu part of the completion item).

Is it possible to toggle to show that information for not selected items ?

vhakulinen commented 5 years ago

@alexlai97 can you try if #36 fixes the issue with text rendering you are experiencing?

badosu commented 5 years ago

@alexlai97 You can remap C-C, C-V on vim:

vnoremap <C-C> "+y
map <C-V>       "+gP
cmap <C-V>      <C-R>+

See https://superuser.com/questions/61226/configure-vim-for-copy-and-paste-keyboard-shortcuts-from-system-buffer-in-ubuntu

alexlai97 commented 5 years ago

@alexlai97 can you try if #36 fixes the issue with text rendering you are experiencing?

After I git checkout support-doublewidth-chars; make; sudo make install; gnvim. It panics. Enabling rust_backtrace=1 gives me err.log

vhakulinen commented 5 years ago

Run with cargo run so the binary has debug symbols and the log gives more information. Also, preferably paste the output to the comment or link it to a gist.

vhakulinen commented 5 years ago

4983c99d0cbd74b800679f6248f68d28b02c7197 adds support for function keys. Regarding shift key, it by itself (afaik) doesn't do anything and thus' is not sent to neovim.

alexlai97 commented 5 years ago

4983c99 adds support for function keys. Regarding shift key, it by itself (afaik) doesn't do anything and thus' is not sent to neovim.

Function key works!

alexlai97 commented 5 years ago

Run with cargo run so the binary has debug symbols and the log gives more information. Also, preferably paste the output to the comment or link it to a gist.

Here's error output: https://transfer.sh/A8mlu/err.log

vhakulinen commented 5 years ago

Can you try now?

alexlai97 commented 5 years ago

Can you try now?

It seems to work fine! It can display chinese, japanese characters correctly.

badosu commented 5 years ago

Is there any item preventing this issue from being closed?

alexlai97 commented 5 years ago

Is there any item preventing this issue from being closed?

For 5. I would like to have an option for toggling to show unfocused info (where the completion is from, snippet ? language client protocol ? or just word from dictionary). Now it is only showing info for the focused entry.

For 6. I am not actively trying to find solution to use LanguageClient-neovim with preview option. I believe it is possible to use but it is not that urgent for me. It would be nice to have a plugin for LanguageClient-neovim similar to gnvim-lsp though.

badosu commented 5 years ago

For 6. I use coc.vim and use its preview window with gnvim with no problems (see 'doHover' mapping on the readme)

vhakulinen commented 5 years ago

Opened #41 for the 5th point. Closing this one as other issues mentioned here are solved. For the new 6th point, you can look at the gnvim-lsp's source and :h gnvim-cursor-tooltip on how to use the cursor tooltip to display other content.

NOBLES5E commented 3 years ago

It seems that the issue is still present on latest master branch:

image

The text is a 窝窝问我,窝窝沃尔沃,我问我欧文