Code Monkey home page Code Monkey logo

blamer.nvim's People

Contributors

ankursharma319 avatar apzelos avatar c0r73x avatar dgkf avatar dimtion avatar drn avatar emintham avatar georgesofianosgr avatar hillaryychan avatar keyserj avatar pirey avatar tamago324 avatar vitormil avatar zeittgeist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blamer.nvim's Issues

[Feature request] Show only in active split

It would be really nice to have an option to only show the git blame in the current active split. This is for the scenario when editing the same file in two seperate splits.

Feature request: don't depends on current working directory

If the current directory is not a git repository the blamer will be automatically disabled.
This is not suitable for the project organized using repo like Android. for example:

project root (open vim from here)
  |-- git repository A
  |-- git repository B
  |-- ...

Detecting git root from current file is more compatible.

Check for git repo along the path the file comes from

Assume that there is a git repo at the path: /home/user/project

Do the following steps:

  • cd /
  • nvim /home/user/project/file.vim

Expected result: the git repo is recognized and blamming is working

Actual result: A message says: "[blamer.nvim] Not a git repository"

Thanks for an awesome plugin!

Blamer is covered by indentlines

I use https://github.com/lukas-reineke/indent-blankline.nvim

It draws indentation lines and does this by drawing virtual text in empty lines.

Blamer positions itself on the left, so is expects to use the same position as the other plug-in. They overlap and the other win gets rendered.

Is there any way I can make blamer draw aligned with respect to existing virtual text?

Or should indentlines be doing something different?

[Feature Request] Relative dates

Love this plugin, but I have a hopefully small feature request.
In VS Code GitLense, the format is something like You, 8 minutes ago ยท Uncommitted changes, which has a relative time format. I would love to see this feature included!

Not autostarting

I put let g:blamer_enabled = 1 in my init.vim and the it doesn't show until I call :BlamerShow.

The only setting addition to this is let g:blamer_delay = 250.

Using nvim v0.4.4 and Plug

garbled code

image
when I toggle on,it happens garbled code as above

Unknown function: nvim_buf_set_extmark

Commit ab4dc40 breaks blamer, cannot find the correct function which locks navigation between files, rolling back to the previous function fixed it temporarily

Error detected while processing function <lambda>41[1]..blamer#Show[31]..blamer#SetVirtualText:
line    3:
E117: Unknown function: nvim_buf_set_extmark

image

Error in

call nvim_buf_set_extmark(a:buffer_number, s:blamer_namespace, l:line_index, 0, {"hl_mode": "combine", "virt_text": [[s:blamer_prefix . a:message, 'Blamer']]})

let g:blamer_enabled = 1 not working

Thank you for the great plugins
When I set let g:blamer_enabled = 1 , It will behave strangely.
:BlamerToggle seems to work correctly.
It might be my setting issue though ๐Ÿ˜“

overflow messages were ommited LOL

when using blamer.nvim I found an issue that I cannot see full text of commit messages because codes length were always too long in a line, and there's not enough space for virtual text

cound it be shown in next line when text overflow happens, by adding a new prop virt_text_pos and set to eol in the opts param of nvim_buf_set_extmark call?

Improve overall speed

I have noticed a significant loading time increase after installing this plugin. Also, have noticed Nerd Tree takes a significant amount of time to open as well after installing this plugin. I have yet to jump into the vim scripting language, but if anyone has any ideas as to how to improve the overall plugin's speed (maybe by making it async if it is not already), please let me know and I may be able to make a PR to support this awesome plugin ๐Ÿ˜†

Side note: This plugin rocks!

Selecting multiple lines slows down pretty hard

When entering visual mode, as I select more lines nvim slows down a lot. With 10-20 lines there's almost a second of lag, but with ~100 lines selected, nvim grinds to a halt taking several seconds to respond to any movement.

My impression is that the problem is because each line is fetched from git individually, and this just piles up hundreds of calls to git.

I'm no expert here, but I do think that some of these approaches might help:

  • Cache git blame while the file does not change.
  • Get all blame data for the entire file at once and parse that internally.
  • Auto-disable when selecting more than n lines (n can be either hardcoded or configurable?).

Error while installing

Hello @APZelos and thanks for this awesome plugin! ๐Ÿฅณ
I get an error while installing. ๐Ÿ˜ฑ๐Ÿ˜ฑ๐Ÿ˜ฑ

Error detected while processing function 8[1]..blamer#Show[8]..blamer#GetMessage: line 48:

E716: Key not present in Dictionary: committer

Press ENTER or type command to continue

๐Ÿ™„

[Feature request] Show changed blame without intermediate saving

Cheers for the great plugin, it offers all the options i'd expect from a Git blamer plugin and is a great replacement for gitsigns, as that plugin is not working as stable as i'd hoped for.

I do have a feature request, however i'm not sure how much work it entails. I'd prefer to see the blamer line show that the current line has been changed and therefore have blamer report Uncommited changes instead of the previous pre-change blame.

This behaviour does already work with blamer, however I have to save the buffer first before it triggers a blame line change, which i'm not always interested in doing as it could happen that I ditch my changes in a buffer alltogether by just closing it without saving it.

[Feature Request] Option to set virtual text highlight mode

Currently, virtual text replaces the highlight mode of the text that the virtual text sits above. Generally, this isn't an issue, but it means that there's a break in the background color when cursorline is set.

Suggestion

Currently, Comment highlight group is linked, but unlike comments, the background color of the cursorline is not used
image

Expected, just like a Comment, the cursorline background highlights the full selected line
image

I was able to make a very small tweak to hardcode this change. Of course, you may prefer the original formatting, in which case, the ability to expose the "hl_mode" as a global option would be very helpful.

autoload/blamer.vim#L198

-  call nvim_buf_set_virtual_text(a:buffer_number, s:blamer_namespace, l:line_index, [[s:blamer_prefix . a:message, 'Blamer']], {})
+  call nvim_buf_set_extmark(a:buffer_number, s:blamer_namespace, l:line_index, 0, {"hl_mode": "combine", "virt_text": [[s:blamer_prefix . a:message, 'Blamer']]})

Deprecation of nvim_buf_set_virtual_text

nvim_buf_set_virtual_text looks like it's been deprecated, so this might be a good change of function even if you prefer not to use the default formatting change.

neovim/neovim src/nvim/api/deprecated.c#L86-87 (looks like this was just deprecated 10 days ago)

/// @deprecated use nvim_buf_set_extmark to use full virtual text
///             functionality.

Whitelist buffers

Hello.
Thanks for this extension, it brings neovim a step closer to modern editors.
There is a couple of problems however:

  1. When you add new lines to a file, before saving the file the extension errors out because the new lines not yet exist on the file. It would be nice if the error happens silently instead of appearing on the bottom of the window
  2. The extension tries to blame on buffers that do not correspond to files, like quickfix, diagnostics and some other special buffers, triggering some weird errors inside what are usually tinny buffers.

keep up the good work!

Feature Request: Auto hide in insert mode

A workaround

autocmd InsertEnter * :BlamerHide
autocmd InsertLeave * :BlamerShow

but I think it should store the status before InsertEnter and load previous status after InsertLeave.

And I suggest

  autocmd BufLeave,InsertEnter * :BlamerHide
  autocmd BufEnter,InsertLeave * :BlamerShow

Error related to hl_mode

This error occurred when I installed blamer.nvim and enabled it.

Error detected while processing function <lambda>26[1]..blamer#Show[31]..blamer#SetVirtualText:
line    3:
E5555: API call: unexpected key: hl_mode

My environment is below.

vim version: NVIM v0.5.0-dev+nightly
node version: v16.10.0
coc.nvim version: 0.0.80-6e5a2aaeb5
term: iTerm.app
platform: darwin

commit no longer works in template

None of the commit-short or commit-long works in the template anymore.

E716: Key not present in Dictionary: "commit-long"
E716: Key not present in Dictionary: "commit-short"

Omit committer email when you are the committer

When using <committer-mail> it would be nice if there was an option to omit the value when you are the committer. That way for example if you have vim.g.blamer_template = '<committer> <committer-mail> you will would see
You <>, You ..., or something similar versus You <[email protected]>.

Another possibility so that spacing could be ensured could have a <committer-with-mail> option that way both would simply return You.

Does this run asynchronously?

First off, love the plugin. It does exactly what I want it to (replicate git blame per line like Vscode). Great job!

I am curious if this runs synchronously or asynchronously. I didn't know if it works like ALE and runs in the background.

Thanks

[blamer.nvim] Needs popup feature. Issue

When I am trying to run vim inside ubuntu server VPS. It showing this error.
Can anybody have a solution?

vim main.go
[blamer.nvim] Needs popup feature.
Press ENTER or type command to continue

Blamer doesn't work with Windows Powershell

This is my first issue ever written so please correct me if I'm formatting something wrong.

I am a Windows 10 user with Neovim 0.5.0. Everything was working great with blamer.nvim, until I added the line set shell=powershell.exe in my vimrc. Seems like there are some differences between cmd.exe and powershell.exe, which made blamer stop working and return this:

[blamer.nvim] An unknown element "" was received. This can happen if the remote process closed or ended abnormally.

This line is printed in the command line with Press ENTER or type command to continue below, so I'm basically unable to do any more operations before pressing ENTER and that makes Neovim unusable. Currently I deleted the line of setting the shell to powershell.

I also found this issue from vim-gitgutter that seems to have fixed the exact same problem by somehow forcing use of cmd.exe in the plugin. Maybe it would be simply a few more lines of code for the developer to add in? I know pretty much nothing about Vimscript so I don't know which part of the commit to add and where to add.

Check for file that exist in git folder is not accurable

The check for file that exist in git folder is not accurable (s:IsFileInPath).
The following step will cause blamer.nvim to mess up setting:

  1. Create a git repo in home folder, for example /home/mars/test.
  2. cd to /home/mars/test.
  3. nvim term:///home/mars/test//8888:/bin/bash will open a terminal buffer in /home/mars/test.
  4. The cursor will be messed up by blamer.nvim.

s:IsFileInPath should check if file is actually inside path, not only match path.

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.