From 8fd0e0920cffe97855fd75b35cf045a158c6c41e Mon Sep 17 00:00:00 2001 From: archibate <1931127624@qq.com> Date: Sat, 29 Jun 2024 15:14:36 +0800 Subject: [PATCH] fix trouble --- README.md | 2 +- after/syntax/qf.vim | 5 +-- compile.sh | 2 +- lua/archvim/config/auto-session.lua | 2 +- lua/archvim/config/diagflow.lua | 4 +-- lua/archvim/config/nvim-treesitter.lua | 2 +- lua/archvim/config/trouble.lua | 42 +++++++++++++++++++++++++- lua/archvim/mappings.lua | 7 +++-- lua/archvim/options.lua | 7 +++++ 9 files changed, 61 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 625f5d5..04fa665 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ git clone https://github.com/archibate/vimrc ~/.config/nvim ### 默认启用的语法高亮 ``` -c,cpp,cmake,lua,python,html,javascript,css,json,bash,regex,markdown,glsl,vimdoc +c,cpp,cmake,lua,python,html,javascript,css,json,bash,regex,markdown,glsl,vim,vimdoc ``` 你可以输入 `:TSInstall ` 来安装更多语言的语义高亮支持。 diff --git a/after/syntax/qf.vim b/after/syntax/qf.vim index c4315bd..95c467c 100644 --- a/after/syntax/qf.vim +++ b/after/syntax/qf.vim @@ -10,8 +10,8 @@ syn match DiagnosticWarn "\" syn match DiagnosticHint "-- .*$" " syn match Special "[:()&|<>\-+*\/]" " syn match Special "[:()&|<>]" -syn match Function "['`][^']\+'" -syn match NonText "\[-W[^\]]\+\]$" +syn match Function "['`‘][^'’]\+['’]" +syn match DiagnosticWarn "\[-W[^\]]\+\]$" syn match NonText "(message):$" syn match CmpItemMenu "\^\~*" syn match NonText "\", function () end end, { noremap = true, expr = true }) vim.keymap.set({"v", "n", "i", "t"}, "", "NvimTreeFindFileToggle", { silent = true }) -vim.keymap.set({"v", "n", "i", "t"}, "", "TroubleToggle", { silent = true }) +vim.keymap.set({"v", "n", "i", "t"}, "", "Trouble diagnostics toggle focus=false filter.buf=0", { silent = true }) +vim.keymap.set({"v", "n", "i", "t"}, "", "Trouble diagnostics toggle focus=false", { silent = true }) if pcall(require, "cmake-tools") then - vim.keymap.set({"v", "n", "i", "t"}, "", "waif luaeval('require\"cmake-tools\".is_cmake_project()')|call execute('CMakeRun')|else|call execute('TermExec cmd=!!')|endif", { silent = true }) + vim.keymap.set({"v", "n", "i", "t"}, "", "waif luaeval('require\"cmake-tools\".is_cmake_project()')|call execute('CMakeRun')|else|call execute('TermExec cmd=./run.sh')|endif", { silent = true }) vim.keymap.set({"v", "n", "i", "t"}, "", "waif luaeval('require\"cmake-tools\".is_cmake_project()')|call execute('CMakeStopRunner')|call execute('CMakeStopExecutor')|else|call execute('TermExec cmd=\\')|endif", { silent = true }) else - vim.keymap.set({"v", "n", "i", "t"}, "", "wacall execute('TermExec cmd=!!')", { silent = true }) + vim.keymap.set({"v", "n", "i", "t"}, "", "wacall execute('TermExec cmd=./run.sh')", { silent = true }) vim.keymap.set({"v", "n", "i", "t"}, "", "wacall execute('TermExec cmd=\\')", { silent = true }) end vim.keymap.set({"v", "n", "i", "t"}, "", "Neogitset foldtext='+'", { silent = true }) diff --git a/lua/archvim/options.lua b/lua/archvim/options.lua index cb0c9c2..993a416 100644 --- a/lua/archvim/options.lua +++ b/lua/archvim/options.lua @@ -53,6 +53,13 @@ autocmd FileType qf nnoremap cclose augroup END ]] +vim.cmd [[ +augroup trouble_setlocal +autocmd! +autocmd FileType trouble setlocal wrap +augroup END +]] + vim.cmd [[ set termguicolors colorscheme gruvbox