feat(julia): add julia-snail

This commit is contained in:
Edmund Miller 2022-07-18 14:42:55 -05:00
parent 07fca78615
commit 6074fc3aa8
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D
3 changed files with 27 additions and 0 deletions

View file

@ -96,3 +96,25 @@
;; Prevent timeout while installing LanguageServer.jl ;; Prevent timeout while installing LanguageServer.jl
(setq-hook! 'julia-mode-hook eglot-connect-timeout (max eglot-connect-timeout 60)) (setq-hook! 'julia-mode-hook eglot-connect-timeout (max eglot-connect-timeout 60))
:config (eglot-jl-init)) :config (eglot-jl-init))
(use-package! julia-snail
:when (featurep! +snail)
:hook (julia-mode . julia-snail-mode)
:config
(setq julia-snail-popup-display-eval-results :command)
(setq julia-snail-multimedia-enable t)
(setq julia-snail-popup-display-face '(:background "grey10" :box (:line-width 1 :color "black")
((class color) (background dark))))
(set-popup-rule! "^\\*julia.*\\*$" :ttl nil :select nil :quit nil)
(map! (:localleader
(:map (julia-snail-mode-map)
"'" #'julia-snail
"a" #'julia-snail-package-activate
"r" #'julia-snail-update-module-cache
"d" #'julia-snail-doc-lookup
(:prefix ("e" . "eval")
"b" #'julia-snail-send-buffer-file
"l" #'julia-snail-send-line
"r" #'julia-snail-send-region
"e" #'julia-snail-send-dwim)))))

View file

@ -21,3 +21,5 @@
"-e" "using LanguageServer, SymbolServer"))))) "-e" "using LanguageServer, SymbolServer")))))
(unless (zerop (car (apply #'doom-call-process args))) (unless (zerop (car (apply #'doom-call-process args)))
(warn! "Couldn't find LanguageServer.jl and/or SymbolServer.jl")))) (warn! "Couldn't find LanguageServer.jl and/or SymbolServer.jl"))))
;; TODO Check for snail

View file

@ -8,3 +8,6 @@
(if (modulep! :tools lsp +eglot) (if (modulep! :tools lsp +eglot)
(package! eglot-jl :pin "2e04597223553a369dd5b6520b6365b41e6ea508") (package! eglot-jl :pin "2e04597223553a369dd5b6520b6365b41e6ea508")
(package! lsp-julia :pin "d6688bb131ff4a5a0201f6d3826ef0b018265389"))) (package! lsp-julia :pin "d6688bb131ff4a5a0201f6d3826ef0b018265389")))
(when (featurep! +snail)
(package! julia-snail :pin "326da9a7d0463ed2727f66dcbd4cb58b517ffe25"))