summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-08 10:15:12 +0100
committerJoe <rbo@gmx.us>2024-01-08 10:15:12 +0100
commit317d74f782192605d5529f46cec7a081b0653e18 (patch)
tree5e2d213128ab5d7e9ea7f4772d68127c0b20dd8f /.config/nvim/lua
parentup (diff)
downloaddotfiles-bsd-317d74f782192605d5529f46cec7a081b0653e18.tar.gz
dotfiles-bsd-317d74f782192605d5529f46cec7a081b0653e18.tar.bz2
dotfiles-bsd-317d74f782192605d5529f46cec7a081b0653e18.tar.xz
dotfiles-bsd-317d74f782192605d5529f46cec7a081b0653e18.tar.zst
dotfiles-bsd-317d74f782192605d5529f46cec7a081b0653e18.zip
less bloat pls
Diffstat (limited to '')
-rw-r--r--.config/nvim/lua/bindings.lua40
-rw-r--r--.config/nvim/lua/pack.lua19
-rw-r--r--.config/nvim/lua/settings.lua2
3 files changed, 44 insertions, 17 deletions
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 '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
vim.keymap.set('x', '<leader>p', "\"_dP")
vim.keymap.set('n', 'Q', '<nop>')
+
+
+vim.keymap.set('n', '<M-1>', function() harpoon:list():select(1) end)
+vim.keymap.set('n', '<M-2>', function() harpoon:list():select(2) end)
+vim.keymap.set('n', '<M-3>', function() harpoon:list():select(3) end)
+vim.keymap.set('n', '<M-4>', 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', '<leader>d', ':bd<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>D', '"-ddk:put = strftime(\' * %a %b %d %T %Y\')<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>k', ':w<CR>:bp<CR>:bd #<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>u', ':w<CR>', { noremap = true, silent = true })
+-- harpoon
+vim.keymap.set('n', '<leader>aa', function() harpoon:list():append() end, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>ae', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>af', ':Telescope harpoon marks<CR>', { noremap = true, silent = true })
+-- trouble
+vim.keymap.set('n', '<leader>xx', vim.cmd.TroubleToggle, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>xx', ':TroubleToggle workspace_diagnostics<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>xd', ':TroubleToggle document_diagnostics<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>xl', ':TroubleToggle loclist<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>xq', ':TroubleToggle quickfix<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>xs', ':TroubleToggle lsp_references<CR>', { noremap = true, silent = true })
+-- telescope
+vim.keymap.set('n', '<leader>fb', ts.buffers, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>fd', ts.diagnostics, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>fe', ':Telescope harpoon marks<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>ff', ts.find_files, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>fg', ts.git_files, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>fs', function() ts.grep_string({ search = vim.fn.input("Grep > ") }) end, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>ft', ':TodoTelescope keywords=TODO,HACK,WARN,PERF,NOTE,TEST<CR>', { noremap = true, silent = true })
+-- neovim
+vim.keymap.set('n', '<leader>vu', vim.cmd.PackerSync, { noremap = true, silent = true })
+vim.keymap.set('n', '<leader>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'