summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/extra
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/extra')
-rw-r--r--.config/nvim/lua/extra/colorizer.lua22
-rw-r--r--.config/nvim/lua/extra/hop.lua15
-rw-r--r--.config/nvim/lua/extra/lir.lua96
-rw-r--r--.config/nvim/lua/extra/lsp_signature.lua14
-rw-r--r--.config/nvim/lua/extra/neoscroll.lua25
-rw-r--r--.config/nvim/lua/extra/numb.lua17
-rw-r--r--.config/nvim/lua/extra/octo.lua139
-rw-r--r--.config/nvim/lua/extra/quickscope.lua3
-rw-r--r--.config/nvim/lua/extra/spectre.lua144
-rw-r--r--.config/nvim/lua/extra/zen.lua48
10 files changed, 0 insertions, 523 deletions
diff --git a/.config/nvim/lua/extra/colorizer.lua b/.config/nvim/lua/extra/colorizer.lua
deleted file mode 100644
index 04b7367..0000000
--- a/.config/nvim/lua/extra/colorizer.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, colorizer = pcall(require, "colorizer")
- if not status_ok then
- Log:get_default().error "Failed to load colorizer"
- return
- end
-
- colorizer.setup({ "*" }, {
- RGB = true, -- #RGB hex codes
- RRGGBB = true, -- #RRGGBB hex codes
- RRGGBBAA = true, -- #RRGGBBAA hex codes
- rgb_fn = true, -- CSS rgb() and rgba() functions
- hsl_fn = true, -- CSS hsl() and hsla() functions
- css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
- css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
- })
-end
-
-return M
diff --git a/.config/nvim/lua/extra/hop.lua b/.config/nvim/lua/extra/hop.lua
deleted file mode 100644
index 834f97a..0000000
--- a/.config/nvim/lua/extra/hop.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, hop = pcall(require, "hop")
- if not status_ok then
- Log:get_default().error "Failed to load hop"
- return
- end
- hop.setup()
- vim.api.nvim_set_keymap("n", "s", ":HopChar2<cr>", { silent = true })
- vim.api.nvim_set_keymap("n", "S", ":HopWord<cr>", { silent = true })
-end
-
-return M
diff --git a/.config/nvim/lua/extra/lir.lua b/.config/nvim/lua/extra/lir.lua
deleted file mode 100644
index 271afb1..0000000
--- a/.config/nvim/lua/extra/lir.lua
+++ /dev/null
@@ -1,96 +0,0 @@
-local status_ok, lir = pcall(require, "lir")
-if not status_ok then
- return
-end
-local actions = require "lir.actions"
-local mark_actions = require "lir.mark.actions"
-local clipboard_actions = require "lir.clipboard.actions"
-
-lir.setup {
- show_hidden_files = false,
- devicons_enable = true,
- mappings = {
- ["l"] = actions.edit,
- ["<cr>"] = actions.edit,
- ["<C-s>"] = actions.split,
- ["v"] = actions.vsplit,
- ["<C-t>"] = actions.tabedit,
-
- ["h"] = actions.up,
- ["q"] = actions.quit,
-
- ["A"] = actions.mkdir,
- ["a"] = actions.newfile,
- ["r"] = actions.rename,
- ["@"] = actions.cd,
- ["Y"] = actions.yank_path,
- ["."] = actions.toggle_show_hidden,
- ["D"] = actions.delete,
-
- ["J"] = function()
- mark_actions.toggle_mark()
- vim.cmd "normal! j"
- end,
- ["C"] = clipboard_actions.copy,
- ["X"] = clipboard_actions.cut,
- ["P"] = clipboard_actions.paste,
- },
- float = {
- winblend = 0,
-
- -- -- You can define a function that returns a table to be passed as the third
- -- -- argument of nvim_open_win().
- win_opts = function()
- -- local width = math.floor(vim.o.columns * 0.8)
- -- local height = math.floor(vim.o.lines * 0.8)
- return {
- border = "single",
- -- border = require("lir.float.helper").make_border_opts({
- -- "+",
- -- "─",
- -- "+",
- -- "│",
- -- "+",
- -- "─",
- -- "+",
- -- "│",
- -- }, "Normal"),
- -- width = width,
- -- height = height,
- -- row = 1,
- -- col = math.floor((vim.o.columns - width) / 2),
- }
- end,
- },
- hide_cursor = false,
-}
-
--- custom folder icon
-require("nvim-web-devicons").setup {
- override = {
- lir_folder_icon = {
- icon = "",
- color = "#569CD6",
- name = "LirFolderNode",
- },
- },
-}
-
--- use visual mode
-function _G.LirSettings()
- vim.api.nvim_buf_set_keymap(
- 0,
- "x",
- "J",
- ':<C-u>lua require"lir.mark.actions".toggle_mark("v")<CR>',
- { noremap = true, silent = true }
- )
-
- -- echo cwd
- vim.api.nvim_echo({ { vim.fn.expand "%:p", "Normal" } }, false, {})
-end
-
-vim.cmd [[augroup lir-settings]]
-vim.cmd [[ autocmd!]]
-vim.cmd [[ autocmd Filetype lir :lua LirSettings()]]
-vim.cmd [[augroup END]]
diff --git a/.config/nvim/lua/extra/lsp_signature.lua b/.config/nvim/lua/extra/lsp_signature.lua
deleted file mode 100644
index 7e67a4d..0000000
--- a/.config/nvim/lua/extra/lsp_signature.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, lsp_signature = pcall(require, "lsp_signature")
- if not status_ok then
- Log:get_default().error "Failed to load lsp_signature"
- return
- end
-
- lsp_signature.on_attach()
-end
-
-return M
diff --git a/.config/nvim/lua/extra/neoscroll.lua b/.config/nvim/lua/extra/neoscroll.lua
deleted file mode 100644
index 65f486b..0000000
--- a/.config/nvim/lua/extra/neoscroll.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, neoscroll = pcall(require, "neoscroll")
- if not status_ok then
- Log:get_default().error "Failed to load hop"
- return
- end
-
- neoscroll.setup {
- -- All these keys will be mapped to their corresponding default scrolling animation
- mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" },
- hide_cursor = true, -- Hide cursor while scrolling
- stop_eof = true, -- Stop at <EOF> when scrolling downwards
- use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope
- respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
- cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
- easing_function = nil, -- Default easing function
- pre_hook = nil, -- Function to run before the scrolling animation starts
- post_hook = nil, -- Function to run after the scrolling animation ends
- }
-end
-
-return M
diff --git a/.config/nvim/lua/extra/numb.lua b/.config/nvim/lua/extra/numb.lua
deleted file mode 100644
index 17d9f6b..0000000
--- a/.config/nvim/lua/extra/numb.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, numb = pcall(require, "numb")
- if not status_ok then
- Log:get_default().error "Failed to load numb"
- return
- end
-
- numb.setup {
- show_numbers = true, -- Enable 'number' for the window while peeking
- show_cursorline = true, -- Enable 'cursorline' for the window while peeking
- }
-end
-
-return M
diff --git a/.config/nvim/lua/extra/octo.lua b/.config/nvim/lua/extra/octo.lua
deleted file mode 100644
index f4d177c..0000000
--- a/.config/nvim/lua/extra/octo.lua
+++ /dev/null
@@ -1,139 +0,0 @@
-local M = {}
-
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, octo = pcall(require, "octo")
- if not status_ok then
- Log:get_default().error "Failed to load octo"
- return
- end
-
- octo.setup {
- default_remote = { "upstream", "origin" }, -- order to try remotes
- reaction_viewer_hint_icon = "", -- marker for user reactions
- user_icon = " ", -- user icon
- timeline_marker = "", -- timeline marker
- timeline_indent = "2", -- timeline indentation
- right_bubble_delimiter = "", -- Bubble delimiter
- left_bubble_delimiter = "", -- Bubble delimiter
- github_hostname = "", -- GitHub Enterprise host
- snippet_context_lines = 4, -- number or lines around commented lines
- file_panel = {
- size = 10, -- changed files panel rows
- use_icons = true, -- use web-devicons in file panel
- },
- mappings = {
- issue = {
- close_issue = "<space>ic", -- close issue
- reopen_issue = "<space>io", -- reopen issue
- list_issues = "<space>il", -- list open issues on same repo
- reload = "<C-r>", -- reload issue
- open_in_browser = "<C-b>", -- open issue in browser
- copy_url = "<C-y>", -- copy url to system clipboard
- add_assignee = "<space>aa", -- add assignee
- remove_assignee = "<space>ad", -- remove assignee
- create_label = "<space>lc", -- create label
- add_label = "<space>la", -- add label
- remove_label = "<space>ld", -- remove label
- goto_issue = "<space>gi", -- navigate to a local repo issue
- add_comment = "<space>ca", -- add comment
- delete_comment = "<space>cd", -- delete comment
- next_comment = "]c", -- go to next comment
- prev_comment = "[c", -- go to previous comment
- react_hooray = "<space>rp", -- add/remove 🎉 reaction
- react_heart = "<space>rh", -- add/remove ❤️ reaction
- react_eyes = "<space>re", -- add/remove 👀 reaction
- react_thumbs_up = "<space>r+", -- add/remove 👍 reaction
- react_thumbs_down = "<space>r-", -- add/remove 👎 reaction
- react_rocket = "<space>rr", -- add/remove 🚀 reaction
- react_laugh = "<space>rl", -- add/remove 😄 reaction
- react_confused = "<space>rc", -- add/remove 😕 reaction
- },
- pull_request = {
- checkout_pr = "<space>po", -- checkout PR
- merge_pr = "<space>pm", -- merge PR
- list_commits = "<space>pc", -- list PR commits
- list_changed_files = "<space>pf", -- list PR changed files
- show_pr_diff = "<space>pd", -- show PR diff
- add_reviewer = "<space>va", -- add reviewer
- remove_reviewer = "<space>vd", -- remove reviewer request
- close_issue = "<space>ic", -- close PR
- reopen_issue = "<space>io", -- reopen PR
- list_issues = "<space>il", -- list open issues on same repo
- reload = "<C-r>", -- reload PR
- open_in_browser = "<C-b>", -- open PR in browser
- copy_url = "<C-y>", -- copy url to system clipboard
- add_assignee = "<space>aa", -- add assignee
- remove_assignee = "<space>ad", -- remove assignee
- create_label = "<space>lc", -- create label
- add_label = "<space>la", -- add label
- remove_label = "<space>ld", -- remove label
- goto_issue = "<space>gi", -- navigate to a local repo issue
- add_comment = "<space>ca", -- add comment
- delete_comment = "<space>cd", -- delete comment
- next_comment = "]c", -- go to next comment
- prev_comment = "[c", -- go to previous comment
- react_hooray = "<space>rp", -- add/remove 🎉 reaction
- react_heart = "<space>rh", -- add/remove ❤️ reaction
- react_eyes = "<space>re", -- add/remove 👀 reaction
- react_thumbs_up = "<space>r+", -- add/remove 👍 reaction
- react_thumbs_down = "<space>r-", -- add/remove 👎 reaction
- react_rocket = "<space>rr", -- add/remove 🚀 reaction
- react_laugh = "<space>rl", -- add/remove 😄 reaction
- react_confused = "<space>rc", -- add/remove 😕 reaction
- },
- review_thread = {
- goto_issue = "<space>gi", -- navigate to a local repo issue
- add_comment = "<space>ca", -- add comment
- add_suggestion = "<space>sa", -- add suggestion
- delete_comment = "<space>cd", -- delete comment
- next_comment = "]c", -- go to next comment
- prev_comment = "[c", -- go to previous comment
- select_next_entry = "]q", -- move to previous changed file
- select_prev_entry = "[q", -- move to next changed file
- close_review_tab = "<C-c>", -- close review tab
- react_hooray = "<space>rp", -- add/remove 🎉 reaction
- react_heart = "<space>rh", -- add/remove ❤️ reaction
- react_eyes = "<space>re", -- add/remove 👀 reaction
- react_thumbs_up = "<space>r+", -- add/remove 👍 reaction
- react_thumbs_down = "<space>r-", -- add/remove 👎 reaction
- react_rocket = "<space>rr", -- add/remove 🚀 reaction
- react_laugh = "<space>rl", -- add/remove 😄 reaction
- react_confused = "<space>rc", -- add/remove 😕 reaction
- },
- submit_win = {
- approve_review = "<C-a>", -- approve review
- comment_review = "<C-m>", -- comment review
- request_changes = "<C-r>", -- request changes review
- close_review_tab = "<C-c>", -- close review tab
- },
- review_diff = {
- add_review_comment = "<space>ca", -- add a new review comment
- add_review_suggestion = "<space>sa", -- add a new review suggestion
- focus_files = "<leader>e", -- move focus to changed file panel
- toggle_files = "<leader>b", -- hide/show changed files panel
- next_thread = "]t", -- move to next thread
- prev_thread = "[t", -- move to previous thread
- select_next_entry = "]q", -- move to previous changed file
- select_prev_entry = "[q", -- move to next changed file
- close_review_tab = "<C-c>", -- close review tab
- toggle_viewed = "<leader><space>", -- toggle viewer viewed state
- },
- file_panel = {
- next_entry = "j", -- move to next changed file
- prev_entry = "k", -- move to previous changed file
- select_entry = "<cr>", -- show selected changed file diffs
- refresh_files = "R", -- refresh changed files panel
- focus_files = "<leader>e", -- move focus to changed file panel
- toggle_files = "<leader>b", -- hide/show changed files panel
- select_next_entry = "]q", -- move to previous changed file
- select_prev_entry = "[q", -- move to next changed file
- close_review_tab = "<C-c>", -- close review tab
- toggle_viewed = "<leader><space>", -- toggle viewer viewed state
- },
- },
- }
-end
-
-return M
diff --git a/.config/nvim/lua/extra/quickscope.lua b/.config/nvim/lua/extra/quickscope.lua
deleted file mode 100644
index 99b4196..0000000
--- a/.config/nvim/lua/extra/quickscope.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-vim.cmd [[
- let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
- ]]
diff --git a/.config/nvim/lua/extra/spectre.lua b/.config/nvim/lua/extra/spectre.lua
deleted file mode 100644
index 12133d8..0000000
--- a/.config/nvim/lua/extra/spectre.lua
+++ /dev/null
@@ -1,144 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, spectre = pcall(require, "spectre")
- if not status_ok then
- Log:get_default().error "Failed to load hop"
- return
- end
-
- spectre.setup {
-
- color_devicons = true,
- highlight = {
- ui = "String",
- search = "DiffChange",
- replace = "DiffDelete",
- },
- mapping = {
- ["toggle_line"] = {
- map = "t",
- cmd = "<cmd>lua require('spectre').toggle_line()<CR>",
- desc = "toggle current item",
- },
- ["enter_file"] = {
- map = "<cr>",
- cmd = "<cmd>lua require('spectre.actions').select_entry()<CR>",
- desc = "goto current file",
- },
- ["send_to_qf"] = {
- map = "Q",
- cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>",
- desc = "send all item to quickfix",
- },
- ["replace_cmd"] = {
- map = "c",
- cmd = "<cmd>lua require('spectre.actions').replace_cmd()<CR>",
- desc = "input replace vim command",
- },
- ["show_option_menu"] = {
- map = "o",
- cmd = "<cmd>lua require('spectre').show_options()<CR>",
- desc = "show option",
- },
- ["run_replace"] = {
- map = "R",
- cmd = "<cmd>lua require('spectre.actions').run_replace()<CR>",
- desc = "replace all",
- },
- ["change_view_mode"] = {
- map = "m",
- cmd = "<cmd>lua require('spectre').change_view()<CR>",
- desc = "change result view mode",
- },
- ["toggle_ignore_case"] = {
- map = "I",
- cmd = "<cmd>lua require('spectre').change_options('ignore-case')<CR>",
- desc = "toggle ignore case",
- },
- ["toggle_ignore_hidden"] = {
- map = "H",
- cmd = "<cmd>lua require('spectre').change_options('hidden')<CR>",
- desc = "toggle search hidden",
- },
- -- you can put your mapping here it only use normal mode
- },
- find_engine = {
- -- rg is map with finder_cmd
- ["rg"] = {
- cmd = "rg",
- -- default args
- args = {
- "--color=never",
- "--no-heading",
- "--with-filename",
- "--line-number",
- "--column",
- },
- options = {
- ["ignore-case"] = {
- value = "--ignore-case",
- icon = "[I]",
- desc = "ignore case",
- },
- ["hidden"] = {
- value = "--hidden",
- desc = "hidden file",
- icon = "[H]",
- },
- -- you can put any option you want here it can toggle with
- -- show_option function
- },
- },
- ["ag"] = {
- cmd = "ag",
- args = {
- "--vimgrep",
- "-s",
- },
- options = {
- ["ignore-case"] = {
- value = "-i",
- icon = "[I]",
- desc = "ignore case",
- },
- ["hidden"] = {
- value = "--hidden",
- desc = "hidden file",
- icon = "[H]",
- },
- },
- },
- },
- replace_engine = {
- ["sed"] = {
- cmd = "sed",
- args = nil,
- },
- options = {
- ["ignore-case"] = {
- value = "--ignore-case",
- icon = "[I]",
- desc = "ignore case",
- },
- },
- },
- default = {
- find = {
- --pick one of item in find_engine
- cmd = "rg",
- options = { "ignore-case" },
- },
- replace = {
- --pick one of item in replace_engine
- cmd = "sed",
- },
- },
- replace_vim_cmd = "cdo",
- is_open_target_win = true, --open file on opener window
- is_insert_mode = false, -- start open panel on is_insert_mode
- }
-end
-
-return M
diff --git a/.config/nvim/lua/extra/zen.lua b/.config/nvim/lua/extra/zen.lua
deleted file mode 100644
index 9bfaf1a..0000000
--- a/.config/nvim/lua/extra/zen.lua
+++ /dev/null
@@ -1,48 +0,0 @@
-local M = {}
-local Log = require "core.log"
-
-M.config = function()
- local status_ok, zen_mode = pcall(require, "zen-mode")
- if not status_ok then
- Log:get_default().error "Failed to load zen-mode"
- return
- end
-
- zen_mode.setup {
- window = {
- backdrop = 1,
- height = 0.9, -- height of the Zen window
- width = 0.65,
- options = {
- signcolumn = "no", -- disable signcolumn
- number = false, -- disable number column
- relativenumber = false, -- disable relative numbers
- -- cursorline = false, -- disable cursorline
- -- cursorcolumn = false, -- disable cursor column
- -- foldcolumn = "0", -- disable fold column
- -- list = false, -- disable whitespace characters
- },
- },
- plugins = {
- gitsigns = { enabled = false }, -- disables git signs
- tmux = { enabled = true },
- twilight = { enabled = true },
- },
- -- on_open = function()
- -- vim.lsp.diagnostic.disable()
- -- vim.cmd [[
- -- set foldlevel=10
- -- IndentBlanklineDisable
- -- ]]
- -- end,
- -- on_close = function()
- -- vim.lsp.diagnostic.enable()
- -- vim.cmd [[
- -- set foldlevel=5
- -- IndentBlanklineEnable
- -- ]]
- -- end,
- }
-end
-
-return M