mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-19 10:45:02 +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
|
@ -1,12 +1,18 @@
|
|||
use crate::{prelude::*, SyntaxRequest};
|
||||
use crate::{prelude::*, SemanticRequest};
|
||||
|
||||
/// The [`textDocument/signatureHelp`] request is sent from the client to the
|
||||
/// server to request signature information at a given cursor position.
|
||||
///
|
||||
/// [`textDocument/signatureHelp`]: https://microsoft.github.io/language-server-protocol/specification#textDocument_signatureHelp
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SignatureHelpRequest {
|
||||
/// The path of the document to get signature help for.
|
||||
pub path: PathBuf,
|
||||
/// The position of the cursor to get signature help for.
|
||||
pub position: LspPosition,
|
||||
}
|
||||
|
||||
impl SyntaxRequest for SignatureHelpRequest {
|
||||
impl SemanticRequest for SignatureHelpRequest {
|
||||
type Response = SignatureHelp;
|
||||
|
||||
fn request(self, ctx: &mut AnalysisContext) -> Option<Self::Response> {
|
||||
|
@ -20,7 +26,7 @@ impl SyntaxRequest for SignatureHelpRequest {
|
|||
return None;
|
||||
}
|
||||
|
||||
let values = analyze_expr(ctx.world, &callee_node);
|
||||
let values = analyze_expr(ctx.world(), &callee_node);
|
||||
|
||||
let function = values.into_iter().find_map(|v| match v.0 {
|
||||
Value::Func(f) => Some(f),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue