Clojure LSP: improve module resolution by parsing source path providers

This commit is contained in:
Michael Panchenko authored and Michael Panchenko committed 2026-05-08 01:40:17 +02:00
1 parent 42b5500efc
commit 077dba4d21
8 files changed
+291 -7

No files matched your search

@@ -0,0 +1,12 @@
(ns test-app.extra
(:require [test-app.core :as core]))
(defn double-product
"Computes 2 * a * b by calling core/multiply twice."
[a b]
(core/multiply 2 (core/multiply a b)))
(defn triple-product
"Computes a * b * c by calling core/multiply twice."
[a b c]
(core/multiply a (core/multiply b c)))
@@ -0,0 +1,2 @@
{:paths ["src"]
:deps {test-app/test-app {:local/root "../"}}}
@@ -0,0 +1,15 @@
(ns sub-module-app.consumer
"A consumer of test-app.core that lives in a sibling module with its own deps.edn,
mimicking the multi-module layout of real-world Clojure projects (e.g. penpot's
common/, frontend/, backend/ split). The bug being reproduced: references to
symbols defined in test-app.core are missed for files in sibling modules until
those files are explicitly opened/indexed via find_symbol or get_symbols_overview."
(:require [test-app.core :as core]))
(defn quadruple-product
[a b]
(core/multiply 4 (core/multiply a b)))
(defn quintuple-product
[a b]
(core/multiply 5 (core/multiply a b)))