clojure-lsp / clojure-lsp/clojure-lsp-intellij

shebang marked as error: <form> expected, got '/usr/bin/env'

Open
#71 1 comment 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Clojure
Stars
122
Forks
8
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

With the following file:
```clj
#!/usr/bin/env bb

(require '[babashka.http-client :as http])
```

Clojure LSP complains about the `/` after `#!`: " expected, got '/usr/bin/env'".

The file is the start of an example copied from the Babashka documentation: https://book.babashka.org/#_running_a_script

The Clojure docs suggest that a shebang is valid syntax (on the first line of a file): https://clojure.org/guides/faq#clj_standalone

```edn
{:final-settings {},
:classpath nil,
:cljfmt-raw "nil",
:analysis-summary
{"internal" {"keyword-usages" 15905.0, "instance-invocations" 65.0, "protocol-impls" 18.0, "local-usages" 7463.0, "namespace-alias" 565.0, "namespace-usages" 621.0, "symbols" 4.0, "var-usages" 18300.0, "namespace-definitions" 26.0, "java-class-usages" 141.0, "locals" 4372.0, "var-definitions" 1131.0}, "external" {"instance-invocations" 417.0, "protocol-impls" 69.0, "local-usages" 8690.0, "namespace-alias" 17.0, "namespace-usages" 22.0, "symbols" 13.0, "var-usages" 12312.0, "namespace-definitions" 2.0, "java-class-usages" 450.0, "locals" 4850.0, "var-definitions" 1259.0}},
:client-settings nil,
:project-root-uri nil,
:port "NREPL only available on :debug profile (`bb debug-cli`)",
:project-settings nil,
:server-version "2025.03.07-17.42.36",
:clj-kondo-version "2025.02.20",
:log-path "/tmp/clojure-lsp.3767883027226366171.out",
:classpath-settings nil}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.