jbgutierrez / vim-better-comments

Easily highlight human-friendly comments in your code!
MIT License
115 stars 9 forks source link

Wrong highlighting #1

Open MMarinov97 opened 6 years ago

MMarinov97 commented 6 years ago

Hi! As you asked me I'm writing this here. Terminal: urxvt Vim version: 8.1.26 (just updated) Colorscheme: Gruvbox Dark Example code: `/**

include

int main(int argc, char *argv[]){ if(argc != 2){ printf("Blahblahblah..."); } return 0; } ` Screenshot: Here

Zerophase commented 6 years ago

Yeah, it's not working for my vimrc or any of the shell scripts I've checked so far either. None of the comments have changed colors, but some random commands did.

Might as well give you my plug settings so you can recreate all of the variables. The colorscheme is set to darcula.

call plug#begin('~/.vim/plugged')

Plug 'christoomey/vim-tmux-navigator'
Plug 'christoomey/vim-tmux-runner'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'rking/ag.vim'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-commentary'
Plug 'thoughtbot/vim-rspec'
Plug 'tpope/vim-dispatch'
Plug 'scrooloose/nerdtree'
Plug 'Matt-Deacalion/vim-systemd-syntax'
Plug 'ervandew/supertab'
Plug 'trusktr/seti.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'roman/golden-ratio'
Plug 'romainl/flattened'
Plug 'morhetz/gruvbox'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-unimpaired'
Plug 'sonph/onehalf', {'rtp': 'vim/'}
Plug 'blueshirts/darcula'
Plug 'fenetikm/falcon'

function! Installjshint(info)
    if a:info.status == 'installed' || a:info.force
        "!npm install -g jshint
    endif
endfunction
Plug 'vim-syntastic/syntastic', { 'do': function('Installjshint') }
Plug 'terryma/vim-expand-region'
function! BuildYCM(info)
    if a:info.status == 'installed' || a:info.status == 'updated' || a:info.force
        !./install.py --all --system-libclang
    endif
endfunction

Plug 'Valloric/YouCompleteMe', {'do': function('BuildYCM')}
Plug 'WolfgangMehner/bash-support'
Plug 'easymotion/vim-easymotion'
Plug 'nanotech/jellybeans.vim'
Plug 'jbgutierrez/vim-better-comments'

call plug#end()
jbgutierrez commented 6 years ago

I've just uploaded a small evolution to improve compatibility with colorschemes other than solarized.

This is how it looks now with your colorschemes:

gruvbox

gruvbox

darcula

darcula

You can always change highlight groups, for example, :hi! def link ErrorBetterComments Error (see :help :hi)

Thanks for the feedback!

Zerophase commented 6 years ago

It's still not exactly working. I'm getting an error on line 80 when running PlugUpdate. Also setting

runtime! archlinux.vim

Triggers the highlight.

Mte90 commented 6 years ago

I found that this plugin create issues with PHP syntax highlighing and with removing now is working everything.