octo.nvim icon indicating copy to clipboard operation
octo.nvim copied to clipboard

Syntax highlighting breaks in changes in PR

Open hariom-qure opened this issue 2 years ago • 3 comments

Issue Description

bug report I'm trying to use octo and managed to get the linter working using use_local_fs=true.
but i cant see any syntax highlighting for code changes. all the text is converted to blue font.

image

Describe what happened (or what feature you want)

As you can see above, its setting all the line changes to blue font.

Describe what you expected to happen

Line changes should only have bg highlighting, the font colors should not change

How to reproduce it (as minimally and precisely as possible)

doing Octo review start on any PR is doing this

Tell us your environment

nvim --version

NVIM v0.9.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/__w/neovim/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/build/src/nvim/auto -I/__w/neovim/neovim/build/include -I/__w/neovim/neovim/build/cmake.config -I/__w/neovim/neovim/src -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

os

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

hariom-qure avatar Oct 26 '23 07:10 hariom-qure

This is expected, those blue lines should be your DiffAdded highlight. The problem here is that these are diff buffers so we want to both hightlight the syntax but also highlight the differences. If you dont want this behaviour you can try setting DiffAdded, DiffAdd, DiffChange, DiffDelete, etc to guifg=NONE guibg=NONE. Eg: hi DiffAdded guifg=NONE guibg=NONE

pwntester avatar Oct 26 '23 08:10 pwntester

But in many of your screenshots, I saw diff added with a green background, is that not the default behavior?

hariom-qure avatar Oct 27 '23 09:10 hariom-qure

That depends entirely on your theme and the highlight groups it defines for the diffXXXX groups

pwntester avatar Oct 27 '23 10:10 pwntester