LanguageService
struct · ferroui-designer-language · v0.5.0
struct LanguageService
Members
newschemaschema_mutdocumentversionindexurisopenclosereplacechangeindex_solutionremove_solutiondiagnosticscompletionshoversignature_helpdefinitionsreferencesreferences_with_declarationsrenameapply_workspace_editformatsymbolsfoldingsemantic_tokensworkspace_symbolsresource_uriprepare_renamemark_savedrename_urirename_urisfile_rename_edits
new
fn new(schema: Schema) -> Self
schema
fn schema(self: &Self) -> &Schema
schema_mut
fn schema_mut(self: &mut Self) -> &mut Schema
document
fn document(self: &Self, uri: &str) -> Option<&Document>
version
fn version(self: &Self, uri: &str) -> Option<i64>
index
fn index(self: &Self, uri: &str) -> Result<&LineIndex>
uris
fn uris(self: &Self) -> impl Iterator<Item = &str>
open
fn open(self: &mut Self, uri: impl Into<String>, source: impl Into<String>, version: i64) -> Result<()>
close
fn close(self: &mut Self, uri: &str) -> Result<()>
replace
fn replace(self: &mut Self, uri: &str, source: impl Into<String>, version: i64) -> Result<()>
change
fn change(self: &mut Self, uri: &str, version: i64, changes: &[TextChange]) -> Result<()>
index_solution
fn index_solution(self: &mut Self, solution: &ferroui_designer_project::Solution) -> Result<usize>
remove_solution
fn remove_solution(self: &mut Self, root: impl AsRef<std::path::Path>) -> usize
Remove a workspace's disk snapshots while preserving open buffers and shared roots.
diagnostics
fn diagnostics(self: &Self, uri: &str) -> Result<Vec<Diagnostic>>
completions
fn completions(self: &Self, uri: &str, offset: usize) -> Result<Vec<Completion>>
hover
fn hover(self: &Self, uri: &str, offset: usize) -> Result<Option<Hover>>
signature_help
fn signature_help(self: &Self, uri: &str, offset: usize) -> Result<Option<SignatureHelp>>
definitions
fn definitions(self: &Self, uri: &str, offset: usize) -> Result<Vec<Location>>
references
fn references(self: &Self, uri: &str, offset: usize) -> Result<Vec<Location>>
references_with_declarations
fn references_with_declarations(self: &Self, uri: &str, offset: usize, include: bool) -> Result<Vec<Location>>
rename
fn rename(self: &Self, uri: &str, offset: usize, new_name: &str) -> Result<WorkspaceEdit>
apply_workspace_edit
fn apply_workspace_edit(self: &mut Self, edit: &WorkspaceEdit) -> Result<()>
format
fn format(self: &Self, uri: &str, options: FormattingOptions) -> Result<Vec<TextEdit>>
symbols
fn symbols(self: &Self, uri: &str) -> Result<Vec<DocumentSymbol>>
folding
fn folding(self: &Self, uri: &str) -> Result<Vec<FoldingRange>>
semantic_tokens
fn semantic_tokens(self: &Self, uri: &str) -> Result<Vec<SemanticToken>>
Token types: type, property, string, comment, variable, keyword, number, namespace.
workspace_symbols
fn workspace_symbols(self: &Self, query: &str) -> Result<Vec<(String, DocumentSymbol)>>
resource_uri
fn resource_uri(self: &Self, base: &str, reference: &str) -> Result<String>
prepare_rename
fn prepare_rename(self: &Self, uri: &str, offset: usize) -> Result<Option<(Range, String)>>
mark_saved
fn mark_saved(self: &mut Self, uri: &str, text: Option<&str>) -> Result<()>
rename_uri
fn rename_uri(self: &mut Self, old: &str, new: &str) -> Result<()>
rename_uris
fn rename_uris(self: &mut Self, renames: &[(String, String)]) -> Result<()>
Validate an entire client rename notification before moving any indexed state. A swap is legal; overwriting an unrelated document is not.
file_rename_edits
fn file_rename_edits(self: &Self, old: &str, new: &str) -> Result<WorkspaceEdit>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.