Giter Club home page Giter Club logo

Comments (14)

blueyed avatar blueyed commented on September 6, 2024 2

I think an option to only highlight uncovered (or covered) lines makes sense.
If you work on a project with high coverage, it is better on the eyes (and the sign column) to only highlight/mark parts where there is no coverage.

from coveragepy.vim.

alfredodeza avatar alfredodeza commented on September 6, 2024 1

@merwok when you say 'the gutter' you mean the sign column or the gitgutter plugin (or both?)

I can try and make it somewhat configurable, will have an update soon

from coveragepy.vim.

alfredodeza avatar alfredodeza commented on September 6, 2024

I am not sure I understand fully. For covered lines a green block is used, for uncovered it is red. You would only want to change uncovered lines with the characters "TT" ? what do you mean by "warning-level"? a color?

I could allow some configuration probably but that could be tricky. Here is the part where the code highlights certain sections:

hi SignColumn guifg=#004400 guibg=green ctermfg=40 ctermbg=40
hi uncovered guifg=#ff2222 guibg=red ctermfg=1 ctermbg=1
hi covered guifg=#004400 guibg=green ctermfg=40 ctermbg=40
hi branchuncovered guifg=#ffff00 guibg=yellow ctermfg=yellow ctermbg=yellow
sign define uncovered text=XX texthl=uncovered
sign define covered text=XX texthl=covered
sign define branchuncovered text=XX texthl=branchuncovered

from coveragepy.vim.

merwok avatar merwok commented on September 6, 2024

I agree with this request! I’m only using a few vim plugins at the moment, and I like for example how the gitgutter plugin shows green + and red - for added/removed lines in a way that’s helpful and discreet. Two-column wide solide bars of flashy green and red is a bit in your face :)

from coveragepy.vim.

merwok avatar merwok commented on September 6, 2024

This is git-gutter:

screen

At the moment, coveragepy overwrites the gutter with the big flashy bar. It would be great if we could easily control how coveragepy shows lines missing (no need to annotate lines covered in my opinion).

Another plugin uses highlight groups and leaves the gutter alone: https://github.com/mgedmin/coverage-highlight.vim#coverage-highlightvim

from coveragepy.vim.

blueyed avatar blueyed commented on September 6, 2024

@alfredodeza
Just for information: there is also https://github.com/google/vim-coverage, which tries to be a provider for different coverage sources, and it had some activity lately.
I still have some local changes for it, and it might make sense to join forces over there.
They have a provider for coveragepy by now.

from coveragepy.vim.

merwok avatar merwok commented on September 6, 2024

I meant the sign column. After installing git-gutter I thought that «gutter» was a general term for this column :)

from coveragepy.vim.

merwok avatar merwok commented on September 6, 2024

FWIW I tried to use five different coverage plugins yesterday, including google’s which seems the heaviest to install and at runtime, and none of them was working in a satisfying way. The two closest are this plugin and mgedmin/coverage-highlight.vim, each with only one or two small issues.

from coveragepy.vim.

blueyed avatar blueyed commented on September 6, 2024

@merwok
I feel your pain, went through it myself a while ago.
But that's why I think joining forces makes sense, and Google's is meant to be a generic framework.
For google/coverage-vim I've fixed for example that only its own signs get cleared, which is an issue with all of the plugins I've tried.
Anyway, I just wanted to mention this.

from coveragepy.vim.

alfredodeza avatar alfredodeza commented on September 6, 2024

@blueyed that issue is fixed with e479a93

from coveragepy.vim.

alfredodeza avatar alfredodeza commented on September 6, 2024

Potential fix/improvement for this issue is at 3187805

There is also support for custom sign char (shown here with defaults):

let g:coveragepy_uncovered_sign = '^'

Can you guys please try this out and see if it helps out or not? Thanks

from coveragepy.vim.

blueyed avatar blueyed commented on September 6, 2024

@alfredodeza
Not really: e479a93#commitcomment-25516917

from coveragepy.vim.

alfredodeza avatar alfredodeza commented on September 6, 2024

Fixed in master, there is a 'subtler display' now, with no green/red bars.

from coveragepy.vim.

merwok avatar merwok commented on September 6, 2024

Thanks!

from coveragepy.vim.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.