add neoclip and octo plugins

This commit is contained in:
Salar Rahmanian 2024-09-02 08:41:33 -07:00
parent f55f491c46
commit 2e34ee2c18
3 changed files with 89 additions and 0 deletions

63
lua/plugins/neoclip.lua Normal file
View file

@ -0,0 +1,63 @@
return {
"AckslD/nvim-neoclip.lua",
dependencies = { "kkharji/sqlite.lua" },
keys = {
{ "<leader>sp", "<cmd>Telescope neoclip<cr>", desc = "Neoclip" },
},
opts = {
history = 1000,
enable_persistent_history = true,
length_limit = 1048576,
continuous_sync = false,
db_path = vim.fn.stdpath("data") .. "/databases/neoclip.sqlite3",
filter = nil,
preview = true,
prompt = nil,
default_register = '"',
default_register_macros = "q",
enable_macro_history = true,
content_spec_column = false,
disable_keycodes_parsing = false,
on_select = {
move_to_front = false,
close_telescope = true,
},
on_paste = {
set_reg = false,
move_to_front = false,
close_telescope = true,
},
on_replay = {
set_reg = false,
move_to_front = false,
close_telescope = true,
},
on_custom_action = {
close_telescope = true,
},
keys = {
telescope = {
i = {
select = "<cr>",
paste = "<c-p>",
paste_behind = "<c-k>",
replay = "<c-q>", -- replay a macro
delete = "<c-d>", -- delete an entry
edit = "<c-e>", -- edit an entry
custom = {},
},
n = {
select = "<cr>",
paste = "p",
--- It is possible to map to more than one key.
-- paste = { 'p', '<c-p>' },
paste_behind = "P",
replay = "q",
delete = "d",
edit = "e",
custom = {},
},
},
},
},
}

25
lua/plugins/octo.lua Normal file
View file

@ -0,0 +1,25 @@
return {
"pwntester/octo.nvim",
cmd = "Octo",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-tree/nvim-web-devicons",
},
config = function()
require("octo").setup({
enable_builtin = true,
file_panel = { use_icons = true },
mappings = {
review_diff = {
select_next_entry = { lhs = "<Tab>", desc = "move to previous changed file" },
select_prev_entry = { lhs = "<S-Tab>", desc = "move to next changed file" },
},
},
})
vim.treesitter.language.register("markdown", "octo")
end,
keys = {
{ "<leader>o", "<cmd>Octo<cr>", desc = "Octo" },
},
}

View file

@ -6,6 +6,7 @@ return {
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
"debugloop/telescope-undo.nvim",
"nvim-telescope/telescope-ui-select.nvim",
"AckslD/nvim-neoclip.lua",
},
config = function()
require("telescope").setup({