mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
home/nvim: add qc/lc binds, replace rg with ug
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
bottom # System viewer
|
||||
ncdu # TUI disk usage
|
||||
exa # Better ls
|
||||
ripgrep # Better grep
|
||||
ugrep # Better grep
|
||||
fd # Better find
|
||||
httpie # Better curl
|
||||
jq # JSON pretty printer and manipulator
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
enable = true;
|
||||
shellAbbrs = {
|
||||
ls = "exa";
|
||||
cat = "bat";
|
||||
top = "btm";
|
||||
|
||||
jqless = "jq -C | less -r";
|
||||
|
||||
|
||||
@@ -52,14 +52,36 @@
|
||||
nmap <C-j> <C-e>
|
||||
nmap <C-k> <C-y>
|
||||
|
||||
nmap <space>q <cmd>cwindow<cr>
|
||||
nmap <space>l <cmd>lwindow<cr>
|
||||
|
||||
"Buffers
|
||||
set wildcharm=<C-Z>
|
||||
nmap <space>b :buffer <C-Z>
|
||||
nmap <C-l> :bnext<CR>
|
||||
nmap <C-h> :bprev<CR>
|
||||
nmap <C-q> :bdel<CR>
|
||||
|
||||
"Loclist
|
||||
nmap <space>l :lwindow<cr>
|
||||
nmap [l :lprev<cr>
|
||||
nmap ]l :lnext<cr>
|
||||
|
||||
nmap <space>L :lhistory<cr>
|
||||
nmap [L :lolder<cr>
|
||||
nmap ]L :lnewer<cr>
|
||||
|
||||
"Quickfix
|
||||
nmap <space>q :cwindow<cr>
|
||||
nmap [q :cprev<cr>
|
||||
nmap ]q :cnext<cr>
|
||||
|
||||
nmap <space>Q :chistory<cr>
|
||||
nmap [Q :colder<cr>
|
||||
nmap ]Q :cnewer<cr>
|
||||
|
||||
"Use ugrep as :grep
|
||||
if executable('ugrep')
|
||||
set grepprg=ugrep\ -RInk\ -j\ -u\ --tabs=1\ --ignore-files
|
||||
set grepformat=%f:%l:%c:%m,%f+%l+%c+%m,%-G%f\\\|%l\\\|%c\\\|%m
|
||||
endif
|
||||
'';
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, { desc = "Floating diagnostic" })
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "gl", vim.diagnostic.setloclist, { desc = "Diagnostics on loclist" })
|
||||
vim.keymap.set("n", "gq", vim.diagnostic.setqflist, { desc = "Diagnostics on quickfix" })
|
||||
|
||||
function add_sign(name, text)
|
||||
vim.fn.sign_define(name, { text = text, texthl = name, numhl = name})
|
||||
|
||||
Reference in New Issue
Block a user