Skip to content

julia-vscode/SymbolServer.jl

Repository files navigation

SymbolServer

Dev Project Status: Active – The project has reached a stable, usable state and is being actively developed. codecov.io

SymbolServer is a helper package for LanguageServer.jl that provides information about internal and exported variables of packages (without loading them). A package's symbol information is initially loaded in an external process but then stored on disc for (quick loading) future use.

Installation and Usage

using Pkg
Pkg.add("SymbolServer")
using SymbolServer

Documentation: Dev

Documentation for working with Julia environments is available here.

API

SymbolServerInstance(path_to_depot, path_to_store)

Creates a new symbol server instance that works on a given Julia depot. This symbol server instance can be long lived, i.e. one can re-use it for different environments etc. If path_to_store is specified, cache files will be stored there, otherwise a standard location will be used.

getstore(ssi::SymbolServerInstance, environment_path::AbstractString)

Loads the symbols for the environment in environment_path. Returns a tuple, where the first element is a return status and the second element a payload. The status can be :success (in which case the second element is the new store), :canceled if another call to getstore was initiated before a previous one finished (with nothing as the payload), or :failure with the payload being the content of the error stream of the client process.

This function is long running and should typically be called in an @async block.

Development of the VSCode extension

See https://github.com/julia-vscode/julia-vscode/wiki for information on how to test this package with the VSCode extension