From 96698c19d2360bd75d692ded04b5e381b46784e7 Mon Sep 17 00:00:00 2001 From: andrejlevkovitch Date: Thu, 21 Dec 2023 20:51:23 +0100 Subject: [PATCH] return empty request if highlight is disabled --- python/ycm/semantic_highlighting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ycm/semantic_highlighting.py b/python/ycm/semantic_highlighting.py index f1599252c1..6b68d36080 100644 --- a/python/ycm/semantic_highlighting.py +++ b/python/ycm/semantic_highlighting.py @@ -16,6 +16,7 @@ # along with YouCompleteMe. If not, see . +from ycm.client.base_request import BaseRequest from ycm.client.semantic_tokens_request import SemanticTokensRequest from ycm.client.base_request import BuildRequestData from ycm import vimsupport @@ -185,6 +186,9 @@ def __init__( self, bufnr ): def _NewRequest( self, request_range ): + if self._do_highlight == False: + return BaseRequest() + request: dict = BuildRequestData( self._bufnr ) request[ 'range' ] = request_range return SemanticTokensRequest( request )