You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

4.9 KiB

Setup of tested language servers

JavaScript/TypeScript

JavaScript with Flow static type checker

  • Prerequisites:
    • Node.js
  • Recommended:
    • Prettier (installed globally: install i -g prettier)

Install language server, and create executable to enable server in juCi++:

npm install -g flow-bin

# Usually as root:
echo '#!/bin/sh
flow lsp' > /usr/local/bin/javascript-language-server
chmod 755 /usr/local/bin/javascript-language-server
  • Additional setup within a JavaScript project:
    • Add a .prettierrc file to enable style format on save

TypeScript or JavaScript without Flow

  • Prerequisites:
    • Node.js
  • Recommended:
    • Prettier (installed globally: install i -g prettier)

Install language server, and create executable to enable server in juCi++:

npm install -g typescript-language-server typescript

# Usually as root:
echo '#!/bin/sh
`npm root -g`/typescript-language-server/lib/cli.js --stdio' > /usr/local/bin/javascript-language-server
chmod 755 /usr/local/bin/javascript-language-server
rm -f /usr/local/bin/typescript-language-server
cp /usr/local/bin/javascript-language-server /usr/local/bin/typescript-language-server
cp /usr/local/bin/javascript-language-server /usr/local/bin/typescriptreact-language-server
  • Additional setup within a JavaScript project:
    • Add a .prettierrc file to enable style format on save

Python3

  • Prerequisites:
    • Python3
    • In juCi++ preferences, set project.python_command to python3 -u

Python LSP Server

Install language server, and create symbolic link to enable server in juCi++:

pip3 install python-lsp-server[pycodestyle,yapf]

# Usually as root:
ln -s `which pylsp` /usr/local/bin/python-language-server
  • Additional setup within a Python project:
    • Add a setup file, for instance: printf '[pycodestyle]\nmax-line-length = 120\n\n[yapf]\nCOLUMN_LIMIT = 120\n' > setup.cfg
    • Add an empty .python-format file to enable style format on save

Pyright

  • Prerequisite:
    • Node.js
  • Recommended:
    • YAPF for style format (pip3 install yapf)

Install language server, and create executable to enable server in juCi++:

npm install -g pyright

# Usually as root:
echo '#!/bin/sh
pyright-langserver --stdio' > /usr/local/bin/python-language-server
chmod 755 /usr/local/bin/python-language-server
  • Additional setup within a Python project:
    • Add Pyright configuration file: echo '{}' > pyrightconfig.json
    • Add style format file to enable format on save, for instance: printf '[style]\nCOLUMN_LIMIT = 120\n' > .style.yapf

Rust

  • Prerequisites:

Install language server:

rustup component add rust-analyzer
  • Additional setup within a Rust project:
    • Add an empty .rustfmt.toml file to enable style format on save

Go

  • Prerequisites:

Create symbolic link to enable language server in juCi++:

# Usually as root:
ln -s `which gopls` /usr/local/bin/go-language-server
  • Additional setup within a Go project:
    • Add an empty .go-format file to enable style format on save

Julia

Install language server, and create executable to enable server in juCi++:

julia -e 'using Pkg;Pkg.add("LanguageServer");Pkg.add("SymbolServer");Pkg.add("StaticLint");'

# Usually as root:
echo '#!/bin/sh
julia --startup-file=no --history-file=no -e '\''
using LanguageServer;
using Pkg;
import StaticLint;
import SymbolServer;
env_path = dirname(Pkg.Types.Context().env.project_file);
server = LanguageServer.LanguageServerInstance(stdin, stdout, env_path, "");
server.runlinter = true;
run(server);
'\''' > /usr/local/bin/julia-language-server
chmod 755 /usr/local/bin/julia-language-server
  • Additional setup within a Julia project:
    • Add an empty .julia-format file to enable style format on save

GLSL

Install language server, and create a script to enable server in juCi++:

git clone https://github.com/svenstaro/glsl-language-server --recursive
cd glsl-language-server
mkdir build
cd build
cmake ..
make
# Usually as root:
make install
echo '#!/bin/sh
/usr/local/bin/glslls --stdin' > /usr/local/bin/glsl-language-server
chmod 755 /usr/local/bin/glsl-language-server

C++

  • Prerequisites:
    • A language server installed on your system (clangd or ccls)

Create symbolic link to enable language server in juCi++. For example, if you have the clangd installed and available on path:

# Usually as root:
ln -s `which clangd` /usr/local/bin/cpp-language-server