This repository was archived by the owner on Oct 26, 2023. It is now read-only.
File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 8
8
net/url
9
9
"interfaces.rkt "
10
10
"responses.rkt "
11
+ "path-util.rkt "
11
12
"docs-helpers.rkt " )
12
13
13
14
(struct Decl (require? id left right) #:transparent )
82
83
(define/override (syncheck:add-require-open-menu text start finish file )
83
84
(interval-map-set! requires start finish file ))
84
85
;; Mouse-over status
86
+ (define (hint-unused-variable src-obj text start finish)
87
+ (define diag (Diagnostic #:range (Range #:start (abs-pos->Pos doc-text start)
88
+ #:end (abs-pos->Pos doc-text finish))
89
+ #:severity Diag-Information
90
+ #:source (path->uri src-obj)
91
+ #:message "unused variable " ))
92
+ (set-add! warn-diags diag))
85
93
(define/override (syncheck:add-mouse-over-status src-obj start finish text)
86
94
;; Infer a length of 1 for zero-length ranges in the document.
87
95
;; XXX This might not exactly match the behavior in DrRacket.
88
96
(when (= start finish)
89
97
(set! finish (add1 finish)))
90
98
(when (string=? "no bound occurrences " text)
91
- (define diag (Diagnostic #:range (Range #:start (abs-pos->Pos doc-text start)
92
- #:end (abs-pos->Pos doc-text finish))
93
- #:severity Diag-Information
94
- #:source src-obj
95
- #:message "unused variable " ))
96
- (set-add! warn-diags diag))
99
+ (hint-unused-variable src-obj text start finish))
97
100
(interval-map-set! hovers start finish text))
98
101
;; Docs
99
102
(define/override (syncheck:add-docs-menu text start finish id label path def-tag url-tag)
You can’t perform that action at this time.
0 commit comments