From 73a60f5ee71bb60265ec0c97be7531a5e7605d8c Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 13 Jan 2022 19:12:32 +0100 Subject: Remove bloat nvim config --- .config/nvim/lua/extra/colorizer.lua | 22 ----- .config/nvim/lua/extra/hop.lua | 15 ---- .config/nvim/lua/extra/lir.lua | 96 --------------------- .config/nvim/lua/extra/lsp_signature.lua | 14 --- .config/nvim/lua/extra/neoscroll.lua | 25 ------ .config/nvim/lua/extra/numb.lua | 17 ---- .config/nvim/lua/extra/octo.lua | 139 ----------------------------- .config/nvim/lua/extra/quickscope.lua | 3 - .config/nvim/lua/extra/spectre.lua | 144 ------------------------------- .config/nvim/lua/extra/zen.lua | 48 ----------- 10 files changed, 523 deletions(-) delete mode 100644 .config/nvim/lua/extra/colorizer.lua delete mode 100644 .config/nvim/lua/extra/hop.lua delete mode 100644 .config/nvim/lua/extra/lir.lua delete mode 100644 .config/nvim/lua/extra/lsp_signature.lua delete mode 100644 .config/nvim/lua/extra/neoscroll.lua delete mode 100644 .config/nvim/lua/extra/numb.lua delete mode 100644 .config/nvim/lua/extra/octo.lua delete mode 100644 .config/nvim/lua/extra/quickscope.lua delete mode 100644 .config/nvim/lua/extra/spectre.lua delete mode 100644 .config/nvim/lua/extra/zen.lua (limited to '.config/nvim/lua/extra') 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", { silent = true }) - vim.api.nvim_set_keymap("n", "S", ":HopWord", { 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, - [""] = actions.edit, - [""] = actions.split, - ["v"] = actions.vsplit, - [""] = 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", - ':lua require"lir.mark.actions".toggle_mark("v")', - { 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 = { "", "", "", "", "", "", "zt", "zz", "zb" }, - hide_cursor = true, -- Hide cursor while scrolling - stop_eof = true, -- Stop at 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 = "ic", -- close issue - reopen_issue = "io", -- reopen issue - list_issues = "il", -- list open issues on same repo - reload = "", -- reload issue - open_in_browser = "", -- open issue in browser - copy_url = "", -- copy url to system clipboard - add_assignee = "aa", -- add assignee - remove_assignee = "ad", -- remove assignee - create_label = "lc", -- create label - add_label = "la", -- add label - remove_label = "ld", -- remove label - goto_issue = "gi", -- navigate to a local repo issue - add_comment = "ca", -- add comment - delete_comment = "cd", -- delete comment - next_comment = "]c", -- go to next comment - prev_comment = "[c", -- go to previous comment - react_hooray = "rp", -- add/remove 🎉 reaction - react_heart = "rh", -- add/remove ❤️ reaction - react_eyes = "re", -- add/remove 👀 reaction - react_thumbs_up = "r+", -- add/remove 👍 reaction - react_thumbs_down = "r-", -- add/remove 👎 reaction - react_rocket = "rr", -- add/remove 🚀 reaction - react_laugh = "rl", -- add/remove 😄 reaction - react_confused = "rc", -- add/remove 😕 reaction - }, - pull_request = { - checkout_pr = "po", -- checkout PR - merge_pr = "pm", -- merge PR - list_commits = "pc", -- list PR commits - list_changed_files = "pf", -- list PR changed files - show_pr_diff = "pd", -- show PR diff - add_reviewer = "va", -- add reviewer - remove_reviewer = "vd", -- remove reviewer request - close_issue = "ic", -- close PR - reopen_issue = "io", -- reopen PR - list_issues = "il", -- list open issues on same repo - reload = "", -- reload PR - open_in_browser = "", -- open PR in browser - copy_url = "", -- copy url to system clipboard - add_assignee = "aa", -- add assignee - remove_assignee = "ad", -- remove assignee - create_label = "lc", -- create label - add_label = "la", -- add label - remove_label = "ld", -- remove label - goto_issue = "gi", -- navigate to a local repo issue - add_comment = "ca", -- add comment - delete_comment = "cd", -- delete comment - next_comment = "]c", -- go to next comment - prev_comment = "[c", -- go to previous comment - react_hooray = "rp", -- add/remove 🎉 reaction - react_heart = "rh", -- add/remove ❤️ reaction - react_eyes = "re", -- add/remove 👀 reaction - react_thumbs_up = "r+", -- add/remove 👍 reaction - react_thumbs_down = "r-", -- add/remove 👎 reaction - react_rocket = "rr", -- add/remove 🚀 reaction - react_laugh = "rl", -- add/remove 😄 reaction - react_confused = "rc", -- add/remove 😕 reaction - }, - review_thread = { - goto_issue = "gi", -- navigate to a local repo issue - add_comment = "ca", -- add comment - add_suggestion = "sa", -- add suggestion - delete_comment = "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 = "", -- close review tab - react_hooray = "rp", -- add/remove 🎉 reaction - react_heart = "rh", -- add/remove ❤️ reaction - react_eyes = "re", -- add/remove 👀 reaction - react_thumbs_up = "r+", -- add/remove 👍 reaction - react_thumbs_down = "r-", -- add/remove 👎 reaction - react_rocket = "rr", -- add/remove 🚀 reaction - react_laugh = "rl", -- add/remove 😄 reaction - react_confused = "rc", -- add/remove 😕 reaction - }, - submit_win = { - approve_review = "", -- approve review - comment_review = "", -- comment review - request_changes = "", -- request changes review - close_review_tab = "", -- close review tab - }, - review_diff = { - add_review_comment = "ca", -- add a new review comment - add_review_suggestion = "sa", -- add a new review suggestion - focus_files = "e", -- move focus to changed file panel - toggle_files = "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 = "", -- close review tab - toggle_viewed = "", -- toggle viewer viewed state - }, - file_panel = { - next_entry = "j", -- move to next changed file - prev_entry = "k", -- move to previous changed file - select_entry = "", -- show selected changed file diffs - refresh_files = "R", -- refresh changed files panel - focus_files = "e", -- move focus to changed file panel - toggle_files = "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 = "", -- close review tab - toggle_viewed = "", -- 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 = "lua require('spectre').toggle_line()", - desc = "toggle current item", - }, - ["enter_file"] = { - map = "", - cmd = "lua require('spectre.actions').select_entry()", - desc = "goto current file", - }, - ["send_to_qf"] = { - map = "Q", - cmd = "lua require('spectre.actions').send_to_qf()", - desc = "send all item to quickfix", - }, - ["replace_cmd"] = { - map = "c", - cmd = "lua require('spectre.actions').replace_cmd()", - desc = "input replace vim command", - }, - ["show_option_menu"] = { - map = "o", - cmd = "lua require('spectre').show_options()", - desc = "show option", - }, - ["run_replace"] = { - map = "R", - cmd = "lua require('spectre.actions').run_replace()", - desc = "replace all", - }, - ["change_view_mode"] = { - map = "m", - cmd = "lua require('spectre').change_view()", - desc = "change result view mode", - }, - ["toggle_ignore_case"] = { - map = "I", - cmd = "lua require('spectre').change_options('ignore-case')", - desc = "toggle ignore case", - }, - ["toggle_ignore_hidden"] = { - map = "H", - cmd = "lua require('spectre').change_options('hidden')", - 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 -- cgit v1.2.3-70-g09d2