diff --git a/keybindings.vim b/keybindings.vim index b3a0a91..70da22a 100644 --- a/keybindings.vim +++ b/keybindings.vim @@ -171,6 +171,7 @@ nnoremap sc :nohls nnoremap sC :Telescope commands nnoremap sf :Telescope find_files nnoremap sg :Telescope live_grep +nnoremap sG :Telescope glyph nnoremap sh :Telescope command_history nnoremap sm :Telescope man_pages nnoremap s/ :Telescope search_history diff --git a/lua/plugins.lua b/lua/plugins.lua index 395124f..dccbc56 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -20,8 +20,7 @@ require('packer').startup(function(use) use { 'nat-418/telescope-color-names.nvim' } use { 'nvim-telescope/telescope-fzf-native.nvim', - run = - 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' + run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } -- }}} @@ -252,6 +251,7 @@ require('packer').startup(function(use) -- DAP {{{ use 'mfussenegger/nvim-dap' + use 'nvim-neotest/nvim-nio' use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } } use { 'mfussenegger/nvim-dap-python' } use { 'theHamsta/nvim-dap-virtual-text' } @@ -298,6 +298,7 @@ require('packer').startup(function(use) use { 'rcarriga/nvim-notify' } use { 'stevearc/dressing.nvim' } use { 'HiPhish/rainbow-delimiters.nvim' } + use { 'echasnovski/mini.nvim' } -- }}} diff --git a/plugin-confs/gitsigns.lua b/plugin-confs/gitsigns.lua index 35ad93e..18a0600 100644 --- a/plugin-confs/gitsigns.lua +++ b/plugin-confs/gitsigns.lua @@ -1,43 +1,48 @@ require('gitsigns').setup { - signs = { - add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, - change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, - changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, - }, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - interval = 1000, - follow_files = true - }, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter_opts = { - relative_time = false - }, - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, - preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 - }, - yadm = { - enable = false - }, + signs = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' } + }, + signs_staged = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' } + }, + signs_staged_enable = true, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { follow_files = true }, + auto_attach = true, + attach_to_untracked = false, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + virt_text_priority = 100 + }, + current_line_blame_formatter = ', - ', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + } } + diff --git a/plugin-confs/whichkey.lua b/plugin-confs/whichkey.lua index 5bee1a9..7063341 100755 --- a/plugin-confs/whichkey.lua +++ b/plugin-confs/whichkey.lua @@ -1,226 +1,96 @@ local wk = require("which-key") -wk.setup { - plugins = { - marks = true, -- shows a list of your marks on ' and ` - registers = true, -- shows your registers on " in NORMAL or in INSERT mode - spelling = { - enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions - suggestions = 20 -- how many suggestions should be shown in the list? - }, - -- the presets plugin, adds help for a bunch of default keybindings in Neovim - -- No actual key bindings are created - presets = { - operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion - motions = true, -- adds help for motions - text_objects = true, -- help for text objects triggered after entering an operator - windows = true, -- default bindings on - nav = true, -- misc bindings to work with windows - z = true, -- bindings for folds, spelling and others prefixed with z - g = true -- bindings for prefixed with g - } - }, - -- add operators that will trigger motion and text object completion - -- to enable all native operators, set the preset / operators plugin above - operators = { gc = "Comments" }, - key_labels = { - -- override the label used to display some keys. It doesn't effect WK in any other way. - -- For example: - -- [""] = "SPC", - -- [""] = "RET", - -- [""] = "TAB", - }, - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "➜", -- symbol used between a key and it's label - group = "+" -- symbol prepended to a group - }, - popup_mappings = { - scroll_down = '', -- binding to scroll down inside the popup - scroll_up = '' -- binding to scroll up inside the popup - }, - window = { - border = "none", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] - padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] - winblend = 0 - }, - layout = { - height = { min = 4, max = 25 }, -- min and max height of the columns - width = { min = 20, max = 50 }, -- min and max width of the columns - spacing = 3, -- spacing between columns - align = "left" -- align columns left, center or right - }, - ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate - show_help = true, -- show help message on the command line when the popup is visible - show_keys = true, -- show the key strokes for your commands - triggers = "auto", -- automatically setup triggers - -- triggers = {""}, -- or specify a list manually - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - -- this is mostly relevant for key maps that start with a native binding - -- most people should not need to change this - i = { "j", "k" }, - v = { "j", "k" } - }, - disable = { buftypes = {}, filetypes = { "TelescopePrompt" } } -} - -wk.register({ - a = { name = "AnyJump", b = "Back", l = "Last Result" }, - b = { - name = "Buffers", - b = "Show Buffers", - d = "Delete Buffer", - n = "Next Buffer", - p = "Previous Buffer" - }, - c = { - name = "Code", - a = "Code Action", - d = "Diagnostics", - D = { - name = "Diagnostic List", - n = "Next Diagnostic", - p = "Previous Diagnostic" - }, - p = "Copilot Panel", - l = "Set Loclist" - }, - C = { - name = "ChatGPT", - i = "Edit with Instructions", - d = "Docstring", - t = "Add Tests", - o = "Optimize Code", - s = "Summarize", - f = "Fix Bugs", - e = "Explain Code" - }, - d = { - name = "Debug", - b = "Toggle Breakpoint", - c = "Continue", - i = "Step Into", - o = "Step Over", - O = "Step Out", - r = "REPL Open", - l = "Run Last", - h = "Hover", - p = "Preview", - f = "Frames", - s = "Scopes", - u = { name = "Dap UI", t = "Toggle", o = "Open", c = "Close" }, - P = { - name = "Dap-python", - m = "Test Method", - c = "Test Class", - s = "Debug Selection" - } - }, - f = { - name = "Find File", - b = "File Browser", - c = "File Color", - f = "Find in Current Directory", - g = "Live Grep", - r = "File Recent" - }, - g = { - name = "Git", - b = "Blame", - c = "Commit", - f = "Files", - g = "Lazygit", - P = "Close goto-preview window", - R = "Telescope References", - p = { - "Peek", - c = "Close Preview", - d = "Preview Definition", - i = "Preview Implementation" - } - }, - h = { - name = "Help", - c = "Commands", - d = { - name = "Dap", - c = "Commands", - C = "Configurations", - b = "Breakpoints", - v = "Variables", - f = "Frames" - }, - v = "Vim Options", - k = "Keymaps", - s = "Spell Suggest" - }, - i = { name = "Insert", s = { name = "Snippet", p = "Python File" } }, - j = "Any Jump", - K = "Show Docs", - l = { - name = "LSP", - d = "Definitions", - D = "Diagnostics", - a = "Code Actions", - c = { name = "Calls", i = "Incoming", o = "Outgoing" }, - h = "Signature Help", - i = "Implementations", - r = "References", - R = "Rename", - s = "Document Symbols", - t = "Type Definitions", - w = "Workspace Symbols" - }, - n = "NvimTree", - o = { - name = "Open", - b = "File Browser", - B = "Btop", - c = "ChatGPT", - C = "Nvim Config", - d = "Lazydocker", - f = "Floating Terminal", - h = "Horizontal Terminal", - p = "Ipython", - P = "Ipython (fullscreen)", - r = "Ranger", - t = "Vertical Terminal" - }, - s = { - name = "Search", - c = "Clear Highlights", - C = "Commands", - f = "Files", - g = "Glyph", - h = "Command History", - m = "Man Pages" - }, - t = { - name = "Toggle", - c = "Colorscheme", - d = "DBUI", - f = "Floating Terminal", - p = "Ipython", - P = "Ipython (fullscreen)", - t = "Split Terminal" - }, - T = { - name = "Telescope", - c = "Color Names", - g = "Glyph", - n = "Notifications", - t = "Telescope" - }, - w = { - name = "Workspace", - a = "Add Folder", - l = "List Folders", - r = "Remove Folder" - }, - x = "Set Executable Bit", - y = "System Yank" -}, { prefix = "" }) +wk.add({ + { "C", group = "ChatGPT", desc = "ChatGPT", icon = "󰭻" }, + { "Cd", desc = "Docstring" }, { "Ce", desc = "Explain Code" }, + { "Cf", desc = "Fix Bugs" }, + { "Ci", desc = "Edit with Instructions" }, + { "Co", desc = "Optimize Code" }, { "Cs", desc = "Summarize" }, + { "Ct", desc = "Add Tests" }, + { "K", desc = "Show Docs", icon = "󱔗" }, + { "T", group = "Telescope", icon = "" }, + { "Tc", desc = "Color Names" }, { "Tg", desc = "Glyph" }, + { "Tn", desc = "Notifications" }, { "Tt", desc = "Telescope" }, + { "a", group = "AnyJump", icon = "" }, + { "ab", desc = "Back" }, { "al", desc = "Last Result" }, + { "b", group = "Buffers" }, { "bb", desc = "Show Buffers" }, + { "bd", desc = "Delete Buffer" }, + { "bn", desc = "Next Buffer" }, + { "bp", desc = "Previous Buffer" }, + { "c", group = "Code", icon = "" }, + { "cD", group = "Diagnostic List" }, + { "cDn", desc = "Next Diagnostic" }, + { "cDp", desc = "Previous Diagnostic" }, + { "ca", desc = "Code Action" }, { "cd", desc = "Diagnostics" }, + { "cl", desc = "Set Loclist" }, + { "cp", desc = "Copilot Panel" }, { "d", group = "Debug" }, + { "dO", desc = "Step Out" }, { "dP", group = "Dap-python" }, + { "dPc", desc = "Test Class" }, { "dPm", desc = "Test Method" }, + { "dPs", desc = "Debug Selection" }, + { "db", desc = "Toggle Breakpoint" }, + { "dc", desc = "Continue" }, { "df", desc = "Frames" }, + { "dh", desc = "Hover" }, { "di", desc = "Step Into" }, + { "dl", desc = "Run Last" }, { "do", desc = "Step Over" }, + { "dp", desc = "Preview" }, { "dr", desc = "REPL Open" }, + { "ds", desc = "Scopes" }, { "du", group = "Dap UI" }, + { "duc", desc = "Close" }, { "duo", desc = "Open" }, + { "dut", desc = "Toggle" }, { "f", group = "Find File" }, + { "fb", desc = "File Browser" }, { "fc", desc = "File Color" }, + { "ff", desc = "Find in Current Directory" }, + { "fg", desc = "Live Grep" }, { "fr", desc = "File Recent" }, + { "g", group = "Git" }, + { "gP", desc = "Close goto-preview window" }, + { "gR", desc = "Telescope References" }, + { "gb", desc = "Blame" }, { "gc", desc = "Commit" }, + { "gf", desc = "Files" }, { "gg", desc = "Lazygit" }, + { "gp", desc = "Peek" }, { "gpc", desc = "Close Preview" }, + { "gpd", desc = "Preview Definition" }, + { "gpi", desc = "Preview Implementation" }, + { "h", group = "Help", icon = "󰋖" }, + { "hc", desc = "Commands" }, + { "hd", group = "Dap", icon = "" }, + { "hdC", desc = "Configurations" }, + { "hdb", desc = "Breakpoints" }, { "hdc", desc = "Commands" }, + { "hdf", desc = "Frames" }, { "hdv", desc = "Variables" }, + { "hk", desc = "Keymaps" }, { "hs", desc = "Spell Suggest" }, + { "hv", desc = "Vim Options" }, + { "i", group = "Insert", icon = "" }, + { "is", group = "Snippet" }, { "isp", desc = "Python File" }, + { "j", desc = "Any Jump", icon = "" }, + { "l", group = "LSP", icon = "" }, + { "lD", desc = "Diagnostics" }, { "lR", desc = "Rename" }, + { "la", desc = "Code Actions" }, { "lc", group = "Calls" }, + { "lci", desc = "Incoming" }, { "lco", desc = "Outgoing" }, + { "ld", desc = "Definitions" }, + { "lh", desc = "Signature Help" }, + { "li", desc = "Implementations" }, + { "lr", desc = "References" }, + { "ls", desc = "Document Symbols" }, + { "lt", desc = "Type Definitions" }, + { "lw", desc = "Workspace Symbols" }, + { "n", desc = "NvimTree" }, + { "o", group = "Open", icon = "󰮫" }, { "oB", desc = "Btop" }, + { "oC", desc = "Nvim Config" }, + { "oP", desc = "Ipython (fullscreen)" }, + { "ob", desc = "File Browser" }, { "oc", desc = "ChatGPT" }, + { "od", desc = "Lazydocker" }, + { "of", desc = "Floating Terminal" }, + { "oh", desc = "Horizontal Terminal" }, + { "op", desc = "Ipython" }, { "or", desc = "Ranger" }, + { "ot", desc = "Vertical Terminal" }, { "s", group = "Search" }, + { "sC", desc = "Commands" }, + { "sc", desc = "Clear Highlights" }, { "sf", desc = "Files" }, + { "sG", desc = "Glyph" }, { "sg", desc = "Grep" }, + { "sh", desc = "Command History" }, + { "sm", desc = "Man Pages" }, { "t", group = "Toggle" }, + { "tP", desc = "Ipython (fullscreen)" }, + { "tc", desc = "Colorscheme" }, { "td", desc = "DBUI" }, + { "tf", desc = "Floating Terminal" }, + { "tp", desc = "Ipython" }, { "tt", desc = "Split Terminal" }, + { "w", group = "Workspace" }, { "wa", desc = "Add Folder" }, + { "wl", desc = "List Folders" }, + { "wr", desc = "Remove Folder" }, + { "x", group = "Set Executable Bit", desc = "Set Executable Bit" }, + { "y", desc = "System Yank", icon = "" }, + { "e", desc = "Edit", icon = "" } +})