mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-25 05:22:52 +00:00
feat: allow running server with loading font once and on rootless files (#94)
* dev: change system config * docs: update config doc * dev: clean up tightly coupled world * dev: load font once * docs: add more comments to tinymist-query * dev: merge compiler layers * feat: allow run lsp on rootless files * build: bump ts * fix: workspace dep * build: bump preview * dev: correctly check inactive state * fix: weird cargo default features
This commit is contained in:
parent
f0a9c3e880
commit
76b4e91046
46 changed files with 974 additions and 638 deletions
|
|
@ -6,16 +6,35 @@ use lsp_types::LocationLink;
|
|||
use crate::{
|
||||
prelude::*,
|
||||
syntax::{get_deref_target, DerefTarget},
|
||||
SyntaxRequest,
|
||||
SemanticRequest,
|
||||
};
|
||||
|
||||
/// The [`textDocument/declaration`] request asks the server for the declaration
|
||||
/// location of a symbol at a given text document position.
|
||||
///
|
||||
/// [`textDocument/declaration`]: https://microsoft.github.io/language-server-protocol/specification#textDocument_declaration
|
||||
///
|
||||
/// # Compatibility
|
||||
///
|
||||
/// This request was introduced in specification version 3.14.0.
|
||||
///
|
||||
/// The [`GotoDeclarationResponse::Link`](lsp_types::GotoDefinitionResponse::Link) return value
|
||||
/// was introduced in specification version 3.14.0 and requires client-side
|
||||
/// support in order to be used. It can be returned if the client set the
|
||||
/// following field to `true` in the [`initialize`](Self::initialize) method:
|
||||
///
|
||||
/// ```text
|
||||
/// InitializeParams::capabilities::text_document::declaration::link_support
|
||||
/// ```
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct GotoDeclarationRequest {
|
||||
/// The path of the document to get the declaration location for.
|
||||
pub path: PathBuf,
|
||||
/// The position of the symbol to get the declaration location for.
|
||||
pub position: LspPosition,
|
||||
}
|
||||
|
||||
impl SyntaxRequest for GotoDeclarationRequest {
|
||||
impl SemanticRequest for GotoDeclarationRequest {
|
||||
type Response = GotoDeclarationResponse;
|
||||
|
||||
fn request(self, ctx: &mut AnalysisContext) -> Option<Self::Response> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue