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 with progress updates while the dynamic feature indexes environments.
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
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.
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::String: The parameter's textual label as it appears in the signature.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.
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}
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}