diff --git a/autoload/coc/highlight.vim b/autoload/coc/highlight.vim index 948eb29cf90..745f2a6a9b2 100644 --- a/autoload/coc/highlight.vim +++ b/autoload/coc/highlight.vim @@ -5,7 +5,7 @@ let s:namespace_map = {} let s:ns_id = 1 let s:diagnostic_hlgroups = ['CocErrorHighlight', 'CocWarningHighlight', 'CocInfoHighlight', 'CocHintHighlight', 'CocDeprecatedHighlight', 'CocUnusedHighlight'] " Maximum count to highlight each time. -let g:coc_highlight_maximum_count = get(g:, 'coc_highlight_maximum_count', 200) +let g:coc_highlight_maximum_count = get(g:, 'coc_highlight_maximum_count', 500) let s:term = &termguicolors == 0 && !has('gui_running') " Update buffer region by region. diff --git a/doc/coc.txt b/doc/coc.txt index f6c22b9d36d..020ec0a1ef1 100644 --- a/doc/coc.txt +++ b/doc/coc.txt @@ -124,7 +124,7 @@ And run: > For other plugin managers, make sure to use the release branch (unless you need to build from typescript source code). -To use Vim's native |packages| on Linux or MaxOS, use script like: > +To use Vim's native |packages| on Linux or macOS, use script like: > #!/bin/sh # for vim8 @@ -1877,7 +1877,7 @@ g:coc_highlight_maximum_count *g:coc_highlight_maximum_count* When highlight items exceed maximum count, highlight items will be grouped and added by using |timer_start| for better user experience. - Default `200` + Default `500` g:coc_default_semantic_highlight_groups *g:coc_default_semantic_highlight_groups* diff --git a/src/handler/semanticTokens/buffer.ts b/src/handler/semanticTokens/buffer.ts index 012c39b7113..4a6cb983ea1 100644 --- a/src/handler/semanticTokens/buffer.ts +++ b/src/handler/semanticTokens/buffer.ts @@ -388,8 +388,8 @@ export default class SemanticTokensBuffer implements SyncItem { if (token.isCancellationRequested || spans.length === 0) return let height = workspace.env.lines spans.forEach(o => { - o[0] = Math.max(0, Math.floor(o[0] - height / 2)) - o[1] = Math.min(lineCount, Math.ceil(o[1] + height / 2)) + o[0] = Math.max(0, Math.floor(o[0] - height)) + o[1] = Math.min(lineCount, Math.ceil(o[1] + height)) }) for (let [start, end] of Regions.mergeSpans(spans)) { if (!skipCheck && regions.has(start, end)) continue