diff --git a/src/fennel-ls/compiler.fnl b/src/fennel-ls/compiler.fnl index f39edb7..6ee7172 100644 --- a/src/fennel-ls/compiler.fnl +++ b/src/fennel-ls/compiler.fnl @@ -247,7 +247,7 @@ identifiers are declared / referenced in which places." (table.insert ?ast (sym :nil)) true) (when (and (= 1 (msg:find "expected a function, macro, or special to call")) - (sequence? ?ast) + (list? ?ast) (= (length ?ast) 0)) (table.insert ?ast (sym :do)) true))) diff --git a/src/fennel-ls/handlers.fnl b/src/fennel-ls/handlers.fnl index 255f4ee..b9bf6d5 100644 --- a/src/fennel-ls/handlers.fnl +++ b/src/fennel-ls/handlers.fnl @@ -142,7 +142,12 @@ Every time the client sends a message, it gets handled by a function in the corr file.scope) ?parent (. parents 1) result [] - in-call-position? (and (fennel.list? ?parent) (= ?symbol (. ?parent 1)))] + in-call-position? (and (fennel.list? ?parent) + (or (= ?symbol (. ?parent 1)) + ;; so, this is unfortunate + (and (= ?symbol nil) + (fennel.sym? (. ?parent 1) :do) + (= (. ?parent 1 :bytestart) nil))))] (collect-scope scope :manglings #(doto (make-completion-item self file $ scope) (tset :kind kinds.Variable)) result) (when in-call-position?