From 8ccf3d6452f6d6e3c77e346eb504bd2c3088f426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 2 Feb 2024 14:07:01 +0200 Subject: [PATCH] vimrc: rg comes from nix too --- shared/home/default.nix | 2 +- shared/home/dev.lua | 3 +-- shared/home/vimrc | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/shared/home/default.nix b/shared/home/default.nix index c0c3857..92eab81 100644 --- a/shared/home/default.nix +++ b/shared/home/default.nix @@ -152,7 +152,7 @@ in { builtins.readFile (pkgs.substituteAll { src = ./dev.lua; - inherit (pkgs) gotools; + inherit (pkgs) gotools ripgrep; }) .outPath; }) diff --git a/shared/home/dev.lua b/shared/home/dev.lua index cb18904..7273711 100644 --- a/shared/home/dev.lua +++ b/shared/home/dev.lua @@ -1,5 +1,4 @@ vim.api.nvim_exec([[ - au FileType go nnoremap :GoDef - au FileType go let g:go_template_autocreate = 0 + set grepprg=@ripgrep@/bin/rg\ --vimgrep grepformat^=%f:%l:%c:%m au FileType go let g:go_fmt_command = "@gotools@/bin/goimports" ]], false) diff --git a/shared/home/vimrc b/shared/home/vimrc index e53dcea..0994b26 100644 --- a/shared/home/vimrc +++ b/shared/home/vimrc @@ -1,7 +1,7 @@ syntax on filetype plugin indent on set et ts=4 sw=4 sts=4 nu hlsearch ruler ignorecase smartcase nomodeline bg=dark incsearch -set path=**/* grepprg=rg\ --vimgrep grepformat^=%f:%l:%c:%m backspace=2 nojs +set path=**/* backspace=2 nojs set laststatus=1 diffopt+=algorithm:patience nnoremap \ gqj command OLD :enew | setl buftype=nofile | 0put =v:oldfiles | nnoremap :e =getline('.') @@ -42,6 +42,8 @@ au BufRead,BufNewFile *.do setfiletype sh " go au FileType go setlocal noet +au FileType go nnoremap :GoDef +au FileType go let g:go_template_autocreate = 0 " strace au FileType strace setlocal nonu