Compare commits
6 Commits
cdf15743c3
...
b3495ef161
| Author | SHA1 | Date | |
|---|---|---|---|
|
b3495ef161
|
|||
|
e7aaee0dd6
|
|||
|
513f2e3e20
|
|||
|
ad93476190
|
|||
|
620dd92101
|
|||
|
0904b788b1
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Matej Janežič
|
Copyright (c) 2025 Matej Janežič
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -19,4 +19,11 @@ now_if_args(function()
|
|||||||
sh = true,
|
sh = true,
|
||||||
typescript = true,
|
typescript = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- remap default <M-\> to first close pumenu if open
|
||||||
|
local function suggest()
|
||||||
|
if vim.fn.pumvisible() == 1 then vim.fn.complete(vim.fn.col("."), {}) end
|
||||||
|
return vim.fn["copilot#Suggest"]()
|
||||||
|
end
|
||||||
|
vim.keymap.set("i", "<M-\\>", suggest)
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
MiniDeps.later(function()
|
|
||||||
MiniDeps.add("f-person/git-blame.nvim")
|
|
||||||
require("gitblame").setup({
|
|
||||||
enabled = false,
|
|
||||||
message_template = " <sha>: <author> <date> <summary>",
|
|
||||||
date_format = "%Y-%m-%d",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>gt", ":GitBlameToggle<CR>")
|
|
||||||
vim.keymap.set("n", "<leader>gs", ":GitBlameCopySHA<CR>")
|
|
||||||
end)
|
|
||||||
@@ -9,4 +9,12 @@ MiniDeps.later(function()
|
|||||||
changedelete = { text = "~" },
|
changedelete = { text = "~" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- blame
|
||||||
|
vim.keymap.set({"n", "v"}, "<leader>gb", ":Gitsigns blame<CR>")
|
||||||
|
vim.keymap.set({"n", "v"}, "<leader>gt", ":Gitsigns blame_line<CR>")
|
||||||
|
|
||||||
|
-- hunks
|
||||||
|
vim.keymap.set({"n", "v"}, "<leader>ga", ":Gitsigns stage_hunk<CR>")
|
||||||
|
vim.keymap.set({"n", "v"}, "<leader>gr", ":Gitsigns reset_hunk<CR>")
|
||||||
end)
|
end)
|
||||||
|
|||||||
12
lua/plugins/mini_cursorword.lua
Normal file
12
lua/plugins/mini_cursorword.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
MiniDeps.later(function()
|
||||||
|
require("mini.cursorword").setup()
|
||||||
|
|
||||||
|
local function disable(args)
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
local tD_dH = vim.lsp.protocol.Methods.textDocument_documentHighlight
|
||||||
|
if client and not client.supports_method(tD_dH) then return end
|
||||||
|
vim.b[args.buf].minicursorword_disable = true
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", { callback = disable })
|
||||||
|
end)
|
||||||
@@ -12,15 +12,10 @@ MiniDeps.later(function()
|
|||||||
"qf",
|
"qf",
|
||||||
}
|
}
|
||||||
|
|
||||||
local disable_set = {}
|
|
||||||
for _, v in ipairs(disable) do
|
|
||||||
disable_set[v] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
local function term_disable(args) vim.b[args.buf].miniindentscope_disable = true end
|
local function term_disable(args) vim.b[args.buf].miniindentscope_disable = true end
|
||||||
local function ft_disable(args)
|
local function ft_disable(args)
|
||||||
local ft = vim.bo[args.buf].filetype
|
local ft = vim.bo[args.buf].filetype
|
||||||
if disable_set[ft] == nil then return end
|
if not vim.tbl_contains(disable, ft) then return end
|
||||||
vim.b[args.buf].miniindentscope_disable = true
|
vim.b[args.buf].miniindentscope_disable = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ MiniDeps.now(function()
|
|||||||
{ name = "update dependencies", action = "DepsUpdate", section = "dependencies" },
|
{ name = "update dependencies", action = "DepsUpdate", section = "dependencies" },
|
||||||
{ name = "snap dependencies", action = "DepsSnapSave", section = "dependencies" },
|
{ name = "snap dependencies", action = "DepsSnapSave", section = "dependencies" },
|
||||||
{ name = "load dependencies", action = "DepsSnapLoad", section = "dependencies" },
|
{ name = "load dependencies", action = "DepsSnapLoad", section = "dependencies" },
|
||||||
|
{ name = "clean dependencies", action = "DepsClean", section = "dependencies" },
|
||||||
-- debug
|
-- debug
|
||||||
{ name = "reinstall treesitter parsers", action = reinstall_treesitter, section = "debug" },
|
{ name = "reinstall treesitter parsers", action = reinstall_treesitter, section = "debug" },
|
||||||
--stylua: ignore end
|
--stylua: ignore end
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
["copilot.vim"] = "da369d90cfd6c396b1d0ec259836a1c7222fb2ea",
|
["copilot.vim"] = "da369d90cfd6c396b1d0ec259836a1c7222fb2ea",
|
||||||
["fzf-lua"] = "db3ccffe79480543d8e0f7b0cac0d9b220f9486e",
|
["fzf-lua"] = "db3ccffe79480543d8e0f7b0cac0d9b220f9486e",
|
||||||
["git-blame.nvim"] = "54da04264ec5313d602aebea7c5dc90141696ad7",
|
|
||||||
["gitlinker.nvim"] = "cc59f732f3d043b626c8702cb725c82e54d35c25",
|
["gitlinker.nvim"] = "cc59f732f3d043b626c8702cb725c82e54d35c25",
|
||||||
["gitsigns.nvim"] = "1ee5c1fd068c81f9dd06483e639c2aa4587dc197",
|
["gitsigns.nvim"] = "1ee5c1fd068c81f9dd06483e639c2aa4587dc197",
|
||||||
["gruvbox-material"] = "834dbf21836862300ced7444db4262b796330ab7",
|
["gruvbox-material"] = "834dbf21836862300ced7444db4262b796330ab7",
|
||||||
|
|||||||
Reference in New Issue
Block a user