Skip to content

Commit

Permalink
feat(blame): control priority of blame
Browse files Browse the repository at this point in the history
Added config.current_line_blame_opts.virt_text_priority

Resolves #513
  • Loading branch information
lewis6991 committed Apr 13, 2022
1 parent a680c32 commit d2e531b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/gitsigns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ current_line_blame_opts *gitsigns-config-current_line_blame_opts*
{
virt_text = true,
virt_text_pos = 'eol',
virt_text_priority = 100,
delay = 1000
}
<
Expand All @@ -691,6 +692,8 @@ current_line_blame_opts *gitsigns-config-current_line_blame_opts*
displayed.
• ignore_whitespace: boolean
Ignore whitespace when running blame.
• virt_text_priority: integer
Priority of virtual text.

current_line_blame_formatter_opts
*gitsigns-config-current_line_blame_formatter_opts*
Expand Down
4 changes: 4 additions & 0 deletions lua/gitsigns/config.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lua/gitsigns/current_line_blame.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions teal/gitsigns/config.tl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ local record M

delay: integer
ignore_whitespace: boolean
virt_text_priority: integer
end

preview_config: {string:any}
Expand Down Expand Up @@ -436,6 +437,7 @@ M.schema = {
default = {
virt_text = true,
virt_text_pos = 'eol',
virt_text_priority = 100,
delay = 1000
},
description = [[
Expand All @@ -455,6 +457,8 @@ M.schema = {
displayed.
• ignore_whitespace: boolean
Ignore whitespace when running blame.
• virt_text_priority: integer
Priority of virtual text.
]]
},

Expand Down
5 changes: 3 additions & 2 deletions teal/gitsigns/current_line_blame.tl
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ local update = void(function()
end

set_extmark(bufnr, lnum, {
virt_text = virt_text,
virt_text = virt_text,
virt_text_pos = opts.virt_text_pos,
hl_mode = 'combine',
priority = opts.virt_text_priority,
hl_mode = 'combine',
})
end
end)
Expand Down

0 comments on commit d2e531b

Please sign in to comment.