Compare commits

...

2 Commits

Author SHA1 Message Date
2dad06edd8 Added gitlab review plugin 2026-03-13 17:12:35 +01:00
30bcab5f3e Add auto-complete for pnpm 2026-03-13 14:14:43 +01:00
5 changed files with 470 additions and 14 deletions

View File

@@ -6,9 +6,11 @@
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitlab.nvim": { "branch": "develop", "commit": "3d2828a9504b87fc36ee2aca1b0f36cf75003edd" },
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },

View File

@@ -75,20 +75,20 @@ local function on_attach(client, bufnr)
end
-- Highlight references under cursor
if client:supports_method(methods.textDocument_documentHighlight) then
local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = bufnr,
group = lsp_hover_hl,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
buffer = bufnr,
group = lsp_hover_hl,
callback = vim.lsp.buf.clear_references,
})
end
-- if client:supports_method(methods.textDocument_documentHighlight) then
-- local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
-- buffer = bufnr,
-- group = lsp_hover_hl,
-- callback = vim.lsp.buf.document_highlight,
-- })
--
-- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
-- buffer = bufnr,
-- group = lsp_hover_hl,
-- callback = vim.lsp.buf.clear_references,
-- })
-- end
end
vim.diagnostic.config({

View File

@@ -0,0 +1,412 @@
-- https://github.com/sindrets/diffview.nvim
--- @module "lazy"
--- @type LazySpec
return {
"sindrets/diffview.nvim",
opts = function()
local actions = require("diffview.actions")
return {
use_icons = false,
-- Disable default keymaps just so we can change <leader>e -> <leader>f
keymaps = {
disable_defaults = true,
view = {
-- The `view` bindings are active in the diff buffers, only when the current
-- tabpage is a Diffview.
{
"n",
"<tab>",
actions.select_next_entry,
{ desc = "Open the diff for the next file" },
},
{
"n",
"<s-tab>",
actions.select_prev_entry,
{ desc = "Open the diff for the previous file" },
},
{
"n",
"[F",
actions.select_first_entry,
{ desc = "Open the diff for the first file" },
},
{
"n",
"]F",
actions.select_last_entry,
{ desc = "Open the diff for the last file" },
},
{
"n",
"gf",
actions.goto_file_edit,
{ desc = "Open the file in the previous tabpage" },
},
{ "n", "<C-w><C-f>", actions.goto_file_split, { desc = "Open the file in a new split" } },
{ "n", "<C-w>gf", actions.goto_file_tab, { desc = "Open the file in a new tabpage" } },
{ "n", "<leader>f", actions.focus_files, { desc = "Bring focus to the file panel" } },
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel." } },
{
"n",
"g<C-x>",
actions.cycle_layout,
{ desc = "Cycle through available layouts." },
},
{
"n",
"[x",
actions.prev_conflict,
{ desc = "In the merge-tool: jump to the previous conflict" },
},
{
"n",
"]x",
actions.next_conflict,
{ desc = "In the merge-tool: jump to the next conflict" },
},
{
"n",
"<leader>co",
actions.conflict_choose("ours"),
{ desc = "Choose the OURS version of a conflict" },
},
{
"n",
"<leader>ct",
actions.conflict_choose("theirs"),
{ desc = "Choose the THEIRS version of a conflict" },
},
{
"n",
"<leader>cb",
actions.conflict_choose("base"),
{ desc = "Choose the BASE version of a conflict" },
},
{
"n",
"<leader>ca",
actions.conflict_choose("all"),
{ desc = "Choose all the versions of a conflict" },
},
{ "n", "dx", actions.conflict_choose("none"), { desc = "Delete the conflict region" } },
{
"n",
"<leader>cO",
actions.conflict_choose_all("ours"),
{ desc = "Choose the OURS version of a conflict for the whole file" },
},
{
"n",
"<leader>cT",
actions.conflict_choose_all("theirs"),
{ desc = "Choose the THEIRS version of a conflict for the whole file" },
},
{
"n",
"<leader>cB",
actions.conflict_choose_all("base"),
{ desc = "Choose the BASE version of a conflict for the whole file" },
},
{
"n",
"<leader>cA",
actions.conflict_choose_all("all"),
{ desc = "Choose all the versions of a conflict for the whole file" },
},
{
"n",
"dX",
actions.conflict_choose_all("none"),
{ desc = "Delete the conflict region for the whole file" },
},
},
file_panel = {
{
"n",
"j",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"<down>",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"k",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<up>",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<cr>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"o",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"l",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"<2-LeftMouse>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"-",
actions.toggle_stage_entry,
{ desc = "Stage / unstage the selected entry" },
},
{
"n",
"s",
actions.toggle_stage_entry,
{ desc = "Stage / unstage the selected entry" },
},
{ "n", "S", actions.stage_all, { desc = "Stage all entries" } },
{ "n", "U", actions.unstage_all, { desc = "Unstage all entries" } },
{
"n",
"X",
actions.restore_entry,
{ desc = "Restore entry to the state on the left side" },
},
{ "n", "L", actions.open_commit_log, { desc = "Open the commit log panel" } },
{ "n", "zo", actions.open_fold, { desc = "Expand fold" } },
{ "n", "h", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "zc", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "za", actions.toggle_fold, { desc = "Toggle fold" } },
{ "n", "zR", actions.open_all_folds, { desc = "Expand all folds" } },
{ "n", "zM", actions.close_all_folds, { desc = "Collapse all folds" } },
{ "n", "<c-b>", actions.scroll_view(-0.25), { desc = "Scroll the view up" } },
{ "n", "<c-f>", actions.scroll_view(0.25), { desc = "Scroll the view down" } },
{
"n",
"<tab>",
actions.select_next_entry,
{ desc = "Open the diff for the next file" },
},
{
"n",
"<s-tab>",
actions.select_prev_entry,
{ desc = "Open the diff for the previous file" },
},
{
"n",
"[F",
actions.select_first_entry,
{ desc = "Open the diff for the first file" },
},
{
"n",
"]F",
actions.select_last_entry,
{ desc = "Open the diff for the last file" },
},
{
"n",
"gf",
actions.goto_file_edit,
{ desc = "Open the file in the previous tabpage" },
},
{
"n",
"<C-w><C-f>",
actions.goto_file_split,
{ desc = "Open the file in a new split" },
},
{
"n",
"<C-w>gf",
actions.goto_file_tab,
{ desc = "Open the file in a new tabpage" },
},
{
"n",
"i",
actions.listing_style,
{ desc = "Toggle between 'list' and 'tree' views" },
},
{
"n",
"f",
actions.toggle_flatten_dirs,
{ desc = "Flatten empty subdirectories in tree listing style" },
},
{
"n",
"R",
actions.refresh_files,
{ desc = "Update stats and entries in the file list" },
},
{
"n",
"<leader>f",
actions.focus_files,
{ desc = "Bring focus to the file panel" },
},
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel" } },
{ "n", "g<C-x>", actions.cycle_layout, { desc = "Cycle available layouts" } },
{ "n", "[x", actions.prev_conflict, { desc = "Go to the previous conflict" } },
{ "n", "]x", actions.next_conflict, { desc = "Go to the next conflict" } },
{ "n", "g?", actions.help("file_panel"), { desc = "Open the help panel" } },
{
"n",
"<leader>cO",
actions.conflict_choose_all("ours"),
{ desc = "Choose the OURS version of a conflict for the whole file" },
},
{
"n",
"<leader>cT",
actions.conflict_choose_all("theirs"),
{ desc = "Choose the THEIRS version of a conflict for the whole file" },
},
{
"n",
"<leader>cB",
actions.conflict_choose_all("base"),
{ desc = "Choose the BASE version of a conflict for the whole file" },
},
{
"n",
"<leader>cA",
actions.conflict_choose_all("all"),
{ desc = "Choose all the versions of a conflict for the whole file" },
},
{
"n",
"dX",
actions.conflict_choose_all("none"),
{ desc = "Delete the conflict region for the whole file" },
},
},
file_history_panel = {
{ "n", "g!", actions.options, { desc = "Open the option panel" } },
{
"n",
"<C-A-d>",
actions.open_in_diffview,
{ desc = "Open the entry under the cursor in a diffview" },
},
{
"n",
"y",
actions.copy_hash,
{ desc = "Copy the commit hash of the entry under the cursor" },
},
{ "n", "L", actions.open_commit_log, { desc = "Show commit details" } },
{
"n",
"X",
actions.restore_entry,
{ desc = "Restore file to the state from the selected entry" },
},
{ "n", "zo", actions.open_fold, { desc = "Expand fold" } },
{ "n", "zc", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "h", actions.close_fold, { desc = "Collapse fold" } },
{ "n", "za", actions.toggle_fold, { desc = "Toggle fold" } },
{ "n", "zR", actions.open_all_folds, { desc = "Expand all folds" } },
{ "n", "zM", actions.close_all_folds, { desc = "Collapse all folds" } },
{
"n",
"j",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"<down>",
actions.next_entry,
{ desc = "Bring the cursor to the next file entry" },
},
{
"n",
"k",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<up>",
actions.prev_entry,
{ desc = "Bring the cursor to the previous file entry" },
},
{
"n",
"<cr>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"o",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"l",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{
"n",
"<2-LeftMouse>",
actions.select_entry,
{ desc = "Open the diff for the selected entry" },
},
{ "n", "<c-b>", actions.scroll_view(-0.25), { desc = "Scroll the view up" } },
{ "n", "<c-f>", actions.scroll_view(0.25), { desc = "Scroll the view down" } },
{ "n", "<tab>", actions.select_next_entry, { desc = "Open the diff for the next file" } },
{
"n",
"<s-tab>",
actions.select_prev_entry,
{ desc = "Open the diff for the previous file" },
},
{
"n",
"[F",
actions.select_first_entry,
{ desc = "Open the diff for the first file" },
},
{ "n", "]F", actions.select_last_entry, { desc = "Open the diff for the last file" } },
{
"n",
"gf",
actions.goto_file_edit,
{ desc = "Open the file in the previous tabpage" },
},
{ "n", "<C-w><C-f>", actions.goto_file_split, { desc = "Open the file in a new split" } },
{ "n", "<C-w>gf", actions.goto_file_tab, { desc = "Open the file in a new tabpage" } },
{ "n", "<leader>f", actions.focus_files, { desc = "Bring focus to the file panel" } },
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel" } },
{ "n", "g<C-x>", actions.cycle_layout, { desc = "Cycle available layouts" } },
{ "n", "g?", actions.help("file_history_panel"), { desc = "Open the help panel" } },
},
},
}
end,
}

View File

@@ -0,0 +1,39 @@
local window = require("symbols.window")
-- https://github.com/harrisoncramer/gitlab.nvim
--- @module "lazy"
--- @type LazySpec
return {
"harrisoncramer/gitlab.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
},
cond = function()
return vim.fn.executable("go") > 0
end,
build = function()
require("gitlab.server").build(true)
end, -- Builds the Go binary
opts = {
discussion_tree = {
draft_mode = true,
},
popup = {
border = window.border,
},
discussion_signs = {
virtual_text = true,
},
keymaps = {
discussion_tree = {
toggle_node = "za",
toggle_all_discussions = "zA",
},
popup = {
perform_action = "w",
discard_changes = "<esc>",
},
},
},
}

View File

@@ -114,6 +114,9 @@ if [ -d "$PNPM_HOME" ]; then
else
unset PNPM_HOME
fi
if (( $+commands[pnpm] )); then
source <(pnpm completion zsh)
fi
export FZF_DEFAULT_OPTS='--tmux'
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'