Comments (14)
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.
@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.
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.
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.
This is git-gutter:
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.
@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.
I meant the sign column. After installing git-gutter I thought that «gutter» was a general term for this column :)
from coveragepy.vim.
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.
@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.
@blueyed that issue is fixed with e479a93
from coveragepy.vim.
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.
@alfredodeza
Not really: e479a93#commitcomment-25516917
from coveragepy.vim.
Fixed in master, there is a 'subtler display' now, with no green/red bars.
from coveragepy.vim.
Thanks!
from coveragepy.vim.
Related Issues (19)
- HighlightMissing getting called HOT 7
- Add support for "branch coverage" (was: Calling "Coveragepy report" yields "Error detected while processing function …") HOT 17
- Broken with coverage 4.0.3 HOT 5
- Error when using this plugin HOT 6
- Bad window height when showing report HOT 6
- Should only unplace own signs HOT 2
- Act as a provider for google/vim-coverage? HOT 1
- Highlighting does not work in Windows HOT 4
- Signs are always placed in the first pane HOT 9
- Error 117: Unknown function: execute HOT 9
- Can we have an option to not open LastSession.coveragepy window at the bottom? HOT 3
- Detecting coverage executable, handling py2/py3 HOT 2
- Couldn't get Coveragpy command to load HOT 4
- Unable to run plugin HOT 1
- 100% Coverage when much is uncovered
- test cases in subfolder HOT 6
- refresh coverage lines HOT 7
- Session show toggle off sign marks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coveragepy.vim.