diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-09 22:33:50 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-09 22:33:50 +0300 |
| commit | ff13fce3739ef8c09d08a48b058363d2f7fb6c11 (patch) | |
| tree | 9c10347fd28fd0b9c0bb13ddfae3197f571cae58 /.config | |
| parent | 79905005126b9638390366c6206d669a0d3d723f (diff) | |
Neovim: almost finished with git integration, did minor unrelated tweaks
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/lazy-lock.json | 55 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/git.lua | 62 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/TODO-git.lua | 32 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/TODO-overseer.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/motions.lua | 8 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/neotree.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/todo-comments.lua | 4 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/ui.lua | 6 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/utility.lua | 9 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/telescope.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/plugin/options.lua | 13 |
11 files changed, 121 insertions, 73 deletions
diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index b1d128e..b59ecc2 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,8 +1,8 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, + "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" }, "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, - "auto-session": { "branch": "main", "commit": "879f5b30207bd53101e1034ca91330f23746f601" }, + "auto-session": { "branch": "main", "commit": "df99506c3a68890c80ed60be4c63ed96131e0c0c" }, "awesome-vim-colorschemes": { "branch": "master", "commit": "ae5e02298c8de6a5aa98fe4d29a21874cfcc3619" }, "bluloco.nvim": { "branch": "main", "commit": "e7586def35c3584f1cc71fecf3e89e53dc4a40c6" }, "ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" }, @@ -13,60 +13,61 @@ "darcula-solid.nvim": { "branch": "main", "commit": "d950b9ca20096313c435a93e57af7815766f3d3d" }, "darkstorm.nvim": { "branch": "master", "commit": "bab84a698e5a7bec92bd9d24acbd54554502e35e" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "edgy.nvim": { "branch": "main", "commit": "a8bc1d24798c80a391f1a5d898a50c41a7f93883" }, + "edgy.nvim": { "branch": "main", "commit": "1fe28978ab5671e9534fca40dca10280430ba727" }, "fidget.nvim": { "branch": "main", "commit": "c12f8a58ee472ce5983c3a3f3aad0ff6c49a6a83" }, "ftFT.nvim": { "branch": "master", "commit": "f3e43c9584e14b27f04c27a95a9d9f0e58dfec02" }, "github-nvim-theme": { "branch": "main", "commit": "4f44a5c930372c85483d02700f332d34417e50b2" }, - "gitsigns.nvim": { "branch": "main", "commit": "82bc6225e958411a6846b27ac7c21bf8af1f72e4" }, + "gitsigns.nvim": { "branch": "main", "commit": "220446c8c86a280180d852efac60991eaf1a21d4" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4288ce8128a52650e401dda42fd7651a6038f262" }, - "kanagawa.nvim": { "branch": "master", "commit": "b4110528b4a12c295efd3ae222882469b2b44d4a" }, - "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" }, - "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, - "leap.nvim": { "branch": "main", "commit": "eca8108dcd5f41fbde2a674dceb58b81ed887dc8" }, + "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, + "kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" }, + "lazy.nvim": { "branch": "main", "commit": "159036c5762a97246689299e61311fc88523a8fa" }, + "lazydev.nvim": { "branch": "main", "commit": "cea5d0fb556cdc35122d9cae772e7e0ed65b4505" }, + "leap.nvim": { "branch": "main", "commit": "c099aecaf858574909bd38cbadb8543c4dd16611" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, "lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, - "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" }, "material.nvim": { "branch": "main", "commit": "b5d0ff3ad37ba00cea3dc3dce0b0f555b481c6f4" }, "min-theme.nvim": { "branch": "main", "commit": "23ea3e1dd9e281973b4732cea0968f6d2ab72c47" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, - "neovim": { "branch": "main", "commit": "e10c9c6436556405ec6b187fd459a718f5c55156" }, + "neogit": { "branch": "master", "commit": "a20031fb5d7d12148764764059243135085e5c9b" }, + "neovim": { "branch": "main", "commit": "dded5c15e9d27ac95ad1e803b35a752d80f3f42b" }, "nightfox.nvim": { "branch": "main", "commit": "df75a6a94910ae47854341d6b5a6fd483192c0eb" }, - "none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" }, - "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, - "nvim": { "branch": "main", "commit": "31fcfb02c47952d5c75aec893b93b2878abe5fbb" }, - "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, + "none-ls.nvim": { "branch": "main", "commit": "0d1b3fa2ad0b371b94cb4b9a27ba6e5a1a915c91" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "nvim": { "branch": "main", "commit": "2d3419c2aead379b7d1854d32458f20ffaa58562" }, + "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lspconfig": { "branch": "master", "commit": "bd7c76375a511994c9ca8d69441f134dc10ae3bd" }, + "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" }, "nvim-neoclip.lua": { "branch": "main", "commit": "709c97fabec9da7d04f7d2f5e207423af8c02871" }, "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, - "nvim-spectre": { "branch": "master", "commit": "49fae98ef2bfa8342522b337892992e3495065d5" }, + "nvim-spectre": { "branch": "master", "commit": "9a28f926d3371b7ef02243cbbb653a0478d06e31" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, - "nvim-treesitter": { "branch": "master", "commit": "2e9c346aefda680bd14ebf40a50c2897fd637bc2" }, + "nvim-treesitter": { "branch": "master", "commit": "c1ad655b6a0c83ab48e55240f367e2bc0c15af31" }, "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, - "octo.nvim": { "branch": "master", "commit": "7731ca4e31b32c176a383642ffcd7d593ac17774" }, - "oil.nvim": { "branch": "master", "commit": "65c53dbe4f2140236590a7568a5f22a77d16be39" }, + "octo.nvim": { "branch": "master", "commit": "aa5dfa573220a0a511a25ee14ce1570b6c23e56a" }, + "oil.nvim": { "branch": "master", "commit": "10fbfdd37b6904c0776c5db1a27ab47eecba335e" }, "okai": { "branch": "main", "commit": "b028c2916c39b1c4ad53756d262f9d0576edac87" }, "overseer.nvim": { "branch": "master", "commit": "433ae548434d83ab3c6afe6afc549832f7dd56f1" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "spaceduck": { "branch": "main", "commit": "350491f19343b24fa85809242089caa02d4dadce" }, "sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" }, - "tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" }, - "trouble.nvim": { "branch": "main", "commit": "0fe430e953a6c47433ef923555dfe9a42351113a" }, + "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, + "tokyonight.nvim": { "branch": "main", "commit": "0a84c2df1dc65610ee0d9b516b2fb342e4b0ed6f" }, + "trouble.nvim": { "branch": "main", "commit": "4453fea6bb597830fbd58d2c484612f37b97bd8c" }, "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, - "vim-fugitive": { "branch": "master", "commit": "d0c1a437536778bcc8174b7cb2ffdf98f611e6fe" }, + "vim-fugitive": { "branch": "master", "commit": "8c8cdf4405cb8bdb70dd9812a33bb52363a87dbc" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, - "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "vim-wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" } }
\ No newline at end of file diff --git a/.config/nvim/lua/custom/git.lua b/.config/nvim/lua/custom/git.lua new file mode 100644 index 0000000..b30deb5 --- /dev/null +++ b/.config/nvim/lua/custom/git.lua @@ -0,0 +1,62 @@ +local set = vim.keymap.set +local gitsigns = require('gitsigns') +gitsigns.setup() +require('neogit').setup({}) +require('octo').setup() +require('diffview').setup({ + enhanced_diff_hl = true, + default = { winbar_info = true }, + keymaps = { + view = { + { 'n', 'q', '<cmd>DiffviewClose<cr>', { desc = 'Quit the diffview' } }, + }, + file_panel = { + { 'n', 'q', '<cmd>DiffviewClose<cr>', { desc = 'Quit the diffview' } }, + }, + file_history_panel = { + { 'n', 'q', '<cmd>DiffviewClose<cr>', { desc = 'Quit the diffview' } }, + }, + }, +}) + +vim.treesitter.language.register('markdown', 'octo') +-- Autocomplete for @ (user mention) and # (issue) +-- Works in GitHub issues/PRs (for octo.nvim) +vim.api.nvim_create_autocmd('FileType', { + pattern = 'octo', + callback = function() + vim.keymap.set('i', '@', '@<C-x><C-o>', { silent = true, buffer = true }) + vim.keymap.set('i', '#', '#<C-x><C-o>', { silent = true, buffer = true }) + end, +}) + +-- GitHub keymaps +set('n', '<leader>gi', '<cmd>Octo issue search<cr>', { desc = '[G]ithub [I]ssues' }) +set('n', '<leader>pr', '<cmd>Octo issue search<cr>', { desc = 'Github [PR]s' }) + +-- Git keymaps +set('n', '<leader>gb', gitsigns.toggle_current_line_blame, { desc = '[G]it [B]lame Line' }) +set('n', '<leader>gD', gitsigns.toggle_deleted, { desc = '[G]it [D]eleted' }) +set('n', '<leader>gd', '<cmd>DiffviewOpen<cr>', { desc = '[G]it [D]iff' }) +set('n', '<leader>gl', '<cmd>DiffviewFileHistory<cr>', { desc = '[G]it [L]og' }) +set('n', '<leader>gs', '<cmd>Neogit<cr>', { desc = '[G]it [S]tatus' }) +set('n', '<leader>ga', 'TODO:', { desc = '[G]it [A]dd' }) +set('n', '<leader>gc', 'TODO:', { desc = '[G]it [C]ommit' }) +set('n', '<leader>gp', 'TODO:', { desc = '[G]it [P]ush' }) +set('n', '<leader>gP', 'TODO:', { desc = '[G]it [P]ull' }) + +-- Hunk Keymaps +local function stage_visual_chunk() + gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) +end +local function reset_visual_chunk() + gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) +end +set('n', '<leader>hp', gitsigns.preview_hunk, { desc = '[H]unk [P]review' }) +set('n', '<leader>hs', gitsigns.stage_hunk, { desc = '[H]unk [S]tage' }) +set('n', '<leader>hr', gitsigns.reset_hunk, { desc = '[H]unk [R]eset' }) +set('v', '<leader>hs', stage_visual_chunk, { desc = '[H]unk [S]tage' }) +set('v', '<leader>hr', reset_visual_chunk, { desc = '[H]unk [S]tage' }) +set('n', '<leader>hS', gitsigns.stage_buffer, { desc = '[S]tage Buffer' }) +set('n', '<leader>hR', gitsigns.reset_buffer, { desc = '[R]eset Buffer' }) +set('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = '[H]unk [U]ndo' }) diff --git a/.config/nvim/lua/custom/plugins/TODO-git.lua b/.config/nvim/lua/custom/plugins/TODO-git.lua index bd022b9..565d19c 100644 --- a/.config/nvim/lua/custom/plugins/TODO-git.lua +++ b/.config/nvim/lua/custom/plugins/TODO-git.lua @@ -1,28 +1,14 @@ return { - { + 'NeogitOrg/neogit', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', + 'sindrets/diffview.nvim', + 'tpope/vim-fugitive', 'lewis6991/gitsigns.nvim', - config = function() - require('gitsigns').setup() - vim.keymap.set('n', '<leader>gp', ':Gitsigns preview_hunk<cr>', { desc = '[G]it [P]review' }) - vim.keymap.set('n', '<leader>gb', ':Gitsigns toggle_current_line_blame<cr>', { desc = '[G]it [B]lame' }) - end, - }, - { 'tpope/vim-fugitive' }, - { 'sindrets/diffview.nvim' }, - { 'pwntester/octo.nvim', - config = function() - require('octo').setup() - vim.treesitter.language.register('markdown', 'octo') - - vim.api.nvim_create_autocmd('FileType', { - pattern = 'octo', - callback = function() - vim.keymap.set('i', '@', '@<C-x><C-o>', { silent = true, buffer = true }) - vim.keymap.set('i', '#', '#<C-x><C-o>', { silent = true, buffer = true }) - end, - }) - vim.keymap.set('n', '<leader>gi', ':Octo issue search<cr>', { desc = '[G]thub [I]ssues' }) - end, }, + config = function() + require('custom.git') + end, } diff --git a/.config/nvim/lua/custom/plugins/TODO-overseer.lua b/.config/nvim/lua/custom/plugins/TODO-overseer.lua index 6362f2a..a597f51 100644 --- a/.config/nvim/lua/custom/plugins/TODO-overseer.lua +++ b/.config/nvim/lua/custom/plugins/TODO-overseer.lua @@ -5,6 +5,6 @@ return { require('overseer').setup({ templates = { 'builtin', 'user.c_build_make' }, }) - vim.keymap.set('n', '<leader>r', ':OverseerRun<cr>', { desc = '[R]un Task' }) + vim.keymap.set('n', '<leader>r', '<cmd>OverseerRun<cr>', { desc = '[R]un Task' }) end, } diff --git a/.config/nvim/lua/custom/plugins/motions.lua b/.config/nvim/lua/custom/plugins/motions.lua index 71abb97..b06981c 100644 --- a/.config/nvim/lua/custom/plugins/motions.lua +++ b/.config/nvim/lua/custom/plugins/motions.lua @@ -2,10 +2,10 @@ return { { 'christoomey/vim-tmux-navigator', config = function() - vim.keymap.set('n', 'C-h', ':TmuxNavigatorLeft<CR>') - vim.keymap.set('n', 'C-j', ':TmuxNavigatorDown<CR>') - vim.keymap.set('n', 'C-k', ':TmuxNavigatorUp<CR>') - vim.keymap.set('n', 'C-l', ':TmuxNavigatorRight<CR>') + vim.keymap.set('n', 'C-h', '<cmd>TmuxNavigatorLeft<CR>') + vim.keymap.set('n', 'C-j', '<cmd>TmuxNavigatorDown<CR>') + vim.keymap.set('n', 'C-k', '<cmd>TmuxNavigatorUp<CR>') + vim.keymap.set('n', 'C-l', '<cmd>TmuxNavigatorRight<CR>') end, }, { diff --git a/.config/nvim/lua/custom/plugins/neotree.lua b/.config/nvim/lua/custom/plugins/neotree.lua index b8a4ee9..661ab40 100644 --- a/.config/nvim/lua/custom/plugins/neotree.lua +++ b/.config/nvim/lua/custom/plugins/neotree.lua @@ -10,6 +10,6 @@ return { open_files_do_not_replace_types = { 'terminal', 'Trouble', 'qf', 'edgy' }, }, config = function() - vim.keymap.set('n', '<leader>nt', ':Neotree toggle reveal left<cr>', { desc = '[N]eotree [T]oggle' }) + vim.keymap.set('n', '<leader>nt', '<cmd>Neotree toggle reveal left<cr>', { desc = '[N]eotree [T]oggle' }) end, } diff --git a/.config/nvim/lua/custom/plugins/todo-comments.lua b/.config/nvim/lua/custom/plugins/todo-comments.lua index a404874..6d8b58f 100644 --- a/.config/nvim/lua/custom/plugins/todo-comments.lua +++ b/.config/nvim/lua/custom/plugins/todo-comments.lua @@ -88,7 +88,7 @@ return { -- pattern = [[\b(KEYWORDS)\b]], }, }) - vim.keymap.set('n', '<leader>st', ':TodoTelescope keywords=TODO,FIX<cr>', { desc = '[S]earch [T]odos' }) - vim.keymap.set('n', '<leader>lt', ':TodoTrouble<cr>', { desc = '[L]ist [T]odos' }) + vim.keymap.set('n', '<leader>st', '<cmd>TodoTelescope keywords=TODO,FIX<cr>', { desc = '[S]earch [T]odos' }) + vim.keymap.set('n', '<leader>lt', '<cmd>TodoTrouble<cr>', { desc = '[L]ist [T]odos' }) end, } diff --git a/.config/nvim/lua/custom/plugins/ui.lua b/.config/nvim/lua/custom/plugins/ui.lua index 052be12..e5f06f9 100644 --- a/.config/nvim/lua/custom/plugins/ui.lua +++ b/.config/nvim/lua/custom/plugins/ui.lua @@ -16,14 +16,14 @@ return { auto_enable = true, }, }) - vim.keymap.set('n', '<leader>cp', ':CccPick<cr>', { desc = '[C]olor [P]icker' }) - vim.keymap.set('n', '<leader>ct', ':CccHighlighterToggle<cr>', { desc = '[C]olor [T]oggle' }) + vim.keymap.set('n', '<leader>cp', '<cmd<CccPick<cr>', { desc = '[C]olor [P]icker' }) + vim.keymap.set('n', '<leader>ct', '<cmd>CccHighlighterToggle<cr>', { desc = '[C]olor [T]oggle' }) end, }, { 'RRethy/vim-illuminate', config = function() - vim.keymap.set('n', '<leader>it', ':IlluminateToggle<cr>', { desc = '[I]lluminate [Tloggle]' }) + vim.keymap.set('n', '<leader>it', '<cmd>IlluminateToggle<cr>', { desc = '[I]lluminate [Tloggle]' }) end, }, { diff --git a/.config/nvim/lua/custom/plugins/utility.lua b/.config/nvim/lua/custom/plugins/utility.lua index 79eac83..4951f05 100644 --- a/.config/nvim/lua/custom/plugins/utility.lua +++ b/.config/nvim/lua/custom/plugins/utility.lua @@ -11,10 +11,7 @@ return { vim.keymap.set('n', '<C-s>', session.search_session, { desc = '[S]ession Manager' }) end, }, - { - 'wakatime/vim-wakatime', - lazy = false, - }, + { 'wakatime/vim-wakatime', lazy = false }, { 'AckslD/nvim-neoclip.lua', dependencies = { @@ -34,7 +31,7 @@ return { }, }) -- NOTE: Using `plus` to set the plus register to the selected value - vim.keymap.set('n', '<leader>nc', ':Telescope neoclip plus<cr>', { desc = '[N]eo[c]lip History' }) + vim.keymap.set('n', '<leader>nc', '<cmd>Telescope neoclip plus<cr>', { desc = '[N]eo[c]lip History' }) end, }, { @@ -54,5 +51,5 @@ return { -- NOTE: No keybindings, use `:Spectre` or `:Spectre <file>` -- Spectre has no undo, so it should be rarely used, -- which is why no keybindings are defined - { 'nvim-pack/nvim-spectre', }, + { 'nvim-pack/nvim-spectre' }, } diff --git a/.config/nvim/lua/custom/telescope.lua b/.config/nvim/lua/custom/telescope.lua index bb6ec62..2be1c78 100644 --- a/.config/nvim/lua/custom/telescope.lua +++ b/.config/nvim/lua/custom/telescope.lua @@ -43,6 +43,7 @@ vim.keymap.set('n', '<leader>ps', builtin.lsp_workspace_symbols, { desc = '[P]ro vim.keymap.set('n', '<leader>sb', builtin.git_branches, { desc = '[S]earch [B]ranches' }) vim.keymap.set('n', '<leader>sc', builtin.git_commits, { desc = '[S]earch [C]ommits' }) + -- TODO: Look into the following -- builtin.git_commits -- builtin.git_branches diff --git a/.config/nvim/plugin/options.lua b/.config/nvim/plugin/options.lua index 79a0f46..4a2da62 100644 --- a/.config/nvim/plugin/options.lua +++ b/.config/nvim/plugin/options.lua @@ -1,14 +1,14 @@ -- System vim.g.have_nerd_font = true -vim.opt.mouse = 'a' -- enable mouse +vim.opt.mouse = 'a' -- enable mouse vim.opt.clipboard = 'unnamedplus' -- use system clipboard -vim.opt.undofile = true -- Persist undo history by saving it to a file +vim.opt.undofile = true -- Persist undo history by saving it to a file -- Tab vim.opt.expandtab = true -- convert tabs to spaces -vim.opt.tabstop = 4 -- number of visual spaces per TAB -vim.opt.softtabstop = 4 -- number of idfk tab when editing -vim.opt.shiftwidth = 4 -- number of spaces to insert on tab +vim.opt.tabstop = 4 -- number of visual spaces per TAB +vim.opt.softtabstop = 4 -- number of idfk tab when editing +vim.opt.shiftwidth = 4 -- number of spaces to insert on tab -- UI vim.opt.signcolumn = 'auto:9' @@ -21,6 +21,7 @@ vim.opt.showmode = false -- don't show mode, because lualine already does vim.opt.list = true vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } vim.diagnostic.config({ signs = false }) -- disable signcolumn diagnostics +vim.opt.fillchars:append({ diff = '╱' }) -- nicer diff view for filled spaces -- Searching vim.opt.hlsearch = true @@ -33,7 +34,7 @@ vim.opt.wrap = false vim.opt.scrolloff = 8 vim.opt.undofile = true vim.opt.termguicolors = true -vim.opt.laststatus = 3 -- views can only be fully collapsed with the global statusline +vim.opt.laststatus = 3 -- views can only be fully collapsed with the global statusline vim.opt.splitkeep = 'screen' -- for edgy.nvim vim.opt.inccommand = 'split' -- shows preview for commands like :%s/from/to |
