mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-25 12:51:45 +00:00
Compare commits
5 Commits
1d1d8447f7
...
57212d3f27
Author | SHA1 | Date | |
---|---|---|---|
57212d3f27 | |||
08f5acc7ed | |||
2fec155b77 | |||
cfaf706a07 | |||
842c704a99 |
@ -35,11 +35,23 @@ return {
|
||||
|
||||
-- Display status info about tasks
|
||||
vim.keymap.set('n', '<leader>ol', function()
|
||||
-- Get currently open windows (detects splits)
|
||||
local curWindows = #vim.api.nvim_tabpage_list_wins(0)
|
||||
-- Use builtin toggle if already using splits
|
||||
if curWindows ~= (is_open() and 2 or 1) then
|
||||
vim.cmd 'OverseerToggle'
|
||||
return
|
||||
end
|
||||
|
||||
-- Otherwise, toggle overseer in fullscreen
|
||||
overseer.toggle { winid = 0 }
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
if is_open() then
|
||||
-- Maximize height
|
||||
vim.cmd.winc '_'
|
||||
else
|
||||
vim.api.nvim_buf_delete(vim.api.nvim_get_current_buf(), {})
|
||||
elseif vim.bo[bufnr].filetype == '' and vim.bo.buftype ~= 'terminal' then
|
||||
-- Delete empty buffer created by overseer
|
||||
vim.api.nvim_buf_delete(bufnr, {})
|
||||
end
|
||||
end, { desc = '[O]verseer [L]og' })
|
||||
-- Run task by listing all in floating
|
||||
|
@ -9,7 +9,7 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setqflist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
@ -33,11 +33,6 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Delete (currently selected) text without yanking it
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>dny', '"_d', { desc = '[D]elete [N]o [Y]ank' })
|
||||
-- Replace currently selected text with default register without yanking it
|
||||
vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
|
||||
|
||||
-- Populate CMD to prepare for change directory
|
||||
vim.keymap.set('n', '<leader>cd ', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' })
|
||||
-- Navigate to 'base' directory, the initial dir that nvim was run in
|
||||
|
@ -22,7 +22,7 @@ return {
|
||||
-- Document existing key chains
|
||||
require('which-key').add {
|
||||
{ '<leader>c', group = '[C]ode-/[C]hange' },
|
||||
{ '<leader>d', group = '[D]ocument/[D]elete', mode = { 'n', 'v' } },
|
||||
{ '<leader>d', group = '[D]ocument' },
|
||||
{ '<leader>r', group = '[R]ename' },
|
||||
{ '<leader>s', group = '[S]earch' },
|
||||
{ '<leader>w', group = '[W]orkspace' },
|
||||
@ -31,12 +31,9 @@ return {
|
||||
{ '<leader>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } },
|
||||
{ '<leader>b', group = '[B]uffer/[B]reakpoint' },
|
||||
{ '<leader>cd', group = '[D]irectory' },
|
||||
{ '<leader>dn', group = '[N]o', mode = { 'n', 'v' } },
|
||||
{ '<leader>l', group = '[L]ist', mode = { 'n', 'v' } },
|
||||
{ '<leader>f', group = '[F]ormat/[F]ile', mode = { 'n', 'v' } },
|
||||
{ '<leader>o', group = '[O]verseer', mode = { 'n', 'v' } },
|
||||
{ '<leader>p', group = '[P]aste', mode = { 'v' } },
|
||||
{ '<leader>pn', group = '[N]o', mode = { 'v' } },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user