An open API service indexing awesome lists of open source software.

https://github.com/dmalyuta/julia-staticlint

Emacs integration for StaticLint.jl
https://github.com/dmalyuta/julia-staticlint

Last synced: 3 months ago
JSON representation

Emacs integration for StaticLint.jl

Awesome Lists containing this project

README

          

* julia-staticlint

This simple package provides static code linting of Julia ~julia-mode~ language
buffers through the [[https://github.com/julia-vscode/StaticLint.jl][StaticLint.jl]] backend. The static linting is done by a
background process, which sends errors over a TCP connection to Flycheck for
display in the Emacs buffer. The result looks like this:

#+HTML:

This code was tested with the following setup:

- OS: Ubuntu 20.04.1 LTS
- Emacs: 27.1.9
- Julia: 1.5.3
- StaticLint: v7.0.0
- SymbolServer: v6.0.1

In order to make this code run for your Emacs setup, include the following in
your ~init.el~ (using [[https://github.com/jwiegley/use-package][use-package]] and [[https://github.com/quelpa/quelpa][quelpa]]):

#+begin_src emacs-lisp
(use-package julia-staticlint
;; https://github.com/dmalyuta/julia-staticlint
;; Emacs Flycheck support for StaticLint.jl
:ensure nil
:quelpa ((julia-staticlint :fetcher github
:repo "dmalyuta/julia-staticlint"
:files (:defaults "julia_staticlint_server.jl"
"julia_staticlint_client.jl")))
:hook ((julia-mode . julia-staticlint-activate))
:config
(julia-staticlint-init))
#+end_src

Because this code uses a Julia backend, make sure that you can open a Julia
REPL using the command ~julia~ in your terminal. You should also have the
following packages installed in Julia: ~StaticLint~, ~SymbolServer~, ~Printf~,
and ~Sockets~. Install by entering the following sequence into the Julia REPL:

#+begin_src julia
julia> using Pkg
julia> Pkg.add(["SymbolServer","StaticLint","Printf","Sockets"])
#+end_src