Skip to content

Commit 459b51f

Browse files
committed
clojure: add lsp-clojure-library-dirs
Understanding ~/.gitlibs as library folders by default
1 parent 7bd9d42 commit 459b51f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clients/lsp-clojure.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@
9090
:risky t
9191
:type 'directory)
9292

93+
(defcustom lsp-clojure-library-dirs (list lsp-clojure-workspace-cache-dir
94+
(expand-file-name "~/.gitlibs/libs"))
95+
"LSP clojure dirs that should be considered library folders."
96+
:group 'lsp-clojure
97+
:type 'list)
98+
9399
(defcustom lsp-clojure-test-tree-position-params nil
94100
"The optional test tree position params.
95101
Defaults to side following treemacs default."
@@ -437,7 +443,7 @@ It updates the test tree view data."
437443
#'lsp-clojure--build-command
438444
#'lsp-clojure--build-command)
439445
:major-modes '(clojure-mode clojurec-mode clojurescript-mode)
440-
:library-folders-fn (lambda (_workspace) (list lsp-clojure-workspace-cache-dir))
446+
:library-folders-fn (lambda (_workspace) lsp-clojure-library-dirs)
441447
:uri-handlers (lsp-ht ("jar" #'lsp-clojure--file-in-jar))
442448
:action-handlers (lsp-ht ("code-lens-references" #'lsp-clojure--show-references))
443449
:notification-handlers (lsp-ht ("clojure/textDocument/testTree" #'lsp-clojure--handle-test-tree))

0 commit comments

Comments
 (0)