Skip to main content

NargoLanguageService

Struct NargoLanguageService 

Source
pub struct NargoLanguageService { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl LanguageService for NargoLanguageService

Source§

type Lang = NargoLanguage

The language type this service supports.
Source§

type Vfs = MemoryVfs

The VFS type used for source management.
Source§

fn vfs(&self) -> &Self::Vfs

Returns a reference to the underlying Virtual File System.
Source§

fn workspace(&self) -> &WorkspaceManager

Returns a reference to the workspace manager.
Source§

fn get_root( &self, uri: &str, ) -> impl Future<Output = Option<RedNode<'_, NargoLanguage>>> + Send + '_

Retrieves the root red node of a file for the given URI. Read more
Source§

fn completion( &self, uri: &str, position: usize, ) -> impl Future<Output = Vec<OakCompletionItem>> + Send + '_

Provides completion items for a file at the specified position. Read more
Source§

fn diagnostics( &self, uri: &str, ) -> impl Future<Output = Vec<OakDiagnostic>> + Send + '_

Provides diagnostics for a file.
Source§

fn initialize( &self, params: InitializeParams, ) -> impl Future<Output = ()> + Send + '_

Handles an LSP initialize request.
Source§

fn definition( &self, uri: &str, range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + '_

Finds the definition(s) of a symbol at the specified range. Read more
Source§

fn get_source(&self, uri: &str) -> Option<<Self::Vfs as Vfs>::Source>

Retrieves the source content for a given URI from the VFS.
Source§

fn with_root<'a, R, F>( &'a self, uri: &'a str, f: F, ) -> impl Future<Output = Option<R>> + Send + 'a
where R: Send, F: FnOnce(RedNode<'a, Self::Lang>) -> R + Send + 'a,

Executes a closure with the root red node of a file. Read more
Source§

fn with_roots<'a, R, F>( &'a self, uris: Vec<String>, f: F, ) -> impl Future<Output = Vec<R>> + Send + 'a
where R: Send + 'static, F: Fn(RedNode<'a, Self::Lang>) -> R + Send + Sync + 'a,

Executes a closure with multiple root nodes in parallel. Read more
Source§

fn hover( &self, _uri: &str, _range: Range<usize>, ) -> impl Future<Output = Option<Hover>> + Send

Provides hover information for a specific range in a file. Read more
Source§

fn folding_ranges( &self, _uri: &str, ) -> impl Future<Output = Vec<FoldingRange>> + Send

Provides folding ranges for a file.
Source§

fn document_symbols<'a>( &'a self, uri: &'a str, ) -> impl Future<Output = Vec<StructureItem>> + Send + 'a

Provides document symbols (structure) for a file. Read more
Source§

fn workspace_symbols<'a>( &'a self, query: String, ) -> impl Future<Output = Vec<WorkspaceSymbol>> + Send + 'a

Provides workspace-wide symbol search based on a query string. Read more
Source§

fn list_all_files( &self, root_uri: &str, ) -> impl Future<Output = Vec<String>> + Send

Recursively lists all files in the VFS starting from the given root URI. Read more
Source§

fn document_highlight<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<DocumentHighlight>> + Send + 'a

Provides document highlights for a symbol at the specified range.
Source§

fn code_action<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<CodeAction>> + Send + 'a

Provides code actions for a specific range in a file.
Source§

fn formatting<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = Vec<TextEdit>> + Send + 'a

Provides formatting edits for a file.
Source§

fn range_formatting<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<TextEdit>> + Send + 'a

Provides range formatting edits for a file.
Source§

fn rename<'a>( &'a self, _uri: &'a str, _range: Range<usize>, _new_name: String, ) -> impl Future<Output = Option<WorkspaceEdit>> + Send + 'a

Provides rename edits for a symbol at the specified range.
Source§

fn semantic_tokens<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = Option<SemanticTokens>> + Send + 'a

Provides semantic tokens for a file.
Source§

fn signature_help<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Option<SignatureHelp>> + Send + 'a

Provides signature help for a symbol at the specified range. Read more
Source§

fn inlay_hint<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<InlayHint>> + Send + 'a

Provides inlay hints for a file. Read more
Source§

fn references<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a

Finds all references to a symbol at the specified range.
Source§

fn type_definition<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a

Finds the type definition of a symbol at the specified range.
Source§

fn implementation<'a>( &'a self, _uri: &'a str, _range: Range<usize>, ) -> impl Future<Output = Vec<LocationRange>> + Send + 'a

Finds the implementation(s) of a symbol at the specified range.
Source§

fn initialized<'a>(&'a self) -> impl Future<Output = ()> + Send + 'a

Called when the language server is fully initialized.
Source§

fn shutdown<'a>(&'a self) -> impl Future<Output = ()> + Send + 'a

Called when the language server is shut down.
Source§

fn did_save<'a>(&'a self, _uri: &'a str) -> impl Future<Output = ()> + Send + 'a

Called when a file is saved in the editor.
Source§

fn did_close<'a>( &'a self, _uri: &'a str, ) -> impl Future<Output = ()> + Send + 'a

Called when a file is closed in the editor.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V