fix the | virtual cursor character appearing in completion output
This commit is contained in:
parent
7b92d6dc2e
commit
284a760224
@ -62,7 +62,8 @@ is set to true and we report that we support completionItem/resolve."
|
|||||||
seen {}]
|
seen {}]
|
||||||
|
|
||||||
(fn add-completion! [name definition ?kind]
|
(fn add-completion! [name definition ?kind]
|
||||||
(table.insert results (format.completion-item-format server name definition range ?kind)))
|
(when (and symbol (not= name (tostring symbol)))
|
||||||
|
(table.insert results (format.completion-item-format server name definition range ?kind))))
|
||||||
|
|
||||||
(fn add-completion-recursively! [name definition]
|
(fn add-completion-recursively! [name definition]
|
||||||
"add the completion. also recursively adds the fields' completions"
|
"add the completion. also recursively adds the fields' completions"
|
||||||
|
|||||||
@ -290,15 +290,22 @@
|
|||||||
nil)
|
nil)
|
||||||
|
|
||||||
(fn test-no-completion []
|
(fn test-no-completion []
|
||||||
|
;; comment
|
||||||
(check "; ("
|
(check "; ("
|
||||||
[]
|
[]
|
||||||
[:math])
|
[:math])
|
||||||
|
;; inside of a string
|
||||||
(check "\" (|\n\""
|
(check "\" (|\n\""
|
||||||
[]
|
[]
|
||||||
[:math])
|
[:math])
|
||||||
|
;; inside of a string, but the starting quote is on a different line
|
||||||
(check "\"\n(|\""
|
(check "\"\n(|\""
|
||||||
[]
|
[]
|
||||||
[:math])
|
[:math])
|
||||||
|
|
||||||
|
(check "(fn foo|)"
|
||||||
|
[]
|
||||||
|
["foo|"])
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
;; ;; Future tests / features
|
;; ;; Future tests / features
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user