Skip to content

Commit eb05618

Browse files
committed
Complete README for layer
1 parent 25b057b commit eb05618

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

layers/+lang/julia/README.org

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- [[#description][Description]]
99
- [[#features][Features:]]
1010
- [[#install][Install]]
11+
- [[#lsp][LSP]]
12+
- [[#options][Options]]
1113
- [[#key-bindings][Key bindings]]
1214
- [[#editing][Editing]]
1315
- [[#repl][Repl]]
@@ -28,6 +30,46 @@ To use this configuration layer, add it to your =~/.spacemacs=. You will need to
2830
add =julia= to the existing =dotspacemacs-configuration-layers= list in this
2931
file.
3032

33+
** LSP
34+
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
35+
richer, IDE-like capabilities. To use this layer with lsp, you must do the
36+
following:
37+
38+
1. Add =lsp= to =dotspacemacs-configuration-layers=.
39+
2. Install =LanguageServer.jl= by invoking =Pkg.add("LanguageServer") in the
40+
Julia REPL.
41+
3. Enable layer integration with lsp as described in section below.
42+
43+
=LanguageServer.jl= tends to have a very long startup time. In the worst case,
44+
=lsp-mode= might give up on the language server before its started, but
45+
regardless usage of =lsp-mode= with Julia can cause long delays when first
46+
opening files. To mitigate this issue, you can try compiling =LanguageServer.jl=
47+
ahead of time using [[https://github.com/JuliaLang/PackageCompiler.jl][=PackageCompiler.jl=]] this drastically reduces startup time
48+
if successful.
49+
* Options
50+
While =julia-mode= is perfectly usable without configuration or other packages,
51+
you can choose to replace the default functionality of using [[https://github.com/tpapp/julia-repl/][=julia-repl=]] as the
52+
layer's interactive REPL with the ess REPL and other functionality that comes
53+
with it. To do so, install this layer with:
54+
55+
#+BEGIN_SRC emacs-lisp
56+
(setq-default
57+
dotspacemacs-configuration-layers
58+
'(
59+
(julia :variables julia-mode-enable-ess t)))
60+
#+END_SRC
61+
62+
This layer also includes experimental support for =lsp-mode=. To enable language
63+
server functionality with this layer, follow [[#lsp][the instructions for installation]],
64+
and then install this layer with:
65+
66+
#+BEGIN_SRC emacs-lisp
67+
(setq-default
68+
dotspacemacs-configuration-layers
69+
'(
70+
(julia :variables julia-mode-enable-lsp t)))
71+
#+END_SRC
72+
3173
* Key bindings
3274

3375
| Key Binding | Description |

0 commit comments

Comments
 (0)