LSP: Auto-complete types that are not yet imported, and add the import

This commit is contained in:
Olivier Goffart 2022-05-31 20:10:55 +02:00 committed by Olivier Goffart
parent 29c1086050
commit 42c7b8819d
2 changed files with 107 additions and 11 deletions

View file

@ -47,7 +47,7 @@ pub struct Document {
/// A list of paths to .ttf/.ttc files that are supposed to be registered on
/// startup for custom font use.
pub custom_fonts: Vec<(String, crate::parser::SyntaxToken)>,
exports: Exports,
pub exports: Exports,
}
impl Document {
@ -1707,7 +1707,7 @@ impl ExportedName {
}
#[derive(Default, Debug, derive_more::Deref)]
pub struct Exports(Vec<(ExportedName, Type)>);
pub struct Exports(pub Vec<(ExportedName, Type)>);
impl Exports {
pub fn from_node(