https://github.com/markwoodhall/vim-codelens
Inline insight into the history of your code
https://github.com/markwoodhall/vim-codelens
blame clojure codelens vim
Last synced: 5 months ago
JSON representation
Inline insight into the history of your code
- Host: GitHub
- URL: https://github.com/markwoodhall/vim-codelens
- Owner: markwoodhall
- Created: 2018-02-24T17:12:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-02T19:26:03.000Z (over 6 years ago)
- Last Synced: 2025-08-22T10:05:06.353Z (5 months ago)
- Topics: blame, clojure, codelens, vim
- Language: Vim script
- Homepage:
- Size: 70.3 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
== Warning
This is a very, very rough proof of concept, it might break, or produce errors that interrupt your workflow. It is currently working well for me.
== Purpose
vim-codelens is a neovim plugin somewhat inspired by Visual Studio codelens.
At the moment it has very few features. The main one being to provide virtualtext against a function definition indicating when
it was last modified, by who, and how many people have edited it.
image::https://i.imgur.com/OyIStFs.png[screenshot]
== Features
The features provided by codelens vary based on the `filetype` of the current buffer. The basic features are as follow:
1. Provides the author name and date of most recent git modification at the top of the current file
There are additional features for Clojure, vim, javascript, terraform, python, and hug sql file types.
1. Provides the author name and date of most recent git modification for the current function, class, namespace etc.
2. Provides a count of the number of references to the current function, class, namespace etc.
3. Provides a count of the number of tests of the current function, class, namespace etc.
== Installation
You can install vim-codelens using your favourite package manager, I use vim-plug.
[source,shell]
Plug 'markwoodhall/vim-codelens'
== Configuration
[source,shell]
let g:codelens_auto = 1
Turns on or off the ability to generate codelens data on buffer read or write. If you prefer to
toggle this off then you can manually run the `:Codelens` command.
[source,shell]
let g:codelens_bg_colour='#1da374'
Allows customisation of the background colour used when rendering codelens data.
[source,shell]
let g:codelens_fg_colour='#292D33'
Allows customisation of the foreground colour used when rendering codelens data.
[source,shell]
let g:codelens_show_references = 1
Turns on or off the ability to count the number of references to the current codelens target using `git grep`.
[source,shell]
let g:codelens_show_tests = 1
Turns on or off the ability to count the number of tests on the current codelens target using `git grep`.
[source,shell]
let g:codelens_allow_same_line = 1
Turns on or off the ability to render code lens data on the same line as the target if there is no whitespace above the target.
== License
Copyright © Mark Woodhall. Distributed under the same terms as Vim itself. See `:help license`