Skip to content

Commit 0ce5446

Browse files
committed
fix(langserver): corrected highlightning of embedded arguments if there is a namespace given before the keyword
fixes #434
1 parent d5f1972 commit 0ce5446

File tree

94 files changed

+1446
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1446
-157
lines changed

packages/language_server/src/robotcode/language_server/robotframework/parts/semantic_tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def generate_sem_sub_tokens(
528528
Token.ARGUMENT,
529529
token.value[arg_start:arg_end],
530530
token.lineno,
531-
token.col_offset + arg_start,
531+
token.col_offset + kw_index + arg_start,
532532
)
533533

534534
for sub_token in ModelHelper.tokenize_variables(

tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf41/test_semantic_tokens.test[sematic_tokenizing.robot].out

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ result: !SemanticTokens
22
data:
33
- 0
44
- 0
5+
- 16
6+
- 27
7+
- 0
8+
- 1
9+
- 0
10+
- 8
11+
- 24
12+
- 0
13+
- 0
14+
- 12
15+
- 22
16+
- 51
17+
- 0
18+
- 2
19+
- 0
520
- 18
621
- 29
722
- 0
@@ -152,6 +167,61 @@ result: !SemanticTokens
152167
- 0
153168
- 2
154169
- 0
170+
- 27
171+
- 33
172+
- 1
173+
- 1
174+
- 4
175+
- 3
176+
- 39
177+
- 0
178+
- 0
179+
- 3
180+
- 4
181+
- 36
182+
- 2048
183+
- 0
184+
- 5
185+
- 5
186+
- 39
187+
- 0
188+
- 0
189+
- 5
190+
- 5
191+
- 36
192+
- 2048
193+
- 1
194+
- 4
195+
- 13
196+
- 51
197+
- 0
198+
- 0
199+
- 13
200+
- 1
201+
- 21
202+
- 0
203+
- 0
204+
- 1
205+
- 3
206+
- 39
207+
- 0
208+
- 0
209+
- 3
210+
- 4
211+
- 36
212+
- 2048
213+
- 0
214+
- 5
215+
- 5
216+
- 39
217+
- 0
218+
- 0
219+
- 5
220+
- 5
221+
- 36
222+
- 2048
223+
- 2
224+
- 0
155225
- 16
156226
- 32
157227
- 0

0 commit comments

Comments
 (0)