From 565cbf064a1991729705d86e32408306826e9ab7 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 25 Jan 2025 22:22:13 +0100 Subject: [PATCH] neovim changes --- .config/fish/alias.fish | 11 ++- .config/nvim/lazy-lock.json | 52 ++++++------ .config/nvim/lua/BluePlum/keymap.lua | 105 ++++++++++++++++-------- .config/nvim/lua/BluePlum/set.lua | 7 +- .config/nvim/lua/BluePlum/utility.lua | 69 ---------------- .config/nvim/lua/lsp.lua | 17 ++++ .config/nvim/lua/plugins/additions.lua | 31 ++++++- .config/nvim/lua/plugins/deco.lua | 2 + .config/nvim/lua/plugins/emacs.lua | 1 + .config/nvim/lua/plugins/fold.lua | 105 ++++++++++++------------ .config/nvim/lua/plugins/format.lua | 12 ++- .config/nvim/lua/plugins/lsp.lua | 30 +++++-- .config/nvim/lua/plugins/nav.lua | 8 +- .config/nvim/lua/plugins/treesitter.lua | 2 + 14 files changed, 253 insertions(+), 199 deletions(-) delete mode 100644 .config/nvim/lua/BluePlum/utility.lua diff --git a/.config/fish/alias.fish b/.config/fish/alias.fish index 73ea7d1..f5b83a9 100644 --- a/.config/fish/alias.fish +++ b/.config/fish/alias.fish @@ -13,8 +13,13 @@ alias us 'layout -t us' alias sv 'layout -t se' # SSH -alias louis 'echo "$(set_color red)You changed this dimwit, use \'vpn\' instead"' +alias louis 'vpn --enable && ssh anton@192.168.178.48' + +alias wgon 'echo "$(set_color red)You changed this dimwit, use \'vpn\' instead"' +alias wgoff 'echo "$(set_color red)You changed this dimwit, use \'vpn\' instead"' # Git -alias glog 'git log --graph --abbrev-commit --decorate --format=format:\'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)\'' -alias gref 'git show -s --pretty=reference ' +#alias glog 'git log --graph --abbrev-commit --decorate --format=format:\'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)\'' +#alias gref 'git show -s --pretty=reference ' +alias glog 'git lg' +alias gref 'git ref' diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 2897c1c..c83ee41 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,33 +1,35 @@ { - "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" }, - "baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "compile-mode.nvim": { "branch": "main", "commit": "2bf8381871bf7a9dad347938ddef6b09a1735bdb" }, - "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "compile-mode.nvim": { "branch": "main", "commit": "8dff8d8472363e01499a4e8cc02f5f5595ce3922" }, + "cord.nvim": { "branch": "client-server", "commit": "33d20ab3ea7ea5a38a5a569abc1409d4e5a43024" }, + "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, "formatter.nvim": { "branch": "fix-305-index-out-of-bounds", "commit": "a8a8b196c9ca37afa53f7ee30a98a343bbbca325" }, "gruber-darker.nvim": { "branch": "main", "commit": "a2dda61d9c1225e16951a51d6b89795b0ac35cd6" }, - "inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" }, - "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, - "lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" }, - "lsp_signature.nvim": { "branch": "master", "commit": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b" }, - "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, - "markview.nvim": { "branch": "main", "commit": "67b69cdaf9055bebac3682a070d7e5c8eecba29c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "inc-rename.nvim": { "branch": "main", "commit": "f9b9e5b9a75074810f40881b7e254b5bbeaf122e" }, + "lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" }, + "lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" }, + "lsp_signature.nvim": { "branch": "master", "commit": "5b64964ed02098c85613ee3d20f96bed1dfb64cc" }, + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, + "markview.nvim": { "branch": "main", "commit": "6e9f1840ba33e5318285ad97c22676f55b753479" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "neoscroll.nvim": { "branch": "master", "commit": "81c47f9d111c00d13111b65bfd13cc81b7b347a1" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-lspconfig": { "branch": "master", "commit": "ff69ecca55d83ffc70657f260a799f79a5637831" }, - "nvim-treesitter": { "branch": "master", "commit": "9b1e607298dd5fc2ee6549488324cc92dafb99c0" }, - "nvim-ufo": { "branch": "main", "commit": "203c9f434feec57909ab4b1e028abeb3349b7847" }, - "nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" }, - "oil.nvim": { "branch": "master", "commit": "ccab9d5e09e2d0042fbbe5b6bd05e82426247067" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "rustaceanvim": { "branch": "master", "commit": "d1f56672638508a7bc971cde31a29df4018579a9" }, - "smear-cursor.nvim": { "branch": "main", "commit": "78c42170f9326fb70d09aff2184c81189eddf144" }, - "telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" }, - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" } + "nvim-lspconfig": { "branch": "master", "commit": "b4d65bce97795438ab6e1974b3672c17a4865e3c" }, + "nvim-treesitter": { "branch": "master", "commit": "51562d44fc6280f92bb9a3d87e7b3cb327377ca5" }, + "nvim-ufo": { "branch": "main", "commit": "4c64d89c2bf174d95d4ac91cc959a9e43e2f318c" }, + "nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" }, + "oil.nvim": { "branch": "master", "commit": "83ac5185f79ab8d869bccea792dc516ad02ad06e" }, + "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, + "smear-cursor.nvim": { "branch": "main", "commit": "791bd7871e612b17520cbde19ddede306d83ef11" }, + "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "vim-fugitive": { "branch": "master", "commit": "d74a7cff4cfcf84f83cc7eccfa365488f3bbabc2" }, + "vim-grepper": { "branch": "master", "commit": "f1b441c23f0227b28c36be383b562ab47dbecec4" } } diff --git a/.config/nvim/lua/BluePlum/keymap.lua b/.config/nvim/lua/BluePlum/keymap.lua index f3119b4..1230e63 100644 --- a/.config/nvim/lua/BluePlum/keymap.lua +++ b/.config/nvim/lua/BluePlum/keymap.lua @@ -1,58 +1,93 @@ -vim.keymap.set('i', '', ':move-2i') -vim.keymap.set('i', '', ':move+i') +local set = vim.keymap.set -vim.keymap.set('n', '', 'zz') -vim.keymap.set('n', '', 'zz') +set('i', '', ':move-2i') +set('i', '', ':move+i') + +set('n', '', 'zz') +set('n', '', 'zz') -- yank to clipboard with leader -vim.keymap.set('n', 'y', '"+y') -vim.keymap.set('v', 'y', '"+y') +set('n', 'y', '"+y') +set('v', 'y', '"+y') -vim.keymap.set('n', 'Q', '') +set('n', 'Q', '') -- terminal -vim.keymap.set('n', 't', ':term') -vim.keymap.set('t', '', '') +-- set('n', 't', ':split:term') +OpenTerminal = nil +PreviousBuffer = -1 +set('n', 't', function() + if vim.api.nvim_get_current_buf() == OpenTerminal and PreviousBuffer ~= -1 then + vim.api.nvim_set_current_buf(PreviousBuffer) + PreviousBuffer = -1 + return + end + + PreviousBuffer = vim.api.nvim_get_current_buf() + if OpenTerminal ~= nil then + vim.api.nvim_set_current_buf(OpenTerminal) + else + vim.cmd.term() + OpenTerminal = vim.api.nvim_get_current_buf() + vim.api.nvim_create_autocmd({ 'BufDelete' }, { + callback = function(args) + if args.buf == OpenTerminal then + OpenTerminal = nil + end + end, + }) + end +end) +set('t', '', '') -- nice additions -vim.keymap.set('n', 'er', function() +set('n', 'er', function() vim.diagnostic.open_float() end) -vim.keymap.set('n', 'l', ':e#') --- vim.keymap.set('n', 'ca', ':CodeActionMenu') --- vim.keymap.set('n', 'cn', ':IncRename ') +set('n', 'l', ':e#') +-- set('n', 'ca', ':CodeActionMenu') +-- set('n', 'cn', ':IncRename ') -vim.keymap.set('n', 'i', 'cc') +set('n', 'i', 'cc') -- peek -vim.keymap.set('n', 'p', vim.lsp.buf.hover) +set('n', 'p', vim.lsp.buf.hover) -- Scratch pad -vim.keymap.set( +set( 'n', 's', ':bo vs:enew:setlocal noswapfile:setlocal bufhidden=hide:setlocal buftype=nofile:set filetype=markdown:set syntax=markdown' ) -- Help -vim.cmd.cnoreabbrev('h vert h') -vim.keymap.set('n', 'h', ':h ') - --- Windows -vim.keymap.set('n', 'q', function() - if vim.bo.modified then - if Confirm('Buffer has unsaved changes; write?') then - vim.cmd.write() - vim.cmd.bdelete() - else - vim.cmd('bd!') - end - else - vim.cmd.bdelete() - end -end) +-- vim.cmd.cnoreabbrev('h vert h') +-- set('n', 'h', ':h ') -- Comp mode -vim.keymap.set('n', 'c', ':Compile') -vim.keymap.set('n', 'cs', ':CompileInterrupt') +set('n', 'c', ':Compile') +set('n', 'cs', ':CompileInterrupt') -vim.keymap.set('n', 'E', ':NextError') +set('n', 'E', ':NextError') + +-- Windows +set('n', '', 'q') +set('n', '', '') +set('n', '', '') +set('n', '', '') +set('n', '', '') + +set('n', '', 'tH') + +Fullscreen = false +set('n', '', function() + if Fullscreen then + print('full screen') + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('_|', true, false, true), 'm', false) + else + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('=', true, false, true), 'm', false) + end + Fullscreen = not Fullscreen +end) + +-- Generic +set('n', 'q', ':bd!') diff --git a/.config/nvim/lua/BluePlum/set.lua b/.config/nvim/lua/BluePlum/set.lua index 0a2410b..e4593fe 100644 --- a/.config/nvim/lua/BluePlum/set.lua +++ b/.config/nvim/lua/BluePlum/set.lua @@ -17,7 +17,7 @@ vim.g.mapleader = ' ' -- Terminal vim.g.termguicolors = true -vim.g.terminal_emulator = 'kitty' +vim.opt.shell = '/bin/fish' -- LSP vim.lsp.inlay_hint.enable() @@ -39,6 +39,11 @@ vim.api.nvim_create_autocmd('FileType', { command = 'setlocal linebreak', }) +vim.cmd.cnoreabbrev('grep', 'Grepper') + -- Search vim.opt.hlsearch = false vim.opt.incsearch = true + +-- Make dotfile navigation bareble +vim.api.nvim_create_user_command('Dot', 'edit ~/.config/nvim', {}) diff --git a/.config/nvim/lua/BluePlum/utility.lua b/.config/nvim/lua/BluePlum/utility.lua deleted file mode 100644 index 9dea39d..0000000 --- a/.config/nvim/lua/BluePlum/utility.lua +++ /dev/null @@ -1,69 +0,0 @@ -local M = {} - -return M - --- function Ask(msg) --- vim.cmd.echohl('Question') --- vim.cmd.echo('"' .. msg .. '"') --- vim.cmd.echohl() --- end --- --- function Confirm(msg) --- Ask(msg .. ' [Y/n] ') --- --- local answer = vim.fn.getchar() --- return answer ~= 110 and answer ~= 27 and answer ~= 37 -- 'n', , --- end --- --- function Input(prompt, last) --- local buffer = '' --- while true do --- vim.cmd('redraw | echo') --- vim.api.nvim_echo({ --- { prompt, 'Question' }, --- last and { last, 'Visual' } or { buffer, 'Normal' }, --- }, false, {}) --- --- local character = vim.fn.getchar() --- if pcall(function(char) --- if vim.fn.keytrans(char) ~= '' then --- error() --- end --- end, character) then --- last = nil --- buffer = vim.fn.slice(buffer, 0, -1) --- elseif character == 27 then --- vim.cmd('redraw | echo') --- return nil --- elseif character == 13 then --- return last or buffer --- elseif --- (character == 32 or pcall(function(char) --- if vim.fn.keytrans(char) ~= '' then --- error() --- end --- end, character)) and last --- then --- buffer = last --- if character == 32 then --- buffer = buffer .. ' ' --- end --- last = nil --- else --- last = nil --- buffer = buffer .. vim.fn.nr2char(character) --- end --- end --- end --- --- vim.ui.input = function(opts, after) --- local prompt = (opts.prompt or 'Enter input') .. ' > ' --- if prompt == 'Compile command: ' then --- prompt = 'Enter command' --- end --- local last = opts.default or '' --- --- return (after or function(x) --- print('Unhandled data: ' .. x) --- end)(Input(prompt, last)) --- end diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index dc13f97..e0c3e1e 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -129,6 +129,23 @@ cmp.setup({ }, }) +cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'buffer' }, + }), +}) + +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' }, + }, { + { name = 'cmdline' }, + }), + matching = { disallow_symbol_nonprefix_matching = false }, +}) + -- #region Highlight groups -- Customization for Pmenu diff --git a/.config/nvim/lua/plugins/additions.lua b/.config/nvim/lua/plugins/additions.lua index 8050417..e8d3a8b 100644 --- a/.config/nvim/lua/plugins/additions.lua +++ b/.config/nvim/lua/plugins/additions.lua @@ -11,9 +11,32 @@ return { }, { 'aznhe21/actions-preview.nvim', - config = function() - require('actions-preview').setup({}) - vim.keymap.set('n', 'ca', require('actions-preview').code_actions) - end, + keys = { { + 'ca', + function() + require('actions-preview').code_actions() + end, + } }, + opts = {}, + -- config = function() + -- require('actions-preview').setup({}) + -- vim.keymap.set('n', 'ca', require('actions-preview').code_actions) + -- end, + }, + { + 'vyfor/cord.nvim', + event = 'VeryLazy', + branch = 'client-server', + build = ':Cord update', + opts = {}, + }, + { + 'tpope/vim-fugitive', + cmd = { 'Git' }, + }, + { + 'mhinz/vim-grepper', + cmd = { 'GrepperRg' }, + opts = {}, }, } diff --git a/.config/nvim/lua/plugins/deco.lua b/.config/nvim/lua/plugins/deco.lua index cc38852..0115b5b 100644 --- a/.config/nvim/lua/plugins/deco.lua +++ b/.config/nvim/lua/plugins/deco.lua @@ -22,6 +22,8 @@ return { 'sphamba/smear-cursor.nvim', opts = { time_interval = 10, + legacy_computing_symbols_support = true, + cursor_color = '#fcdc34', }, }, } diff --git a/.config/nvim/lua/plugins/emacs.lua b/.config/nvim/lua/plugins/emacs.lua index b623e83..44b2dfe 100644 --- a/.config/nvim/lua/plugins/emacs.lua +++ b/.config/nvim/lua/plugins/emacs.lua @@ -1,6 +1,7 @@ return { { 'ej-shafran/compile-mode.nvim', + enabled = false, dependencies = { 'nvim-lua/plenary.nvim', 'm00qek/baleia.nvim', diff --git a/.config/nvim/lua/plugins/fold.lua b/.config/nvim/lua/plugins/fold.lua index 8ca9727..2e0727c 100644 --- a/.config/nvim/lua/plugins/fold.lua +++ b/.config/nvim/lua/plugins/fold.lua @@ -1,63 +1,64 @@ return { { - 'kevinhwang91/nvim-ufo', - dependencies = { - { - 'kevinhwang91/promise-async', - }, - }, - config = function() - -- Implement custom marker provider. - local CustomMarkerProvider = {} + 'kevinhwang91/nvim-ufo', + dependencies = { + { + 'kevinhwang91/promise-async', + }, + }, + enabled = false, + config = function() + -- Implement custom marker provider. + local CustomMarkerProvider = {} - function CustomMarkerProvider.getFolds(bufnr) - local buf = require('ufo.bufmanager'):get(bufnr) - if not buf then - return - end + function CustomMarkerProvider.getFolds(bufnr) + local buf = require('ufo.bufmanager'):get(bufnr) + if not buf then + return + end - local openRegex = '#region' - local closeRegex = '#endregion' + local openRegex = '#region' + local closeRegex = '#endregion' - local summaryRegx = openRegex .. '%s*(.*)' + local summaryRegx = openRegex .. '%s*(.*)' - local ranges = {} - local stack = {} - local lines = buf:lines(1, -1) + local ranges = {} + local stack = {} + local lines = buf:lines(1, -1) - for lnum, line in ipairs(lines) do - -- Check for start marker - if line:match(openRegex) then - table.insert(stack, lnum) - -- Check for end marker - elseif line:match(closeRegex) then - local startLnum = table.remove(stack) - if startLnum then - local summary = lines[startLnum]:match(summaryRegx) - table.insert(ranges, require('ufo.model.foldingrange').new(startLnum - 1, lnum - 1, summary)) - end - end - end + for lnum, line in ipairs(lines) do + -- Check for start marker + if line:match(openRegex) then + table.insert(stack, lnum) + -- Check for end marker + elseif line:match(closeRegex) then + local startLnum = table.remove(stack) + if startLnum then + local summary = lines[startLnum]:match(summaryRegx) + table.insert(ranges, require('ufo.model.foldingrange').new(startLnum - 1, lnum - 1, summary)) + end + end + end - return ranges - end + return ranges + end - local function customizeSelector(bufnr) - local ranges = CustomMarkerProvider.getFolds(bufnr) - local maybe_additional_ranges = require('ufo').getFolds(bufnr, 'treesitter') - if next(maybe_additional_ranges) ~= nil then - ranges = vim.list_extend(ranges, maybe_additional_ranges) - else - ranges = vim.list_extend(ranges, require('ufo').getFolds(bufnr, 'indent')) - end - return ranges - end + local function customizeSelector(bufnr) + local ranges = CustomMarkerProvider.getFolds(bufnr) + local maybe_additional_ranges = require('ufo').getFolds(bufnr, 'treesitter') + if next(maybe_additional_ranges) ~= nil then + ranges = vim.list_extend(ranges, maybe_additional_ranges) + else + ranges = vim.list_extend(ranges, require('ufo').getFolds(bufnr, 'indent')) + end + return ranges + end - require('ufo').setup({ - provider_selector = function(bufnr, filetype, buftype) - return customizeSelector - end, - }) - end, - }, + require('ufo').setup({ + provider_selector = function(bufnr, filetype, buftype) + return customizeSelector + end, + }) + end, + }, } diff --git a/.config/nvim/lua/plugins/format.lua b/.config/nvim/lua/plugins/format.lua index f123a37..28f8664 100644 --- a/.config/nvim/lua/plugins/format.lua +++ b/.config/nvim/lua/plugins/format.lua @@ -2,6 +2,7 @@ return { { 'tjex/formatter.nvim', branch = 'fix-305-index-out-of-bounds', + event = 'BufWritePost', config = function() local util = require('formatter.util') @@ -47,6 +48,15 @@ return { scss = { prettier, }, + rust = { + function() + return { + exe = 'rustfmt', + args = {}, + stdin = false, + } + end, + }, lua = { function() @@ -84,7 +94,7 @@ return { }) autocmd('BufWritePost', { group = '__formatter__', - command = ':FormatWrite', + command = ':FormatWriteLock', }) end, }, diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 5e08c03..f6714a5 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -1,20 +1,36 @@ return { -- Mason - { 'williamboman/mason.nvim', opts = {}, cmd = 'Mason' }, - { 'williamboman/mason-lspconfig.nvim', opts = {} }, + { 'williamboman/mason.nvim', opts = {}, cmd = 'Mason', event = 'VeryLazy' }, + { 'williamboman/mason-lspconfig.nvim', opts = {}, event = 'VeryLazy' }, -- Lsp configuration { 'VonHeikemen/lsp-zero.nvim' }, { 'neovim/nvim-lspconfig' }, -- Completion - { 'hrsh7th/nvim-cmp', dependencies = { 'hrsh7th/cmp-calc', 'L3MON4D3/LuaSnip', 'hrsh7th/cmp-nvim-lsp', 'onsails/lspkind.nvim' } }, + { + 'hrsh7th/nvim-cmp', + event = 'VeryLazy', + dependencies = { + 'hrsh7th/cmp-calc', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-buffer', + 'L3MON4D3/LuaSnip', + 'hrsh7th/cmp-nvim-lsp', + 'onsails/lspkind.nvim', + }, + }, -- Additions - { 'ray-x/lsp_signature.nvim', event = 'VeryLazy', opts = { - hint_prefix = '', - } }, + { + 'ray-x/lsp_signature.nvim', + event = 'VeryLazy', + opts = { + hint_prefix = '', + }, + }, -- Rust - { 'mrcjkb/rustaceanvim' }, + -- { 'mrcjkb/rustaceanvim' }, } diff --git a/.config/nvim/lua/plugins/nav.lua b/.config/nvim/lua/plugins/nav.lua index 21eefbf..432fa6b 100644 --- a/.config/nvim/lua/plugins/nav.lua +++ b/.config/nvim/lua/plugins/nav.lua @@ -4,12 +4,16 @@ return { 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, keys = { - { 'ff', function() require('telescope.builtin').find_files({ show_hidden = true }) end }, + { + 'ff', + function() + require('telescope.builtin').find_files({ show_hidden = true }) + end, + }, { 'fs', require('telescope.builtin').live_grep }, { 'bb', require('telescope.builtin').buffers }, }, }, - { 'nvim-lua/plenary.nvim' }, -- Oil { diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index b3eb73d..c16d672 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -2,6 +2,8 @@ return { -- Highlighting { 'nvim-treesitter/nvim-treesitter', + -- enabled = false, + event = 'VeryLazy', config = function() vim.cmd('TSUpdate') require('nvim-treesitter.configs').setup({