feat: provide UFCS-style completion on content types (#849)

* feat: UFCS completion on content types

* dev: cleanup panics

* feat: add configuration about postfix completion

* test: update snapshot

* fix: lazily determine default values
This commit is contained in:
Myriad-Dreamin 2024-11-19 12:48:04 +08:00 committed by GitHub
parent a1a15a6795
commit d0b40dbfa6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 570 additions and 178 deletions

View file

@ -36,7 +36,7 @@ use crate::syntax::{
scan_workspace_files, Decl, DefKind, DerefTarget, ExprInfo, ExprRoute, LexicalScope,
ModuleDependency,
};
use crate::upstream::{tooltip_, Tooltip};
use crate::upstream::{tooltip_, CompletionFeat, Tooltip};
use crate::{
lsp_to_typst, typst_to_lsp, ColorTheme, CompilerQueryRequest, LspPosition, LspRange,
LspWorldExt, PositionEncoding, TypstRange, VersionedDocument,
@ -55,6 +55,8 @@ pub struct Analysis {
pub allow_multiline_token: bool,
/// Whether to remove html from markup content in responses.
pub remove_html: bool,
/// Tinymist's completion features.
pub completion_feat: CompletionFeat,
/// The editor's color theme.
pub color_theme: ColorTheme,
/// The periscope provider.