Fix: Only set autocommands for select popups (#315)
Docs: Small improvements to README and docs
Feat: Add branch info to choose_merge_request menu (#318)
Chore: Add heart emoji (#323)
Feat: Add highlight for mentions (#324)
Fix: Do Not Error w/Out Buffer Content (#325)

This is a MINOR release.
This commit is contained in:
Harrison (Harry) Cramer
2024-07-04 18:55:31 -07:00
committed by GitHub
parent 3c9d95d25b
commit dc70c97810
6 changed files with 69 additions and 9 deletions

View File

@@ -2,7 +2,8 @@ if filereadable($VIMRUNTIME . '/syntax/markdown.vim')
source $VIMRUNTIME/syntax/markdown.vim
endif
syntax match Username "@\S*"
syntax match Username "\%([]\)\@<= @\S*"
syntax match Mention "\%([] \)\@<!@\S*"
syntax match Date "\v\d+\s+\w+\s+ago"
syntax match ChevronDown ""
syntax match ChevronRight ""
@@ -11,6 +12,7 @@ syntax match Unresolved /\s-\s\?/
syntax match Pencil //
highlight link Username GitlabUsername
highlight link Mention GitlabMention
highlight link Date GitlabDate
highlight link ChevronDown GitlabChevron
highlight link ChevronRight GitlabChevron

View File

@@ -3432,6 +3432,54 @@
],
"moji": "🤕"
},
"heart": {
"unicode": "1F495",
"unicode_alternates": [],
"name": "heart",
"shortname": ":heart:",
"category": "people",
"aliases": [],
"aliases_ascii": [],
"keywords": [
"affection",
"crush",
"face",
"infatuation",
"like",
"love",
"valentines",
"heart",
"lovestruck",
"heart-shaped",
"emotion",
"beautiful"
],
"moji": "❤️ "
},
"hearts": {
"unicode": "1F495",
"unicode_alternates": [],
"name": "hearts",
"shortname": ":hearts:",
"category": "people",
"aliases": [],
"aliases_ascii": [],
"keywords": [
"affection",
"crush",
"face",
"infatuation",
"like",
"love",
"valentines",
"heart",
"lovestruck",
"heart-shaped",
"emotion",
"beautiful"
],
"moji": "❤️ "
},
"heart_eyes": {
"unicode": "1F60D",
"unicode_alternates": [],

View File

@@ -199,7 +199,7 @@ you call this function with no values the defaults will be used:
reply = "r", -- Reply to comment
toggle_node = "t", -- Opens or closes the discussion
add_emoji = "Ea" -- Add an emoji to the note/comment
add_emoji = "Ed" -- Remove an emoji from a note/comment
delete_emoji = "Ed" -- Remove an emoji from a note/comment
toggle_all_discussions = "T", -- Open or close separately both resolved and unresolved discussions
toggle_resolved_discussions = "R", -- Open or close all resolved discussions
toggle_unresolved_discussions = "U", -- Open or close all unresolved discussions
@@ -283,11 +283,15 @@ you call this function with no values the defaults will be used:
colors = {
discussion_tree = {
username = "Keyword",
mention = "WarningMsg",
date = "Comment",
chevron = "DiffviewNonText",
directory = "Directory",
directory_icon = "DiffviewFolderSign",
file_name = "Normal",
resolved = "DiagnosticSignOk",
unresolved = "DiagnosticSignWarn",
draft = "DiffviewNonText",
}
}
})

View File

@@ -5,6 +5,7 @@ local colors = state.settings.colors
local discussion = colors.discussion_tree
vim.api.nvim_set_hl(0, "GitlabUsername", u.get_colors_for_group(discussion.username))
vim.api.nvim_set_hl(0, "GitlabMention", u.get_colors_for_group(discussion.mention))
vim.api.nvim_set_hl(0, "GitlabDate", u.get_colors_for_group(discussion.date))
vim.api.nvim_set_hl(0, "GitlabChevron", u.get_colors_for_group(discussion.chevron))
vim.api.nvim_set_hl(0, "GitlabDirectory", u.get_colors_for_group(discussion.directory))

View File

@@ -74,8 +74,10 @@ M.settings = {
opacity = 1.0,
edit = nil,
comment = nil,
note = nil,
help = nil,
pipeline = nil,
reply = nil,
squash_message = nil,
temp_registers = {},
},
@@ -89,9 +91,6 @@ M.settings = {
edit_comment = "e",
delete_comment = "dd",
refresh_data = "a",
open_in_browser = "b",
copy_node_url = "u",
publish_draft = "P",
reply = "r",
toggle_node = "t",
add_emoji = "Ea",
@@ -100,16 +99,19 @@ M.settings = {
toggle_resolved_discussions = "R",
toggle_unresolved_discussions = "U",
keep_current_open = false,
publish_draft = "P",
toggle_resolved = "p",
relative = "editor",
position = "left",
open_in_browser = "b",
copy_node_url = "u",
size = "20%",
relative = "editor",
resolved = "",
unresolved = "-",
tree_type = "simple",
toggle_tree_type = "i",
toggle_draft_mode = "D",
draft_mode = false,
toggle_draft_mode = "D",
},
create_mr = {
target = nil,
@@ -154,12 +156,12 @@ M.settings = {
severity = vim.diagnostic.severity.INFO,
virtual_text = false,
use_diagnostic_signs = true,
priority = 100,
icons = {
comment = "→|",
range = " |",
},
skip_old_revision_discussion = false,
priority = 100,
},
pipeline = {
created = "",
@@ -177,6 +179,7 @@ M.settings = {
colors = {
discussion_tree = {
username = "Keyword",
mention = "WarningMsg",
date = "Comment",
chevron = "DiffviewNonText",
directory = "Directory",

View File

@@ -354,6 +354,9 @@ M.split_path = function(path)
end
M.get_buffer_text = function(bufnr)
if not vim.api.nvim_buf_is_valid(bufnr) then
return ""
end
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
local text = table.concat(lines, "\n")
return text
@@ -374,7 +377,6 @@ M.string_to_bool = function(str)
elseif str == "false" or str == "False" or str == "FALSE" then
return false
end
M.notify("Not a valid boolean value `" .. str .. "`. Defaulting to `false`", vim.log.levels.WARN)
return false
end