@@ -6,30 +6,111 @@ flycheck-julia — Flycheck for Julia
66[ ![ MELPA Stable] ( https://stable.melpa.org/packages/flycheck-julia-badge.svg )] ( https://stable.melpa.org/#/flycheck-julia )
77[ ![ Build master] ( https://api.travis-ci.org/gdkrmr/flycheck-julia.svg?branch=master )] ( https://travis-ci.org/gdkrmr/flycheck-julia )
88
9- - Add a ` julia ` syntax checker using [ Lint.jl] [ ]
9+ - Add a [ Julia ] [ ] syntax checker for [ Emacs ] [ ] and [ Flycheck ] [ ] using [ Lint.jl] [ ]
1010
1111Installation
12- ------------
12+ =====
1313
14- Install ` flycheck-julia ` from [ MELPA ] [ ] or [ MELPA Stable ] [ ]
15- and add the following to your ` init.el ` :
14+ General instructions
15+ -----
1616
17- ``` elisp
18- (flycheck-julia-setup)
19- ```
17+ - Install [ Lint.jl] [ ] in [ Julia] [ ]
2018
21- Usage
19+ Open julia and run the following commands:
20+ ``` julia
21+ Pkg. update ()
22+ Pkg. add (" Lint" )
23+ ```
24+
25+ - From [ MELPA] [ ] or [ MELPA Stable] [ ] install the following packages:
26+
27+ - [ ess] [ ] or [ julia-mode] [ ] .
28+
29+ - [ flycheck] [ ] , detailed instructions can be
30+ found [ here] ( http://www.flycheck.org/en/latest/user/installation.html ) .
31+
32+ - [ flycheck-julia] [ ] .
33+
34+ - Add the following to your configuration:
35+ ``` elisp
36+ (flycheck-julia-setup)
37+ ```
38+
39+ Installing from a fresh emacs install
2240-----
2341
24- Simply start linting by enabling ` flycheck-mode ` . If you use
25- ` flycheck-global-mode ` and want ` flycheck-julia ` enabled automatically, then add
26- the following to your ` init.del ` :
42+ - Setup your package manager
43+
44+ Add the following to
45+ your
46+ [ init file] ( http://www.flycheck.org/en/latest/glossary.html#term-init-file ) :
47+
48+ ``` elisp
49+ (require 'package)
50+ (add-to-list 'package-archives '("MELPA Stable" . "https://stable.melpa.org/packages/"))
51+ (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
52+ (package-initialize)
53+ ```
54+
55+ - Install the required packages
56+
57+ Restart emacs and run ` M-x list-packages ` or choose `Options -> Manage
58+ Packages` from the menu and install ` flycheck` , ` ess` , and ` flycheck-julia`.
2759
60+ In the ` *Packages* ` buffer you can select packages by pressing ` i ` and install
61+ all selected packages by pressing ` x ` or simply use the mouse for interaction.
62+
63+ - Configure emacs for the use with ` julia ` , ` flycheck ` , and ` flycheck-julia `
64+
65+ Add the following lines at the end of your init file:
66+
67+ ``` elisp
68+ ;; loads ess, which contains ess-julia-mode
69+ (require 'ess-site)
70+ ;; enable flycheck globally
71+ (add-hook 'after-init-hook #'global-flycheck-mode)
72+ ;; tell flycheck about the julia linter
73+ (flycheck-julia-setup)
74+ ```
75+
76+ Installing when using [ Spacemacs] [ ]
77+ -----
78+
79+ - Add the following to your ` .spacemacs ` :
80+ - the [ syntax-checking] [ ] and [ ess] [ ] layers.
81+ - to ` dotspacemacs-additional-packages ` add ` flycheck-julia `
82+ - to the ` dotspacemacs/user-config ` function add the following lines:
83+ ``` elisp
84+ (flycheck-julia-setup)
85+ (add-to-list 'flycheck-global-modes 'julia-mode)
86+ (add-to-list 'flycheck-global-modes 'ess-julia-mode)
87+ ```
88+ - Restart Emacs, this should automatically install `ess`, `flycheck`, and `flycheck-julia`
89+
90+ Manual Installing
91+ ------
92+
93+ Copy `flycheck-julia.el` somewhere and add the following to your init file:
2894```elisp
95+ (add-to-list 'load-path "/path/to/directory/containing/flycheck-julia.el/file")
96+ (require 'flycheck-julia)
97+ (flycheck-julia-setup)
2998(add-to-list 'flycheck-global-modes 'julia-mode)
3099(add-to-list 'flycheck-global-modes 'ess-julia-mode)
31100```
32101
102+ Usage
103+ -----
104+
105+ If you configured your Emacs with the instructions above, linting
106+ of Julia files should start automatically. If you did not enable
107+ ` global-flycheck-mode ` , you can enable linting of Julia files by enabling
108+ ` flycheck-mode ` .
109+
110+ Interaction with errors is done through ` flycheck ` , see
111+ the [ manual] ( http://www.flycheck.org/en/latest/user/quickstart.html ) for
112+ details.
113+
33114License
34115-------
35116
@@ -45,11 +126,19 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
45126You should have received a copy of the GNU General Public License along with
46127this program. If not, see http://www.gnu.org/licenses/ .
47128
48- See [ ` LICENSE ` ] [ license ] for details.
129+ See [ LICENSE] [ ] for details.
49130
131+ [ Spacemacs ] : https://spacemacs.org
132+ [ Emacs ] : https://www.gnu.org/software/emacs/
133+ [ flycheck-julia ] : https://github.com/gdkrmr/flycheck-julia
134+ [ Julia ] : https://julialang.org
50135[ badge-license ] : https://img.shields.io/badge/license-GPL_3-green.svg?dummy
51136[ LICENSE ] : https://github.com/gdkrmr/flycheck-julia/blob/master/LICENSE
52137[ Flycheck ] : http://www.flycheck.org
53138[ Lint.jl ] : https://github.com/tonyhffong/Lint.jl
54139[ MELPA ] : https://melpa.org
55140[ MELPA Stable ] : https://stable.melpa.org
141+ [ ess ] : http://ess.r-project.org/Manual/ess.html#Installation
142+ [ julia-mode ] : https://github.com/JuliaEditorSupport/julia-emacs/blob/master/julia-mode.el
143+ [ syntax-checking ] : http://spacemacs.org/layers/+checkers/syntax-checking/README.html
144+ [ ess ] : http://spacemacs.org/layers/+lang/ess/README.html
0 commit comments