From 15577043e89f4a1b80f4d8fd4fab4e9fe7e08f33 Mon Sep 17 00:00:00 2001 From: autumngray Date: Sun, 3 Mar 2024 16:05:11 +0100 Subject: Fix nimsuggest highlight for import statements (#23263) Currently, I don't have syntax highlighting (+ no/wrong jump-to-definition) for some import statement forms, namely: - `import module/name/with/(slashes)` - `import (mod) as alias` - `import basemod/[ (sub1), (sub2) ]` With this patch, highlight/def will work for the regions indicated by parentheses. --- nimsuggest/tests/timport_highlight.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 nimsuggest/tests/timport_highlight.nim (limited to 'nimsuggest') diff --git a/nimsuggest/tests/timport_highlight.nim b/nimsuggest/tests/timport_highlight.nim new file mode 100644 index 000000000..043f87d98 --- /dev/null +++ b/nimsuggest/tests/timport_highlight.nim @@ -0,0 +1,12 @@ +import std/paths +import json as J +import std/[os,streams]#[!]# + +discard """ +$nimsuggest --tester $file +>highlight $1 +highlight;;skModule;;1;;11;;5 +highlight;;skModule;;2;;7;;4 +highlight;;skModule;;3;;12;;2 +highlight;;skModule;;3;;15;;7 +""" -- cgit 1.4.1-2-gfad0 m/refs/?h=devel'>refs log tree commit diff stats
path: root/tests/macros/tprochelpers.nim
blob: d95a2ced80e9fedfd0d95c13eeb3da0f7156808d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22