diff options
author | autumngray <simon.werbeck@gmail.com> | 2024-03-03 16:05:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-03 16:05:11 +0100 |
commit | 15577043e89f4a1b80f4d8fd4fab4e9fe7e08f33 (patch) | |
tree | 9edbefc6118fb3d5fed8a3e1f215534ca7492d12 /nimsuggest | |
parent | aa30233ea7f904c466020b8eb1b369e9b49ab79f (diff) | |
download | Nim-15577043e89f4a1b80f4d8fd4fab4e9fe7e08f33.tar.gz |
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.
Diffstat (limited to 'nimsuggest')
-rw-r--r-- | nimsuggest/tests/timport_highlight.nim | 12 |
1 files changed, 12 insertions, 0 deletions
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 +""" |