Nvim: new pugins + some disabled ones
Some experiments with AI
This commit is contained in:
75
.config/nvim/lua/plugins/mark.lua
Normal file
75
.config/nvim/lua/plugins/mark.lua
Normal file
@@ -0,0 +1,75 @@
|
||||
return {
|
||||
'niuiic/track.nvim',
|
||||
dependencies = {
|
||||
'niuiic/core.nvim'
|
||||
},
|
||||
config = function()
|
||||
require("track").setup({
|
||||
sign = {
|
||||
text = "",
|
||||
text_color = "#00ff00",
|
||||
priority = 10,
|
||||
},
|
||||
search = {
|
||||
--@param mark track.Mark
|
||||
entry_label = function(mark)
|
||||
return string.format("[%s] %s | %s:%s", mark.id, mark.desc, mark.file, mark.lnum)
|
||||
end,
|
||||
--@param marks track.Mark[]
|
||||
--@return track.Mark[]
|
||||
sort_entry = function(marks)
|
||||
return require("core").lua.list.sort(marks, function(prev, cur)
|
||||
return prev.id < cur.id
|
||||
end)
|
||||
end,
|
||||
},
|
||||
})
|
||||
local keys = {
|
||||
{
|
||||
"mm",
|
||||
function()
|
||||
require("track").toggle()
|
||||
end,
|
||||
desc = "toggle mark",
|
||||
},
|
||||
{
|
||||
"mc",
|
||||
function()
|
||||
require("track").remove()
|
||||
end,
|
||||
desc = "remove all marks",
|
||||
},
|
||||
{
|
||||
"mj",
|
||||
function()
|
||||
require("track").jump_to_next()
|
||||
end,
|
||||
desc = "jump to next mark",
|
||||
},
|
||||
{
|
||||
"mk",
|
||||
function()
|
||||
require("track").jump_to_prev()
|
||||
end,
|
||||
desc = "jump to prev mark",
|
||||
},
|
||||
{
|
||||
"me",
|
||||
function()
|
||||
require("track").edit()
|
||||
end,
|
||||
desc = "edit mark",
|
||||
},
|
||||
{
|
||||
"<space>om",
|
||||
function()
|
||||
require("track").search()
|
||||
end,
|
||||
desc = "search marks",
|
||||
},
|
||||
}
|
||||
for key, value in pairs(keys) do
|
||||
vim.keymap.set('n', value[1], value[2], {})
|
||||
end
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user