From 2e1f2b8a5ef4f455cfa5b589d0ea4d6bfb1fd24d Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Thu, 10 Jul 2025 18:26:47 +0800 Subject: [PATCH] vim: screw list grep/files --- coc-settings.json | 5 ++++- vimrc | 9 ++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/coc-settings.json b/coc-settings.json index 77e84a8..3dea6f3 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -3,7 +3,10 @@ "list.normalMappings": { "e": "action:drop" }, - "go.goplsPath": "/home/edgar/.local/share/gopath/bin/gopls", + "list.source.files.command": "rg", + "list.source.files.args": ["--files"], + "list.source.files.filterByName": true, + "go.goplsPath": "/usr/bin/gopls", "go.goplsUseDaemon": true, "go.goplsOptions": { "semanticTokens": true diff --git a/vimrc b/vimrc index d6723c7..6bc63fa 100644 --- a/vimrc +++ b/vimrc @@ -344,7 +344,6 @@ set noshowmode -set termguicolors set t_8f=[38:2::%lu:%lu:%lum set t_8b=[48:2::%lu:%lu:%lum @@ -352,13 +351,9 @@ set t_8b=[48:2::%lu:%lu:%lum command -nargs=* C !g++ %:p command -nargs=* CR rightb 15split +term\ g++\ \ %:p\ &&\ ./a.out command R rightb 15split +term\ ./a.out -command! -nargs=+ -complete=custom,s:GrepArgs G exe 'CocList --normal grep '. +command! -nargs=* G CocList --normal --auto-preview grep -folder +command! -nargs=* F CocList --normal --auto-preview files -folder -function! s:GrepArgs(...) - let list = ['-S', '-smartcase', '-i', '-ignorecase', '-w', '-word', - \ '-e', '-regex', '-u', '-skip-vcs-ignores', '-t', '-extension'] - return join(list, "\n") -endfunction function MyCDB(file)