From 42f9ad4290dab859afc295874a5acfb6a3daafde Mon Sep 17 00:00:00 2001 From: Adam Beckmeyer Date: Fri, 10 Aug 2018 23:31:29 -0400 Subject: [PATCH] Add dedicated julia layer --- layers/+lang/julia/README.org | 87 +++++++++++++++++++++++++++++++ layers/+lang/julia/config.el | 22 ++++++++ layers/+lang/julia/funcs.el | 27 ++++++++++ layers/+lang/julia/img/julia.png | Bin 0 -> 12522 bytes layers/+lang/julia/packages.el | 83 +++++++++++++++++++++++++++++ 5 files changed, 219 insertions(+) create mode 100644 layers/+lang/julia/README.org create mode 100644 layers/+lang/julia/config.el create mode 100644 layers/+lang/julia/funcs.el create mode 100644 layers/+lang/julia/img/julia.png create mode 100644 layers/+lang/julia/packages.el diff --git a/layers/+lang/julia/README.org b/layers/+lang/julia/README.org new file mode 100644 index 000000000000..74b14bdef329 --- /dev/null +++ b/layers/+lang/julia/README.org @@ -0,0 +1,87 @@ +#+TITLE: julia layer + +# The maximum height of the logo should be 200 pixels. +[[file:img/julia.png]] +# TOC links should be GitHub style anchors. + +* Table of Contents :TOC_4_gh:noexport: +- [[#description][Description]] + - [[#features][Features:]] +- [[#install][Install]] + - [[#lsp][LSP]] +- [[#options][Options]] +- [[#key-bindings][Key bindings]] + +* Description +This layer adds support for [[https://julialang.org][Julia]] to Spacemacs. + +** Features: + - Syntax highlighting + - Repl support + - Linting + - Completion + - Jump-to-definition + - Documentation on hover + +* Install +To use this configuration layer, add it to your =~/.spacemacs=. You will need to +add =julia= to the existing =dotspacemacs-configuration-layers= list in this +file. + +** LSP +Warning: enabling the LSP functionality within this package can cause emacs to +hang for significant lengths of time when opening a Julia file. See tip below on +using PackageCompiler.jl to mitigate this issue. + +This layer can be used with [[https://github.com/JuliaEditorSupport/LanguageServer.jl][=LanguageServer.jl=]] and emacs [[https://github.com/emacs-lsp/lsp-mode][=lsp-mode=]] to provide +richer, IDE-like capabilities. To use this layer with lsp, you must do the +following: + +1. Add =lsp= to =dotspacemacs-configuration-layers=. +2. Install =LanguageServer.jl= by invoking =Pkg.add("LanguageServer") in the + Julia REPL. +3. Enable layer integration with lsp as described in section below. + +=LanguageServer.jl= tends to have a very long startup time. In the worst case, +=lsp-mode= might give up on the language server before its started, but +regardless usage of =lsp-mode= with Julia can cause long delays when first +opening files. To mitigate this issue, you can try compiling =LanguageServer.jl= +ahead of time using [[https://github.com/JuliaLang/PackageCompiler.jl][=PackageCompiler.jl=]] this drastically reduces startup time +if successful. + +* Options +While =julia-mode= is perfectly usable without configuration or other packages, +you can choose to replace the default functionality of using [[https://github.com/tpapp/julia-repl/][=julia-repl=]] as the +layer's interactive REPL with the ess REPL and other functionality that comes +with it. To do so, install this layer with: + +#+BEGIN_SRC emacs-lisp + (setq-default + dotspacemacs-configuration-layers + '( + (julia :variables julia-mode-enable-ess t))) +#+END_SRC + +This layer also includes experimental support for =lsp-mode=. To enable language +server functionality with this layer, follow [[#lsp][the instructions for installation]], +and then install this layer with: + +#+BEGIN_SRC emacs-lisp + (setq-default + dotspacemacs-configuration-layers + '( + (julia :variables julia-mode-enable-lsp t))) +#+END_SRC + +* Key bindings + +| Key Binding | Description | +|-------------+------------------------------------------------------------| +| ~SPC m h h~ | Calls ~@doc~ macro on symbol under cursor. | +| ~SPC m e m~ | Expands macro under cursor. | +| ~SPC m w~ | Calls ~workspace()~ in Repl to give clean namespace. | +| ~SPC e l~ | Expands latex macro (e.g. =\delta=). | +| ~SPC m s b~ | Sends buffer to REPL. | +| ~SPC m s l~ | Sends line to REPL. | +| ~SPC m s r~ | Sends region to REPL. | +| ~SPC m r~ | Brings up Julia Repl (starts new one or focuses existing). | diff --git a/layers/+lang/julia/config.el b/layers/+lang/julia/config.el new file mode 100644 index 000000000000..0483a84d894d --- /dev/null +++ b/layers/+lang/julia/config.el @@ -0,0 +1,22 @@ +;;; config.el --- Python Layer Configuration File for Spacemacs +;; +;; Copyright (c) 2012-2018 Sylvain Benner & Contributors +;; +;; Author: Adam Beckmeyer +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +;; variables + +(spacemacs|define-jump-handlers julia-mode) + +;; ess-mode is what the majority of people developing julia in emacs currently use +(defvar julia-mode-enable-ess nil + "If non-nil, enable ESS in julia-mode buffers and disable julia-repl.") + +;; disabled by default since most won't have lsp-mode working +(defvar julia-mode-enable-lsp nil + "If non-nil, enable lsp-mode in julia-mode buffers.") diff --git a/layers/+lang/julia/funcs.el b/layers/+lang/julia/funcs.el new file mode 100644 index 000000000000..e72d674b8419 --- /dev/null +++ b/layers/+lang/julia/funcs.el @@ -0,0 +1,27 @@ +;;; funcs.el --- Julia Layer functions File for Spacemacs +;; +;; Copyright (c) 2012-2018 Sylvain Benner & Contributors +;; +;; Author: Adam Beckmeyer +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(defun spacemacs//julia-setup-buffer () + "Setup ESS and/or lsp for buffer depending on config." + (if (not julia-mode-enable-ess) + (spacemacs//julia-setup-repl)) + (if julia-mode-enable-lsp + (spacemacs//julia-setup-lsp))) + +(defun spacemacs//julia-setup-repl () + "Start julia-repl minor mode and configure for buffer." + (julia-repl-mode)) + +(defun spacemacs//julia-setup-lsp () + "Start lsp-mode and configure for buffer." + (if (configuration-layer/layer-used-p 'lsp) + (lsp-julia-enable) + (message "`lsp' layer is not installed, please add `lsp' layer to your dotfile."))) diff --git a/layers/+lang/julia/img/julia.png b/layers/+lang/julia/img/julia.png new file mode 100644 index 0000000000000000000000000000000000000000..ddc20c6b3837f1fdd84c58384bb4c55571ba201f GIT binary patch literal 12522 zcmZ9z1ymc~6F&-tLU4C?cZy4Kf=i1Of)p?A4uvAci$icP#oeJuaZhn~cMbZ|@9+Kp z=e&1vHk-4%Gjs3Eo!PmcnM7!)DPW+IqQb$!VE`3nwP5E5*ii~Vf_=Zar8b9ygQu~P zkj> zm5E>;MQ`zKf$aTp{ts#^>PNtju~bY`WB8gx>SHEq51dK7_qRkp9^A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Ig*^)glv9(flr{ +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(defconst julia-packages + '( + (julia-mode :location elpa) + (julia-repl :location elpa) + (lsp-julia :location (recipe :fetcher github + :repo "non-Jedi/lsp-julia")) + flycheck + company-lsp + )) + +(defun julia/init-julia-mode () + (use-package julia-mode + :defer t + :init (progn + (add-hook 'julia-mode-hook #'spacemacs//julia-setup-buffer) + (if (and (configuration-layer/layer-used-p 'ess) + julia-mode-enable-ess) + (add-to-list 'auto-mode-alist + '("\\.jl\\'" . ess-julia-mode))) + (if (and (not (configuration-layer/layer-used-p 'ess)) + julia-mode-enable-ess) + (message "`ess' layer is not installed. Please add `ess' layer to your dotfile."))) + :config (progn + (spacemacs/declare-prefix-for-mode 'julia-mode + "mh" "help") + (spacemacs/declare-prefix-for-mode 'julia-mode + "me" "eval") + (spacemacs/declare-prefix-for-mode 'julia-mode + "m=" "format") + (spacemacs/set-leader-keys-for-major-mode 'julia-mode + "el" 'julia-latexsub + "==" 'julia-indent-line)))) + +(defun julia/init-julia-repl () + (use-package julia-repl + :defer t + :init (progn + (spacemacs/register-repl 'julia-repl 'julia-repl + "julia-repl")) + :config (progn + (spacemacs/declare-prefix-for-mode 'julia-repl-mode + "ms" "send") + (spacemacs/set-leader-keys-for-minor-mode + 'julia-repl-mode + "'" 'julia-repl-edit + "hh" 'julia-repl-doc + "w" 'julia-repl-workspace + "em" 'julia-repl-macroexpand + "r" 'julia-repl + "si" 'julia-repl + "sb" 'julia-repl-send-buffer + "sl" 'julia-repl-send-line + "sr" 'julia-repl-send-region-or-line + "em" 'julia-repl-macroexpand)))) + +(defun julia/init-lsp-julia () + (use-package lsp-julia + :config (progn + (push 'xref-find-definitions spacemacs-jump-handlers-julia-mode)) + :commands lsp-julia-enable)) + +(defun julia/post-init-company-lsp () + (spacemacs|add-company-backends + :backends company-lsp + :modes julia-mode + :variables + company-minimum-prefix-length 0 + company-idle-delay 0.5)) + +(defun julia/post-init-flycheck () + (spacemacs/enable-flycheck 'julia-mode)) +;;; packages.el ends here