Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    smolck
    @smolck
    I'm curious, what did you change?
    Oh but there is this slight issue with the statusline: Screenshot from 2020-05-14 17-24-37.png
    Ville Hakulinen
    @vhakulinen
    you mean the cmdline? try calling gnvim#set_gui_colors()
    Here are the changes that I did on top of the previous fixes: vhakulinen/gnvim@198d0db
    smolck
    @smolck
    My bad, I didn't pass the path to the runtime dir when I ran it with cargo . . . things work great, thanks!
    Ville Hakulinen
    @vhakulinen
    I merged the fix to master
    smolck
    @smolck
    Great! So glad to have that issue fixed. Now I can maybe get to work on #57.
    Oh btw would you mind reviewing #61 when you get the chance?
    It should be mostly small things that need fixing/tweaking now
    Ville Hakulinen
    @vhakulinen
    I want to fix some problems with unicode/grapheme cluster handling first (which means complete rewrite on the row.rs)
    then, probably need to fix the pending issues with the whole communication stuff (e.g. implement async read/write to nvim process)
    so the little time I have I want to work on those. But I'll keep #61 in my mind if I hit some roadblocks
    smolck
    @smolck
    Okay sounds good!
    Are you planning on porting GNvim to use KillTheMule's rust neovim client?
    I'd like to do that although it'd be a pretty big rewrite I think
    Ville Hakulinen
    @vhakulinen
    haven't checked that status of that in a while, but perhaps. I remember there were some issues with it and glib's async executor implementation
    smolck
    @smolck
    Yeah it might be a bit early still, the APIs unstable atm. See KillTheMule/nvim-rs#1
    But accord. to the README it's usable
    probably best to hold off for now, but in the future I think porting it to that lib is the way to go
    Ville Hakulinen
    @vhakulinen
    the whole async stuff probably is a huge undertaking, but it would allow better communication between gnvim and nvim. Now, for instance the code that checks if any buffers open in a tabpage has unchanged modifications can deadlock.
    smolck
    @smolck
    And if it was async that could be more easily fixed, right?
    Ville Hakulinen
    @vhakulinen
    yea, that wouldn't happen (at least not as easily)
    but I'm not completely sure how massive change that would be to gnvim
    smolck
    @smolck
    I would think it'd be pretty big, although I imagine that a lot of stuff could be simplified along the way
    partizan
    @last-partizan
    image.png

    Hi all :)

    How to change underline color of diagnostic messages reported by coc-nvim? in console nvim it matches text color, but in gnvim underline is red. But red is not applicable to each diagnostic message.

    image.png
    I want it to look like this.
    Ville Hakulinen
    @vhakulinen
    I think its dependent on your color scheme. I'm not sure which hl rule that is tho'
    check :h coc-highlight
    partizan
    @last-partizan
    @vhakulinen yeah, i'm not sure too. Underline is default color in neovim-gtk, neovim, goneovim and fvim. And red only in gnvim and neovide.
    gnvim does not define any special highlight groups?
    partizan
    @last-partizan
    folks at coc-nvim saying 'underline' it's just a style, like bold or italic, and coc can not customize it, but GUI can.
    Ville Hakulinen
    @vhakulinen
    right, see :h guisp
    there is a "special" color (both default, and per highlight rule afaik) that is used for the underline/undercurl color
    partizan
    @last-partizan
    This is what i needed! thanks
    partizan
    @last-partizan
    Hmmm, it works if i do it in editor :hi Default guisp=Gray, but it doesnt if i put in init.vim.
    Ville Hakulinen
    @vhakulinen
    are you setting it before or after your colorscheme is loaded?
    partizan
    @last-partizan
    After colorscheme.
    partizan
    @last-partizan

    I have found this code in gnvim, but even after i change default to 0, special color is the same value, 16711680, which is red.

    Where does it comes from?

    image.png
    Ville Hakulinen
    @vhakulinen
    unwrap_or(123) returns value 123if the value on which the unwrap_or is called is None. If you change it to 0 (like you said) and still get red, it means that neovim is reporting the default value as red too.
    But since :hi Default guisp=Gray in fact results in the default sp to be gray, it means that that line of code shouldn't be the problem. If doing that same thing from init.vim doesn't work, it likely means that something else somewhere is overwriting that change.
    people at neovim's gitter are probably better at solving such issue than I am. I would suggest you try if someone there could help with this
    partizan
    @last-partizan

    Yeah, i understand how unwrap_or works.

    I had a look at neovim-gtk code, and they have Option<Color> for special in some places, and gnvim does not. Maybe i'll try to find out source of this red color some time later.

    I'm writing here becouse gnvim is the only gui with default red underline (besides neovide, but i doesnt work well on my computer).

    Ville Hakulinen
    @vhakulinen
    perhaps gnvim and neovide are the only ones doing the sp color correctly? :smiley:
    partizan
    @last-partizan
    I would say the same, if i was a developer of gnvim :)
    Ville Hakulinen
    @vhakulinen
    there likely are differences on how different GUIs handle these situations, where data might or might not be there. In this case, I would guess that neovide (like gnvim) defaults missing sp color of a highlight to the "global" default sp, while other GUIs default to the highlight's fg color. Just a guess - should be relatively easy to check other GUI's code for that (which is what I actually do quite often :smiley: ).
    partizan
    @last-partizan

    I tried to dig this issue, and it can be fixed with this hack.

    diff --git a/src/ui/grid/render.rs b/src/ui/grid/render.rs
    index c991277..f626fc1 100644
    --- a/src/ui/grid/render.rs
    +++ b/src/ui/grid/render.rs
    @@ -89,7 +89,7 @@ fn render_text(
    
         // Since we can't (for some reason) use pango attributes to draw
         // underline and undercurl, we'll have to do that manually.
    -    let sp = hl.special.unwrap_or(hl_defs.default_sp);
    +    let sp = hl.special.unwrap_or(hl.foreground.unwrap_or(hl_defs.default_fg));
         cr.set_source_rgb(sp.r, sp.g, sp.b);
         if hl.undercurl {
             pangocairo::functions::show_error_underline(

    But i don't think it's a good idea to do this. If i understand correctly, my colorscheme must set default special color.
    And something like hi Default guisp=fg will fix issue for me. But, this is not working as expected. And guisp=Gray doesn't work too. Probably it worked once for me by some happy accident.

    partizan
    @last-partizan

    I found highlight group, for me it's CocUnderline. It is defined like this:

    CocUnderline cterm=underline gui=underline
    But there is nothing about red guisp. And i assume other editors defaults to current foreground color for special, and neovide and gnvim - to red.