From 317d74f782192605d5529f46cec7a081b0653e18 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 8 Jan 2024 10:15:12 +0100 Subject: less bloat pls --- .config/nvim/lua/bindings.lua | 40 ++++++++++++++++++++++++++++++++++++++++ .config/nvim/lua/pack.lua | 19 +++---------------- .config/nvim/lua/settings.lua | 2 +- 3 files changed, 44 insertions(+), 17 deletions(-) (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/bindings.lua b/.config/nvim/lua/bindings.lua index 2722301..a8cf4b3 100644 --- a/.config/nvim/lua/bindings.lua +++ b/.config/nvim/lua/bindings.lua @@ -26,3 +26,43 @@ vim.keymap.set('v', 'J', ":m '>+1gv=gv") vim.keymap.set('v', 'K', ":m '<-2gv=gv") vim.keymap.set('x', 'p', "\"_dP") vim.keymap.set('n', 'Q', '') + + +vim.keymap.set('n', '', function() harpoon:list():select(1) end) +vim.keymap.set('n', '', function() harpoon:list():select(2) end) +vim.keymap.set('n', '', function() harpoon:list():select(3) end) +vim.keymap.set('n', '', function() harpoon:list():select(4) end) + +local ts = require('telescope.builtin') +require('telescope').load_extension('harpoon') +local harpoon = require('harpoon') +harpoon:setup() + +-- normal +vim.keymap.set('n', 'd', ':bd', { noremap = true, silent = true }) +vim.keymap.set('n', 'D', '"-ddk:put = strftime(\' * %a %b %d %T %Y\')', { noremap = true, silent = true }) +vim.keymap.set('n', 'k', ':w:bp:bd #', { noremap = true, silent = true }) +vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle, { noremap = true, silent = true }) +vim.keymap.set('n', 'u', ':w', { noremap = true, silent = true }) +-- harpoon +vim.keymap.set('n', 'aa', function() harpoon:list():append() end, { noremap = true, silent = true }) +vim.keymap.set('n', 'ae', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { noremap = true, silent = true }) +vim.keymap.set('n', 'af', ':Telescope harpoon marks', { noremap = true, silent = true }) +-- trouble +vim.keymap.set('n', 'xx', vim.cmd.TroubleToggle, { noremap = true, silent = true }) +vim.keymap.set('n', 'xx', ':TroubleToggle workspace_diagnostics', { noremap = true, silent = true }) +vim.keymap.set('n', 'xd', ':TroubleToggle document_diagnostics', { noremap = true, silent = true }) +vim.keymap.set('n', 'xl', ':TroubleToggle loclist', { noremap = true, silent = true }) +vim.keymap.set('n', 'xq', ':TroubleToggle quickfix', { noremap = true, silent = true }) +vim.keymap.set('n', 'xs', ':TroubleToggle lsp_references', { noremap = true, silent = true }) +-- telescope +vim.keymap.set('n', 'fb', ts.buffers, { noremap = true, silent = true }) +vim.keymap.set('n', 'fd', ts.diagnostics, { noremap = true, silent = true }) +vim.keymap.set('n', 'fe', ':Telescope harpoon marks', { noremap = true, silent = true }) +vim.keymap.set('n', 'ff', ts.find_files, { noremap = true, silent = true }) +vim.keymap.set('n', 'fg', ts.git_files, { noremap = true, silent = true }) +vim.keymap.set('n', 'fs', function() ts.grep_string({ search = vim.fn.input("Grep > ") }) end, { noremap = true, silent = true }) +vim.keymap.set('n', 'ft', ':TodoTelescope keywords=TODO,HACK,WARN,PERF,NOTE,TEST', { noremap = true, silent = true }) +-- neovim +vim.keymap.set('n', 'vu', vim.cmd.PackerSync, { noremap = true, silent = true }) +vim.keymap.set('n', 'vv', vim.cmd.Ex, { noremap = true, silent = true }) diff --git a/.config/nvim/lua/pack.lua b/.config/nvim/lua/pack.lua index 63e8707..56745e0 100644 --- a/.config/nvim/lua/pack.lua +++ b/.config/nvim/lua/pack.lua @@ -13,23 +13,10 @@ return require('packer').startup({function(use) config = function() require('nvim-autopairs').setup {} end } use 'jiangmiao/auto-pairs' - use 'folke/which-key.nvim' + -- use 'folke/which-key.nvim' use 'lewis6991/gitsigns.nvim' -- use 'mhinz/vim-startify' - use { - 'nvimdev/dashboard-nvim', - event = 'VimEnter', - config = function() - require('dashboard').setup { - theme = 'hyper', - hide = { - statusLine = false, - }, - } - end, - requires = {'nvim-tree/nvim-web-devicons'} - } - use 'mg979/vim-visual-multi' + -- use 'mg979/vim-visual-multi' use 'preservim/tagbar' -- use 'preservim/nerdcommenter' use { @@ -67,7 +54,7 @@ return require('packer').startup({function(use) -- use 'tpope/vim-surround' use 'nvim-lualine/lualine.nvim' -- use 'voldikss/vim-floaterm' - use 'akinsho/toggleterm.nvim' + -- use 'akinsho/toggleterm.nvim' use 'chrisbra/csv.vim' use { 'ThePrimeagen/harpoon', diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index 7081b9c..91f4906 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -27,7 +27,7 @@ vim.opt.ruler = true vim.opt.tabstop = 4 vim.opt.textwidth = 0 vim.opt.timeoutlen = 0 -vim.opt.timeoutlen = 250 +vim.opt.timeoutlen = 500 vim.opt.undodir = '/tmp/nvim_undo' vim.opt.undofile = true vim.opt.wildmode = 'longest,list,full' -- cgit v1.2.3