Types
Core types
JuliaWorkspaces.JuliaWorkspace — Type
struct JuliaWorkspaceThe central handle representing a Julia workspace. It wraps a Salsa runtime that holds all mutable inputs (the set of files, the active project, and dynamic-feature results) and memoizes every derived query computed from them. A workspace is manipulated through the mutation functions (add_file!, update_file!, remove_file!, …) and inspected through the query functions (get_diagnostics, get_julia_syntax_tree, …).
Constructor
JuliaWorkspace(; dynamic=DynamicOff, store_path=nothing,
symbolcache_download=false,
symbolcache_upstream=DEFAULT_SYMBOLCACHE_UPSTREAM,
indirect_file_watch_callback=nothing,
progress_callback=nothing)Create an empty workspace. To build one directly from folders on disc, use workspace_from_folders instead.
Keyword arguments
dynamic::DynamicMode: Whether and how to run the out-of-process dynamic feature that indexes environments. SeeDynamicMode.store_path::Union{Nothing,String}: Directory used to cache package symbol data (.jstorefiles). Defaults to a managed scratch space.symbolcache_download::Bool: Iftrue, allow downloading precomputed symbol caches fromsymbolcache_upstreamrather than indexing locally.symbolcache_upstream::String: Upstream URL for symbol-cache downloads. Defaults toDEFAULT_SYMBOLCACHE_UPSTREAM.indirect_file_watch_callback::Union{Nothing,Function}: Invoked once with aURIthe first time an indirect file (a file pulled in viaincludebut not explicitly added) is requested. Intended for a host to register a file watcher.progress_callback::Union{Nothing,Function}: Invoked as(key::String, message::String, percentage::Int)with progress updates while the dynamic feature indexes environments.keyidentifies the operation (each concurrently running operation — downloading caches for a project, indexing a project, loading caches — is its own progress bar with the full 0–100 range); a report withpercentage >= 100ends that operation's bar.max_concurrent_djps::Int: Maximum number of concurrently working dynamic child processes (0disables the limit). Defaults to 4.max_failure_attempts::Int: How many terminal failures a project may accumulate before the dynamic feature stops launching child processes for it (0or less disables the bound). Defaults toDEFAULT_MAX_FAILURE_ATTEMPTS. Seeretry_failed_dynamic_projects!to clear the budget.djp_request_timeout_seconds::Int: How long a child process may take to answer one indexing request before the work item is failed (0or less means no deadline). Defaults toDEFAULT_DJP_REQUEST_TIMEOUT_SECONDS.resolve_workspace_environments::Bool: Whenfalse, no standalone package projects or test environments are created; only real project environments are watched. Defaults totrue.
JuliaWorkspaces.TextFile — Type
struct TextFileA text file, consisting of its URI and content.
uri::URI: TheURIof the file.content::SourceText: The content of the file asSourceText.
JuliaWorkspaces.SourceText — Type
struct SourceTextA source text, consisting of its content, line indices, and language ID.
- content::String
- line_indices::Vector{Int}
- language_id::String
JuliaWorkspaces.Diagnostic — Type
struct DiagnosticA diagnostic struct, consisting of range, severity, message, and source.
- range::UnitRange{Int64}
- severity::Symbol
- message::String
- uri::Union{Nothing,URI}
- tags::Vector{Symbol}
- source::String
- code::Union{Nothing,Symbol}: stable rule id, see
LINT_RULESinlint_rules.jl. This is the identifier users name inJuliaLint.toml, and what is reported as the rule id in the CLI's JSON and SARIF output.
Dynamic feature
JuliaWorkspaces.DynamicMode — Type
@enum DynamicMode DynamicOff DynamicIndexingOnly DynamicPersistentControls how a JuliaWorkspace uses the out-of-process dynamic feature that indexes package environments and resolves symbol information.
DynamicOff: No dynamic feature is started. The workspace only relies on statically available information (parsed sources,Project.toml/Manifest.tomlcontents, and any locally cached symbol data). Environment-dependent diagnostics are suppressed because no environment can be resolved.DynamicIndexingOnly: Child Julia processes are spawned to index project and test environments (populating the on-disc symbol cache), but they are torn down once indexing completes. Use this for one-shot tools such as CI runs.DynamicPersistent: LikeDynamicIndexingOnly, but the child processes are kept alive so the workspace can react to ongoing changes. Use this for long-running hosts such as a language server.
See also is_ready, wait_until_ready.
JuliaWorkspaces.DEFAULT_SYMBOLCACHE_UPSTREAM — Constant
DEFAULT_SYMBOLCACHE_UPSTREAMDefault upstream URL from which precomputed package symbol caches are downloaded when symbolcache_download is enabled on a JuliaWorkspace. Downloading a cached index avoids having to index a package locally.
JuliaWorkspaces.DEFAULT_MAX_FAILURE_ATTEMPTS — Constant
DEFAULT_MAX_FAILURE_ATTEMPTSTerminal failures tolerated per work-item identity before the reactor stops launching children for it. Two, so the first genuine fix to a broken Project.toml still gets a fresh attempt, while a deterministically unresolvable project (an unsatisfiable test env, an unregistered dependency) stops costing a child process per edit.
JuliaWorkspaces.DEFAULT_DJP_REQUEST_TIMEOUT_SECONDS — Constant
DEFAULT_DJP_REQUEST_TIMEOUT_SECONDSHow long a child indexing process may take to answer one request. Generous — indexing a large environment from cold legitimately takes minutes — but finite, because an unbounded wait turns a wedged child into a wedged host: the work item stays pending forever and is_ready never becomes true.
Completion result types
JuliaWorkspaces.CompletionResult — Type
struct CompletionResultThe full result of a completion request.
is_incomplete::Bool:trueif the list is truncated and should be recomputed as the user keeps typing.items::Vector{CompletionResultItem}: The completion candidates.
JuliaWorkspaces.CompletionResultItem — Type
struct CompletionResultItemA single completion candidate, expressed without any LSP types.
label::String: Text shown in the completion list.kind::Int: ACompletionKindsvalue.detail,detail_label,detail_description: Optional detail strings.documentation::Union{Nothing,String}: Optional markdown documentation.sort_text,filter_text: Optional overrides for sorting/filtering.insert_text_format::Int: AnInsertFormatsvalue.text_edit::CompletionEdit: The primary edit applied on acceptance.additional_edits::Vector{CompletionEdit}: Extra edits (for example new imports).data::Union{Nothing,String}: Opaque payload carried through to resolution.
JuliaWorkspaces.CompletionEdit — Type
struct CompletionEditA text edit attached to a completion item, expressed with Position values rather than LSP types.
start::Position: Start of the range to replace.stop::Position: End of the range to replace.new_text::String: Replacement text.uri::Union{Nothing,URI}: Target file, ornothingfor the current file.
JuliaWorkspaces.CompletionKinds — Module
module CompletionKindsNamed constants for completion item kinds, mirroring the LSP CompletionItemKind enumeration. Used as the kind field of CompletionResultItem.
JuliaWorkspaces.InsertFormats — Module
module InsertFormatsNamed constants for completion insert-text formats: PlainText (literal text) and Snippet (LSP snippet syntax with placeholders). Used as the insert_text_format field of CompletionResultItem.
Reference, definition and rename result types
JuliaWorkspaces.DefinitionResult — Type
struct DefinitionResultThe location a go-to-definition request resolves to.
uri::URI: File containing the definition.start::Position: Start of the definition's name range.stop::Position: End of the definition's name range.
JuliaWorkspaces.ReferenceResult — Type
struct ReferenceResultA single location where a symbol is referenced (used by find-references).
uri::URI: File containing the reference.start::Position: Start of the reference range.stop::Position: End of the reference range.
JuliaWorkspaces.RenameEdit — Type
struct RenameEditA single text edit that renames an occurrence of a symbol.
uri::URI: File the edit applies to.start::Position: Start of the range to replace.stop::Position: End of the range to replace.new_text::String: Replacement text.
JuliaWorkspaces.HighlightResult — Type
struct HighlightResultA document-highlight range for an occurrence of a symbol.
start::Position: Start of the occurrence.stop::Position: End of the occurrence.kind::Symbol::reador:write, indicating whether the occurrence reads or writes the symbol.
Signature help result types
JuliaWorkspaces.SignatureResult — Type
struct SignatureResultThe result of a signature-help request at a call site.
signatures::Vector{SignatureInfo}: Candidate signatures for the call.active_signature::Int: Index of the signature to highlight.active_parameter::Int: Index of the parameter to highlight.
JuliaWorkspaces.SignatureInfo — Type
struct SignatureInfoDescribes a single callable signature in a signature-help result.
label::String: The full signature rendered as text.documentation::String: Documentation for the signature.parameters::Vector{ParameterInfo}: The signature's parameters in order.
JuliaWorkspaces.ParameterInfo — Type
struct ParameterInfoDescribes a single parameter of a function signature in signature help.
label::Union{String,Tuple{Int,Int}}: The parameter as it appears in the signature — either the exact substring, or a[start, end)UTF-16 offset range into the signature label (LSPParameterInformation.label).documentation::Union{String,Nothing}: Optional documentation for the parameter.
Symbol result types
JuliaWorkspaces.DocumentSymbolResult — Type
struct DocumentSymbolResultA node in the document-outline tree (document symbols).
name::String: Display name of the symbol.kind::Int: LSPSymbolKindinteger.start::Position: Start of the symbol's range.stop::Position: End of the symbol's range.children::Vector{DocumentSymbolResult}: Nested symbols.
JuliaWorkspaces.WorkspaceSymbolResult — Type
struct WorkspaceSymbolResultA single match returned by a workspace-wide symbol search.
name::String: Display name of the symbol.kind::Int: LSPSymbolKindinteger.uri::URI: File containing the symbol.start::Position: Start of the symbol's range.stop::Position: End of the symbol's range.
Navigation result types
JuliaWorkspaces.SelectionRangeResult — Type
struct SelectionRangeResultA nested selection range used to grow/shrink an editor selection. Each result points to its enclosing range via parent, forming a chain from the innermost to the outermost syntactic construct.
start::Position: Start of this selection range.stop::Position: End of this selection range.parent::Union{Nothing,SelectionRangeResult}: The enclosing range, ornothingfor the outermost range.
JuliaWorkspaces.BlockRangeResult — Type
struct BlockRangeResultDescribes the syntactic block surrounding a position, distinguishing the full block extent from the sub-range to highlight.
block_start::Position: Start of the enclosing block.highlight_start::Position: Start of the range to highlight.highlight_stop::Position: End of the range to highlight.block_stop::Position: End of the enclosing block.
Document link and inlay hint result types
JuliaWorkspaces.DocumentLinkResult — Type
struct DocumentLinkResultA clickable link discovered in a source file (for example a path in a string literal passed to include).
start::Position: Start of the link's text range.stop::Position: End of the link's text range.target_uri::URI: The link target.
JuliaWorkspaces.InlayHintResult — Type
struct InlayHintResultA single inlay hint rendered inline in the editor.
position::Position: Where the hint is anchored.label::String: Hint text.kind::Symbol::parameter(a parameter name) or:type(an inferred type).padding_left::Bool: Whether to render padding before the hint.padding_right::Bool: Whether to render padding after the hint.
JuliaWorkspaces.InlayHintConfig — Type
struct InlayHintConfigConfiguration controlling which inlay hints are produced.
enabled::Bool: Master switch for inlay hints.variable_types::Bool: Whether to show inferred variable type hints.parameter_names::Symbol: Which parameter-name hints to show::all,:literals, or:nothing.
Code action result types
JuliaWorkspaces.CodeActionInfo — Type
struct CodeActionInfoDescribes a code action that is available at a given location, without yet computing its edits. Pass its id to execute_code_action to obtain the concrete edits.
id::String: Stable identifier of the action.title::String: Human-readable title shown to the user.kind::Symbol: One of:quickfix,:refactor,:refactor_rewrite,:source_organize_imports, or:empty.is_preferred::Bool: Whether this action should be offered as the preferred fix.
JuliaWorkspaces.TextEditResult — Type
struct TextEditResultA single text replacement produced by a code action.
start::Position: Start of the range to replace.stop::Position: End of the range to replace.new_text::String: Replacement text.
JuliaWorkspaces.WorkspaceFileEdit — Type
struct WorkspaceFileEditA group of TextEditResult edits that apply to a single file, as part of a workspace-wide edit produced by a code action.
uri::URI: File the edits apply to.edits::Vector{TextEditResult}: Edits for that file.
Configuration types
See Configuration for the file format these describe.
JuliaWorkspaces.LintRule — Type
struct LintRuleA user-facing lint rule. Fully declarative: everything the pipeline needs to know about a rule — where its findings come from, how each preset classifies it, its tags and documentation link, whether it depends on the environment being ready — is a field here rather than a side table.
id::Symbol: The rule id, as written inJuliaLint.tomland reported onDiagnostic.code.tier::LintTier: The inputs the rule needs, seeLintTier.severity_minimal/severity_default/severity_strict::Symbol: The rule's severity in each preset (:off,:hint,:information,:warning,:error). Every rule classifies all three presets, so the "every preset classifies every rule" invariant holds by construction. Prefer:offinminimalanddefaultfor a new rule: a rule that switches itself on for every project on upgrade breaks their CI.tags::Vector{Symbol}: LSP diagnostic tags, e.g.[:unnecessary]. A property of the rule, not of the configured severity: an unused binding stays "unnecessary" (greyed out by the editor) whether the user reports it as a hint or an error.doc_link::Union{Nothing,URI}: Documentation link surfaced as the diagnostic's code description.env_dependent::Bool: Whether findings depend on package symbols being indexed; such rules are suppressed until a file's environment is ready (see_is_env_dependent_finding).option_keys::Vector{Symbol}: Extra keys accepted alongsideseveritywhen the rule is configured as a table.codes::Vector{StaticLint.LintCodes}: The StaticLint codes this rule covers; empty for rules backed by another analysis.category::Union{Nothing,Symbol}: TheStaticLint.LintOptionsfield that gates the check emitting these codes, ornothingwhen the check always runs (those rules are filtered when diagnostics are emitted instead).
JuliaWorkspaces.LintTier — Type
@enum LintTierThe inputs a lint rule needs, from least to most:
TierSyntax: the syntax tree of a single file, nothing else.TierSemantic: a single file plus semantic information (bindings, scopes, package symbols — today the StaticLint semantic pass).TierProject: project or environment information (Project.toml, Manifest, configuration files, environment resolution).TierWorkspace: cross-file workspace information (include graph, the full set of configuration files).
The tier determines which derived query produces a rule's findings and which prerequisites gate it; it is not user-visible.
JuliaWorkspaces.EffectiveLintConfig — Type
struct EffectiveLintConfigThe lint configuration in force for one file, after resolving the preset baseline, the config file's [rules] deltas and any applicable [[override]] blocks.
severities::Dict{Symbol,Symbol}: rule id → severity,:offwhen disabled.options::Dict{Symbol,Dict{Symbol,Any}}: rule id → that rule's extra options.selected::Bool: whether the file is linted at all (include/exclude).
JuliaWorkspaces.EffectiveFormatConfig — Type
struct EffectiveFormatConfigThe formatting configuration in force for one file, after resolving the style preset, the [options] deltas and any applicable [[override]] blocks.
style::String: The style preset.options::Dict{Symbol,Any}:JuliaFormatter.Optionsoverrides.selected::Bool: Whether the file is formatted at all (include/exclude).
JuliaWorkspaces.GlobPattern — Type
struct GlobPatternA compiled gitignore-style glob. * matches within a path segment, ** spans segments, ? matches a single non-separator character, and [...] is a character class. A leading / anchors the pattern to the config file's directory; a pattern containing no / matches at any depth. A trailing / makes the pattern match everything below that directory.
The source pattern is what participates in equality, so that configs compare and hash by their written form (the compiled regex is derived from it).
JuliaWorkspaces.PathFilter — Type
struct PathFilterThe include/exclude glob pair of a config file. An empty include list selects everything; exclude always wins over include.
Internal types
JuliaWorkspaces.Position — Type
struct PositionA position in a source file expressed as a 1-based line number and a 1-based UTF-8 byte column within that line.
line::Int: 1-based line number.column::Int: 1-based UTF-8 byte offset from the start of the line.
JuliaWorkspaces.JuliaPackage — Type
struct JuliaPackageDetails of a Julia package.
project_file_uri::URI- name::String
- uuid::UUID
- content_hash::UInt64
JuliaWorkspaces.JuliaTestEnv — Type
struct JuliaTestEnvDetails of a Julia test environment.
- package_name::String
- package_uri::Union{URI,Nothing}
- project_uri::Union{URI,Nothing}
env_content_hash::Union{UInt,Nothing}
JuliaWorkspaces.JuliaProject — Type
struct JuliaProjectDetails of a Julia project.
project_file_uri::URImanifest_file_uri::URIjulia_version::Union{Nothing,VersionNumber}- content_hash::UInt64
- deved_packages::Dict{String,JuliaProjectEntryDevedPackage}
- regular_packages::Dict{String,JuliaProjectEntryRegularPackage}
- stdlib_packages::Dict{String,JuliaProjectEntryStdlibPackage}
JuliaWorkspaces.JuliaProjectEntryDevedPackage — Type
struct JuliaProjectEntryDevedPackageDetails of a Julia project entry for a developed package.
- name::String
- uuid::UUID
- uri::URI
- version::String
JuliaWorkspaces.JuliaProjectEntryRegularPackage — Type
struct JuliaProjectEntryRegularPackageDetails of a Julia project entry for a regular package.
- name::String
- uuid::UUID
- version::String
git_tree_sha1::String
JuliaWorkspaces.JuliaProjectEntryStdlibPackage — Type
struct JuliaProjectEntryStdlibPackageDetails of a Julia project entry for a standard library package.
- name::String
- uuid::UUID
- version::Union{Nothing,String}
JuliaWorkspaces.NotebookFile — Type
struct NotebookFileA notebook file, consisting of its URI and cells.
uri::URI: TheURIof the file.cells::Vector{SourceText}: The cells of the notebook as a vector ofSourceText.
JuliaWorkspaces.TestSetupDetail — Type
struct TestSetupDetailDetails of a test setup.
- uri::URI
- name::Symbol
- kind::Symbol
- code::String
- range::UnitRange{Int}
- code_range::UnitRange{Int}
JuliaWorkspaces.TestDetails — Type
struct TestDetailsDetails of a test.
- testitems::Vector{TestItemDetail}
- testsetups::Vector{TestSetupDetail}
- testerrors::Vector{TestErrorDetail}
JuliaWorkspaces.TestItemDetail — Type
struct TestItemDetailDetails of a test item.
- uri::URI
- id::String
- name::String
- code::String
- range::UnitRange{Int}
- code_range::UnitRange{Int}
option_default_imports::Bool- option_tags::Vector{Symbol}
- option_setup::Vector{Symbol}
option_skip::Union{Bool,String} — a literaltrue/false, or the source text of an expression that the test process evaluates just before the test item would run.
JuliaWorkspaces.TestErrorDetail — Type
struct TestErrorDetailDetails of a test error.
- uri::URI
- id::String
- name::Union{Nothing,String}
- message::String
- range::UnitRange{Int}
JuliaWorkspaces.URIs2.URI — Type
struct URIDetails of a Unified Resource Identifier.
- scheme::Union{Nothing, String}
- authority::Union{Nothing, String}
- path::String
- query::Union{Nothing, String}
- fragment::Union{Nothing, String}