lang/julia: auto-detect default environment
This commit is contained in:
parent
6584aa866f
commit
b98b6fdeed
1 changed files with 8 additions and 2 deletions
|
@ -73,8 +73,14 @@
|
||||||
:when (featurep! +lsp)
|
:when (featurep! +lsp)
|
||||||
:unless (featurep! :tools lsp +eglot)
|
:unless (featurep! :tools lsp +eglot)
|
||||||
:after lsp-mode
|
:after lsp-mode
|
||||||
:preface
|
:preface (setq lsp-julia-default-environment nil)
|
||||||
(setq lsp-julia-default-environment "~/.julia/environments/v1.0")
|
:init
|
||||||
|
;; If no environment is set, then auto-detect one in ~/.julia/environments/,
|
||||||
|
;; falling back to `lsp-julia-default-environment's default.
|
||||||
|
(unless lsp-julia-default-environment
|
||||||
|
(setq lsp-julia-default-environment
|
||||||
|
(or (car (last (doom-glob "~/.julia/environments/v*")))
|
||||||
|
"~/.julia/environments/v1.0")))
|
||||||
:config
|
:config
|
||||||
;; See non-Jedi/lsp-julia#35
|
;; See non-Jedi/lsp-julia#35
|
||||||
(setq-hook! 'julia-mode-hook
|
(setq-hook! 'julia-mode-hook
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue