From 2e34ee2c18d2b070986c2ce98df8e7f42f766761 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 2 Sep 2024 08:41:33 -0700 Subject: [PATCH] add neoclip and octo plugins --- lua/plugins/neoclip.lua | 63 +++++++++++++++++++++++++++++++++++++++ lua/plugins/octo.lua | 25 ++++++++++++++++ lua/plugins/telescope.lua | 1 + 3 files changed, 89 insertions(+) create mode 100644 lua/plugins/neoclip.lua create mode 100644 lua/plugins/octo.lua diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua new file mode 100644 index 0000000..34c6ab5 --- /dev/null +++ b/lua/plugins/neoclip.lua @@ -0,0 +1,63 @@ +return { + "AckslD/nvim-neoclip.lua", + dependencies = { "kkharji/sqlite.lua" }, + keys = { + { "sp", "Telescope neoclip", 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 = "", + paste = "", + paste_behind = "", + replay = "", -- replay a macro + delete = "", -- delete an entry + edit = "", -- edit an entry + custom = {}, + }, + n = { + select = "", + paste = "p", + --- It is possible to map to more than one key. + -- paste = { 'p', '' }, + paste_behind = "P", + replay = "q", + delete = "d", + edit = "e", + custom = {}, + }, + }, + }, + }, +} diff --git a/lua/plugins/octo.lua b/lua/plugins/octo.lua new file mode 100644 index 0000000..acbaeaf --- /dev/null +++ b/lua/plugins/octo.lua @@ -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 = "", desc = "move to previous changed file" }, + select_prev_entry = { lhs = "", desc = "move to next changed file" }, + }, + }, + }) + vim.treesitter.language.register("markdown", "octo") + end, + keys = { + { "o", "Octo", desc = "Octo" }, + }, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index c460410..6dfe88c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -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({ -- 2.46.1