Treat .fnlm files as macro files.

Now that .fnlm files are in the macro path we should also treat those as
macro files without needing the special comment.
This commit is contained in:
Michele Campeotto 2025-04-13 10:01:57 +02:00 committed by Phil Hagelberg
parent 3fbad644a9
commit 61defc86c4

View File

@ -342,8 +342,12 @@ identifiers are declared / referenced in which places."
(fn parse-ast [parser]
(icollect [ok ast parser &until (not ok)] ast))
(fn macro-file? [file]
(or (file.uri:match "%.fnlm$")
(= (file.text:sub 1 24) ";; fennel-ls: macro-file")))
;; TODO clean up this code. It's awful now that there is error handling
(let [macro-file? (= (file.text:sub 1 24) ";; fennel-ls: macro-file")
(let [macro-file? (macro-file? file)
plugin
{:name "fennel-ls"
:versions ["1.4.1" "1.4.2" "1.5.0" "1.5.1" "1.5.3" "1.5.4"]