Coder Social home page Coder Social logo

lsp-julia's Introduction

lsp-julia

Julia support for the =lsp-mode= package using the LanguageServer.jl package. For information on the features lsp-mode provides see their git repository.

Julia version 1.3 or higher has to be in your path

This package is still under development.

Installation

Installing the Julia Language Server

Included Language Server

`lsp-julia` includes a https://github.com/non-Jedi/lsp-julia/issues[working] Language Server using Git submodules by default. To initialize it, execute the following Git command in the directory of this repository:

git submodule update --init --recursive

Manual Installation

Otherwise, if you’d rather install the Language Server yourself, open a Julia REPL and install LanguageServer.jl.

julia> Pkg.add("LanguageServer")

The included server is used by default. To use the manually installed one, you need to also add the following to your init.el:

(setq lsp-julia-package-dir nil)
;; (require 'lsp-julia) must come after this!

Additionally because JIT compilation of LanguageServer.jl can cause a long delay which may cause issues with lsp-mode, I recommend using PackageCompiler.jl to AOT compile LanguageServer.jl into your julia image. Something like:

julia> Pkg.add("PackageCompiler")
julia> using PackageCompiler
julia> compile_package("LanguageServer")

See the documentation on PackageCompiler.jl for further usage details.

Installing lsp-julia

quelpa

It’s currently easiest to install this package with quelpa. I’ll see about getting this added to melpa soon enough.

(quelpa '(lsp-julia :fetcher github
                    :repo "non-Jedi/lsp-julia"
                    :files (:defaults "languageserver")))

use-package

(use-package lsp-julia
  :config
  (setq lsp-julia-default-environment "~/.julia/environments/v1.5"))

Using lsp-julia with a julia major mode

After installing the major mode of your choice for editing Julia files (julia-mode, ess, etc.), add 'lsp-mode to the hook for that major mode. For example, to use lsp-julia with ess, add the following to your .emacs file:

(add-hook 'ess-julia-mode-hook #'lsp-mode)

Please don’t hesitate to open an issue in case of problems or create a PR.

lsp-julia's People

Contributors

alexlewandowski avatar gdkrmr avatar janebert avatar martinwolke avatar non-jedi avatar ordicker avatar tpapp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.