Julia:added LSP and repl buffername uses workspace

This commit is contained in:
AlexLewandowski 2020-04-08 14:33:27 -06:00
parent 439562e526
commit b2368527d3
3 changed files with 81 additions and 1 deletions

View file

@ -1,9 +1,17 @@
;;; lang/julia/config.el -*- lexical-binding: t; -*-
(use-package! julia-mode
:interpreter "julia"
:config
(when (featurep! +lsp)
(add-hook 'julia-mode-hook #'lsp!)
(setq lsp-julia-default-environment "~/.julia/environments/v1.0")
)
(set-repl-handler! 'julia-mode #'+julia/open-repl)
(add-hook 'julia-mode-hook #'julia-repl-mode)
;; Borrow matlab.el's fontification of math operators
;; From <https://ogbe.net/emacsconfig.html>
@ -31,4 +39,23 @@
(after! julia-repl
(add-hook 'julia-repl-hook #'julia-repl-use-emacsclient))
(add-hook 'julia-repl-hook #'julia-repl-use-emacsclient)
(defadvice! julia-repl--buffer-name (&optional executable-key suffix)
:override #'julia-repl--inferior-buffer-name
"Name for a Julia REPL inferior buffer. Uses workspace name for doom emacs"
(concat julia-repl-inferior-buffer-name-base ":" (+workspace-current-name)))
(set-popup-rule! "^\\*julia.*\\*$" :ttl nil)
(defadvice! after-julia-repl-advice (inferior-buffer)
:after #'julia-repl--setup-term
(with-current-buffer inferior-buffer
(term-set-escape-char ?\C-c) ; override default of C-x..
))
)
(use-package! lsp-julia
:when (featurep! +lsp)
:after lsp-clients
)