From 017521404f7a3858fdb9bef5f6d397ccc87512b4 Mon Sep 17 00:00:00 2001 From: ADoyle Date: Fri, 23 Aug 2024 17:46:10 +0800 Subject: [PATCH] fix(whitespace): whitespace highlights show in dashboard User should reinstall plugin whitespace.nvim by self. See https://github.com/johnfrankmorgan/whitespace.nvim/issues/13 --- lua/one/plugins.lua | 8 ++++---- lua/one/plugins/trailing.lua | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lua/one/plugins.lua b/lua/one/plugins.lua index eb9327f..161bd8f 100644 --- a/lua/one/plugins.lua +++ b/lua/one/plugins.lua @@ -70,10 +70,10 @@ return function(Plug, Load, config) 'tyru/capture.vim', on = 'Capture', desc = [[ - ":Capture " to pipe Ex command output to new buffer'. - ":Capture mess" to capture messages. - ":Capture lua print('hello')" to capture lua print - ":Capture echo globpath(&rtp, 'doc/*.txt')". + :Capture " to pipe Ex command output to new buffer'. + :Capture mess" to capture messages. + :Capture lua print('hello')" to capture lua print + :Capture echo globpath(&rtp, 'doc/*.txt')". ]], } diff --git a/lua/one/plugins/trailing.lua b/lua/one/plugins/trailing.lua index d91855e..b3762a3 100644 --- a/lua/one/plugins/trailing.lua +++ b/lua/one/plugins/trailing.lua @@ -1,5 +1,7 @@ return { 'johnfrankmorgan/whitespace.nvim', + -- @TODO remove below line after [the issue](https://github.com/johnfrankmorgan/whitespace.nvim/issues/13) fixed. + commit = '406cd69216dd7847b0cb38486603a8ed5c4f8c77', desc = 'highlight trailing spaces', highlights = function(config) @@ -23,10 +25,17 @@ return { return { 'whitespace', { + -- `highlight` configures which highlight is used to display trailing whitespace highlight = 'TrailingWhitespace', -- `ignored_filetypes` configures which filetypes to ignore when displaying trailing whitespace ignored_filetypes = config.ignore.fileTypesForSomePlugs, + + -- `ignore_terminal` configures whether to ignore terminal buffers + ignore_terminal = true, + + -- `return_cursor` configures if cursor should return to previous position after trimming whitespace + return_cursor = true, }, } end,