diff --git a/config/.config/nvim/lazy-lock.json b/config/.config/nvim/lazy-lock.json index 1a90f2b..c4830b3 100644 --- a/config/.config/nvim/lazy-lock.json +++ b/config/.config/nvim/lazy-lock.json @@ -1,10 +1,10 @@ { "LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" }, - "aerial.nvim": { "branch": "master", "commit": "3a3baf0930444c78d19964fdb401bd3a6a23270f" }, + "aerial.nvim": { "branch": "master", "commit": "8e4090bf9412e24b05823c771cb3956c2ba72981" }, "asyncrun.vim": { "branch": "master", "commit": "61cc3081963a12048e00e89f8cedc8bd1cb83b8c" }, - "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, + "auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" }, "bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" }, - "catppuccin": { "branch": "main", "commit": "ea52fe8a0b1e4a820df0d0cf9a6a5a0e18c3eaa0" }, + "catppuccin": { "branch": "main", "commit": "d7521f6050b94cb0e23067f63829d86886f870fe" }, "cmp-async-path": { "branch": "main", "commit": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, @@ -20,48 +20,48 @@ "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "codeium.nvim": { "branch": "main", "commit": "822e762567a0bf50b1a4e733c8c93691934d7606" }, - "codeium.vim": { "branch": "main", "commit": "7b2f57ba35bbff7dabd5e3eaa6e60d0490516c78" }, + "codeium.vim": { "branch": "main", "commit": "78f32674d42dcf8e5626e105bc8fb93b6c27120b" }, "conflict-marker.vim": { "branch": "master", "commit": "11a4d42244755505b66b15cd4496a150432eb5e3" }, "crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, "firenvim": { "branch": "master", "commit": "138424db463e6c0e862a05166a4ccc781cd7c19d" }, "formatter.nvim": { "branch": "master", "commit": "34dcdfa0c75df667743b2a50dd99c84a557376f0" }, "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, - "fzf.vim": { "branch": "master", "commit": "d1016dbd7cec2d2a3bb5863776c84b4034e4b85e" }, + "fzf.vim": { "branch": "master", "commit": "1e054c1d075d87903647db9320116d360eb8b024" }, "git-conflict.nvim": { "branch": "main", "commit": "4e0191c9a0ae05d7fbdcdc7f15cd358f56d23bfb" }, - "gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" }, - "go.nvim": { "branch": "master", "commit": "8732792d9c30a113188f85f75c19f0effd199881" }, - "guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" }, + "gitsigns.nvim": { "branch": "main", "commit": "af0f583cd35286dd6f0e3ed52622728703237e50" }, + "go.nvim": { "branch": "master", "commit": "57a3c3e7480031b4c04c11c948ac347f70995f73" }, + "guihua.lua": { "branch": "master", "commit": "54bcc1026588e352a16014165b8abcb6eb6d3418" }, "java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" }, "kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" }, - "lazy.nvim": { "branch": "main", "commit": "e42fccc3cda70266e0841c5126de2c23e8982800" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "leap.nvim": { "branch": "main", "commit": "b6ae80f8fc9993638608fc1a51c6ab0eeb12618c" }, "libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" }, - "lsp-lens.nvim": { "branch": "main", "commit": "739c9cf3a8c72c913427ae953c01ebb7b1cc1c00" }, + "lsp-lens.nvim": { "branch": "main", "commit": "34b6aa13b0196d6b0d5a87cca6d7104ac5071a59" }, "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, - "lsp-zero.nvim": { "branch": "v2.x", "commit": "5613177a9428578c00f0abdbd8e3493b962ac66d" }, - "lsp_lines.nvim": { "branch": "main", "commit": "9e3f99fbbd28aaec80dc0158c43be8cca8dd5017" }, + "lsp-zero.nvim": { "branch": "v2.x", "commit": "ffebf6f7b0649f1eb81b37c37b75552f8ff96337" }, + "lsp_lines.nvim": { "branch": "main", "commit": "cf2306dd332e34a3e91075b40bdd4f6db824b2ee" }, "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "09be3766669bfbabbe2863c624749d8da392c916" }, - "mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "40301e1c74bc0946eece13edf2b1c561cc497491" }, + "mason.nvim": { "branch": "main", "commit": "eabf6d347fdb75be360d4c0ced1145670a171453" }, "mini.splitjoin": { "branch": "main", "commit": "5f4237ae557f255a1f1a435c76c6a715be39060a" }, "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, "neo-tree-diagnostics.nvim": { "branch": "main", "commit": "483019d251c31acd14102bc279f938f98d9a3de6" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "neoscopes": { "branch": "main", "commit": "d3f92e9360da7b7ab4eb6c5811d5ebaf7135239f" }, - "nerdcommenter": { "branch": "master", "commit": "c52b6e731c2b558bc164419d4c369fcc45f0be51" }, + "nerdcommenter": { "branch": "master", "commit": "da948e160d9f54c2967c7927b9c74c5a68c8dc49" }, "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" }, - "nvim-cmp": { "branch": "main", "commit": "d3a3056204e1a9dbb7c7fe36c114dc43b681768c" }, + "nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" }, "nvim-cmp-buffer-lines": { "branch": "master", "commit": "924ccc04dc5c919b6baa05d45818025baa82699a" }, - "nvim-dap": { "branch": "master", "commit": "79dbc70eb79271ad801e4ff293887cde324c28d0" }, + "nvim-dap": { "branch": "master", "commit": "4048f37bc8b1a36fe1f5fde0df7d84aef71380e4" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lint": { "branch": "master", "commit": "962a76877a4479a535b935bd7ef35ad41ba308b2" }, - "nvim-lspconfig": { "branch": "master", "commit": "6428fcab6f3c09e934bc016c329806314384a41e" }, + "nvim-lint": { "branch": "master", "commit": "7746f952827dabfb70194518c99c93d5651b8f19" }, + "nvim-lspconfig": { "branch": "master", "commit": "b44737605807023d32e6310b87ba69f4dbf10e0e" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, "nvim-surround": { "branch": "main", "commit": "4f0e1f470595af067eca9b872778d83c7f52f134" }, - "nvim-treesitter": { "branch": "master", "commit": "4199be485cd85662d8ff1dc8c4cc78d819fad6cd" }, + "nvim-treesitter": { "branch": "master", "commit": "80f66cdef147bd8d8a619dfd9b18da37af5ceaf6" }, "nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, @@ -71,16 +71,16 @@ "scss-syntax.vim": { "branch": "master", "commit": "bda22a93d1dcfcb8ee13be1988560d9bb5bd0fef" }, "tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" }, "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, - "telescope.nvim": { "branch": "master", "commit": "4522d7e3ea75ffddabdc39957168a8a7060b5df0" }, + "telescope.nvim": { "branch": "master", "commit": "20bf20500c95208c3ac0ef07245065bf94dcab15" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, - "undotree": { "branch": "master", "commit": "3ff3aa02fd3a18d7fc5be9ed3166d36c545707fe" }, + "undotree": { "branch": "master", "commit": "170aa9e516b6926e6bddfe21bbf01f2283a00e7d" }, "vcscommand.vim": { "branch": "master", "commit": "2fb32681361f37533455d20aaa7fc6eb11b0fa4b" }, "vim-bazel": { "branch": "master", "commit": "31b0d5e4f51da1aeb56d65bf505a744e6de405de" }, "vim-better-whitespace": { "branch": "master", "commit": "1b22dc57a2751c7afbc6025a7da39b7c22db635d" }, "vim-floaterm": { "branch": "master", "commit": "6e81602e9d7ff7dc1c96c66fedc38fca1262d57c" }, "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-maktaba": { "branch": "master", "commit": "fe95bb10f6bb250943a44632107f6a3d76ce5f28" }, - "vim-matchup": { "branch": "master", "commit": "6dbe108230c7dbbf00555b7d4d9f6a891837ef07" }, + "vim-matchup": { "branch": "master", "commit": "d30b72d20f01478a8486f15a57c89fe3177373db" }, "vim-ripgrep": { "branch": "master", "commit": "2bb2425387b449a0cd65a54ceb85e123d7a320b8" }, "vim-searchindex": { "branch": "master", "commit": "b0788c8213210b3bd23b62847dd5a9ebbe4ad648" }, "vim-signify": { "branch": "master", "commit": "7d538b77a5a8806e344b057f8846f6d0c035efa9" }, diff --git a/vim/.vim/lua/plugins/base.lua b/vim/.vim/lua/plugins/base.lua index 255174b..8c665b9 100644 --- a/vim/.vim/lua/plugins/base.lua +++ b/vim/.vim/lua/plugins/base.lua @@ -80,12 +80,6 @@ return { require("libp").setup() end, }, - { - "folke/which-key.nvim", - config = function() - require("which-key").setup({}) - end, - }, { "mhinz/vim-signify", event = "VimEnter", diff --git a/vim/.vim/lua/plugins/cmp.lua b/vim/.vim/lua/plugins/cmp.lua index 522ea74..ffbffab 100644 --- a/vim/.vim/lua/plugins/cmp.lua +++ b/vim/.vim/lua/plugins/cmp.lua @@ -98,16 +98,16 @@ return { cmp.setup({ mapping = { - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.close(), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif has_words_before() then - cmp.complete() + -- elseif has_words_before() then + -- cmp.complete() else fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. end @@ -118,22 +118,6 @@ return { cmp.select_prev_item() end end, { "i", "s" }), - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. - end - end), - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. - end - end), }, preselect = cmp.PreselectMode.None, diff --git a/vim/.vim/lua/plugins/lsp_lines.lua b/vim/.vim/lua/plugins/lsp_lines.lua index 00fc984..0786e2f 100644 --- a/vim/.vim/lua/plugins/lsp_lines.lua +++ b/vim/.vim/lua/plugins/lsp_lines.lua @@ -1,21 +1,20 @@ return { url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + event = "VimEnter", name = "lsp_lines.nvim", config = function() - vim.diagnostic.config({ - -- virtual_lines = { only_current_line = true }, - virtual_lines = true, - update_on_insert = false, - virtual_text = false, - }) - require("lsp_lines").setup() + + vim.diagnostic.config({ virtual_text = false }) + vim.diagnostic.config({ virtual_lines = { highlight_whole_line = false, only_current_line = false } }) end, keys = { { "l", function() - require("lsp_lines").toggle() + local new_value = not vim.diagnostic.config().virtual_lines.only_current_line + vim.diagnostic.config({ virtual_lines = { only_current_line = new_value } }) + return new_value end, desc = "Toggle LSP Lines", }, diff --git a/vim/.vim/lua/plugins/telescope.lua b/vim/.vim/lua/plugins/telescope.lua index 5d109a9..9e63e3e 100644 --- a/vim/.vim/lua/plugins/telescope.lua +++ b/vim/.vim/lua/plugins/telescope.lua @@ -31,15 +31,15 @@ local function get_visual_selection() end local keys = { - { "ts", [[lua require("neoscopes").select()]], desc = "NeoScopes" }, - { "ts", "lua search_cwd()", desc = "[T]elescope [S]earch Directory" }, - { "tl", "lua live_grep()", desc = "[T]elescope [L]ive Grep" }, - - { "ff", ":Telescope current_buffer_fuzzy_find", desc = "[T]elescope [F]uzzy [F]ind" }, - { "tg", ":Telescope git_files", desc = "[T]elescope [G]it Files" }, - { "tr", ":Telescope resume", desc = "[T]elescope [R]esume" }, - { "t*", "lua require('telescope.builtin').grep_string{}", desc = "[T]elescope current [W]ord" }, + { "ts", "lua live_grep()", desc = "Search in CWD" }, + { "", "lua find_files()", desc = "Find Files in CWD" }, + { "tf", "lua find_files()", desc = "Find Files in CWD" }, + { "tf.", "lua search_cwd()", desc = "Find Files in Buffer Directory" }, + { "tg", ":Telescope git_files", desc = "Git Files" }, + { "tl", ":Telescope resume", desc = "Last Query" }, + { "tr", ":Telescope oldfiles", desc = "Recent Files" }, { "th", "lua require('telescope.builtin').help_tags{}", desc = "[T]elescope [H]elp" }, + { "tns", [[lua require("neoscopes").select()]], desc = "NeoScopes" }, } if use_google() then diff --git a/vim/.vim/lua/plugins/whichkey.lua b/vim/.vim/lua/plugins/whichkey.lua new file mode 100644 index 0000000..201d69c --- /dev/null +++ b/vim/.vim/lua/plugins/whichkey.lua @@ -0,0 +1,36 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + end, + config = function() + require("which-key").setup({}) + -- local wk = require("which-key") + -- + -- wk.register({ [";"] = { ":" } }, { mode = "v" }) + -- wk.register({ [";"] = { ":" } }, { mode = "n" }) + -- + -- wk.register({ + -- ["%%"] = { '=fnameescape(expand("%:p:h")."/")', "Current File Directory" }, + -- }, { mode = "c" }) + -- + -- wk.register({ + -- ["jk"] = { "" }, + -- ["J"] = { ":tabprevious" }, + -- ["K"] = { ":tabnext" }, + -- ["vv"] = { "v" }, + -- ["ss"] = { "s" }, + -- [""] = { ":w" }, + -- }) + -- + -- wk.register({ + -- t = { + -- name = "+tab", + -- t = { ":tabedit" }, + -- d = { ":tabclose" }, + -- }, + -- }) + end, +} diff --git a/vim/.vim/prefs/mappings.vim b/vim/.vim/prefs/mappings.vim index 8e03f10..e144e92 100644 --- a/vim/.vim/prefs/mappings.vim +++ b/vim/.vim/prefs/mappings.vim @@ -30,11 +30,6 @@ nnoremap K :tabnext nnoremap tt :tabedit nnoremap td :tabclose -" Shift-U and D for document navigation(page up, page down) -nnoremap -map -nnoremap - " Line swapping. I don't really use this that often nnoremap [e :execute 'move -1-'. v:count1 nnoremap ]e :execute 'move +'. v:count1 diff --git a/vim/.vim/prefs/ui.vim b/vim/.vim/prefs/ui.vim deleted file mode 100644 index 74342e5..0000000 --- a/vim/.vim/prefs/ui.vim +++ /dev/null @@ -1,16 +0,0 @@ -" disable/enable the cursor line on window enter/exit -au WinEnter * setlocal cursorline -au WinLeave * setlocal nocursorline - -highlight ExtraWhitespace ctermbg=red - -" enable extra syntax hilighting for C++ -let g:cpp_class_scope_highlight = 1 -let g:cpp_experimental_template_highlight = 1 - -" Function to let me know what syntax hilighting group is under the cursor. -" Not used often -function! SynGroup() - let l:s = synID(line('.'), col('.'), 1) - echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') -endfun diff --git a/vim/.vimrc b/vim/.vimrc index a9e5854..21cc14e 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -71,7 +71,6 @@ lua require('plugin_init') source ~/.vim/prefs/mappings.vim source ~/.vim/prefs/leader.vim -source ~/.vim/prefs/ui.vim set noshowmode set encoding=utf-8