From 107f9a05ca4969a6f376180a03e8287240ea6d36 Mon Sep 17 00:00:00 2001 From: Arcanox Date: Sun, 26 Sep 2021 00:01:26 -0500 Subject: Semantic highlighting methods cannot return a null response if they're canceled or the editor will clear all the tokens until the next time the request returns a full result --- script/provider/provider.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/provider/provider.lua') diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 9803801b..05202c01 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -692,7 +692,7 @@ proto.on('textDocument/semanticTokens/full', function (params) return { data = results } -end) +end, true) proto.on('textDocument/semanticTokens/range', function (params) local uri = params.textDocument.uri @@ -707,7 +707,7 @@ proto.on('textDocument/semanticTokens/range', function (params) return { data = results } -end) +end, true) proto.on('textDocument/foldingRange', function (params) local core = require 'core.folding' -- cgit v1.2.3