diff --git a/src/completion/latex/citation.rs b/src/completion/latex/citation.rs index b3aae1fc..8b5558d4 100644 --- a/src/completion/latex/citation.rs +++ b/src/completion/latex/citation.rs @@ -1,11 +1,11 @@ use crate::completion::factory; use crate::completion::latex::combinators::{self, ArgumentLocation}; +use crate::data::language::language_data; use crate::feature::{FeatureProvider, FeatureRequest}; use crate::syntax::SyntaxTree; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; use std::sync::Arc; -use crate::data::language::language_data; #[derive(Debug, PartialEq, Eq, Clone)] pub struct LatexCitationCompletionProvider; diff --git a/src/completion/latex/color.rs b/src/completion/latex/color.rs index fc683e1f..71b6d5c0 100644 --- a/src/completion/latex/color.rs +++ b/src/completion/latex/color.rs @@ -1,11 +1,11 @@ use crate::completion::factory; use crate::completion::latex::combinators::{self, ArgumentLocation}; +use crate::data::language::language_data; use crate::feature::{FeatureProvider, FeatureRequest}; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; use std::borrow::Cow; use std::sync::Arc; -use crate::data::language::language_data; #[derive(Debug, PartialEq, Clone)] pub struct LatexColorCompletionProvider; diff --git a/src/completion/latex/color_model.rs b/src/completion/latex/color_model.rs index 23589bed..deb003a0 100644 --- a/src/completion/latex/color_model.rs +++ b/src/completion/latex/color_model.rs @@ -1,11 +1,11 @@ use crate::completion::factory; use crate::completion::latex::combinators::{self, ArgumentLocation}; +use crate::data::language::language_data; use crate::feature::{FeatureProvider, FeatureRequest}; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; use std::borrow::Cow; use std::sync::Arc; -use crate::data::language::language_data; #[derive(Debug, PartialEq, Clone)] pub struct LatexColorModelCompletionProvider { diff --git a/src/completion/latex/combinators.rs b/src/completion/latex/combinators.rs index a52105c3..781ee494 100644 --- a/src/completion/latex/combinators.rs +++ b/src/completion/latex/combinators.rs @@ -1,9 +1,9 @@ +use crate::data::language::language_data; use crate::feature::FeatureRequest; use crate::syntax::latex::*; use crate::syntax::SyntaxTree; use lsp_types::{CompletionItem, CompletionParams}; use std::sync::Arc; -use crate::data::language::language_data; pub async fn command( request: &FeatureRequest, diff --git a/src/completion/latex/import.rs b/src/completion/latex/import.rs index 62426dc3..320ed3bc 100644 --- a/src/completion/latex/import.rs +++ b/src/completion/latex/import.rs @@ -1,6 +1,6 @@ use crate::completion::factory; use crate::completion::latex::combinators::{self, ArgumentLocation}; -use crate::data::language::{LatexIncludeKind, language_data}; +use crate::data::language::{language_data, LatexIncludeKind}; use crate::feature::{FeatureProvider, FeatureRequest}; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; diff --git a/src/completion/latex/label.rs b/src/completion/latex/label.rs index 9e2f6026..ae886afc 100644 --- a/src/completion/latex/label.rs +++ b/src/completion/latex/label.rs @@ -1,14 +1,14 @@ use crate::completion::factory; use crate::completion::latex::combinators; use crate::completion::latex::combinators::ArgumentLocation; -use crate::data::language::{LatexLabelKind, language_data}; +use crate::data::language::{language_data, LatexLabelKind}; use crate::feature::{FeatureProvider, FeatureRequest}; +use crate::syntax::latex::LatexLabel; use crate::syntax::SyntaxTree; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; use std::borrow::Cow; use std::sync::Arc; -use crate::syntax::latex::LatexLabel; pub struct LatexLabelCompletionProvider; diff --git a/src/completion/latex/pgf_library.rs b/src/completion/latex/pgf_library.rs index 1a29915a..b30e53a9 100644 --- a/src/completion/latex/pgf_library.rs +++ b/src/completion/latex/pgf_library.rs @@ -1,11 +1,11 @@ use crate::completion::factory; use crate::completion::latex::combinators::{self, ArgumentLocation}; +use crate::data::language::language_data; use crate::feature::{FeatureProvider, FeatureRequest}; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; use std::borrow::Cow; use std::sync::Arc; -use crate::data::language::language_data; pub struct LatexPgfLibraryCompletionProvider { items: Vec>, @@ -13,7 +13,8 @@ pub struct LatexPgfLibraryCompletionProvider { impl LatexPgfLibraryCompletionProvider { pub fn new() -> Self { - let items = language_data().pgf_libraries + let items = language_data() + .pgf_libraries .iter() .map(Cow::from) .map(factory::create_pgf_library) diff --git a/src/completion/latex/tikz_command.rs b/src/completion/latex/tikz_command.rs index f571a0c7..3714df6e 100644 --- a/src/completion/latex/tikz_command.rs +++ b/src/completion/latex/tikz_command.rs @@ -1,6 +1,7 @@ use crate::completion::factory; use crate::completion::factory::LatexComponentId; use crate::completion::latex::combinators; +use crate::data::language::language_data; use crate::feature::{FeatureProvider, FeatureRequest}; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; @@ -14,9 +15,10 @@ pub struct LatexTikzCommandCompletionProvider { impl LatexTikzCommandCompletionProvider { pub fn new() -> Self { let id = LatexComponentId::User(vec![Cow::from("tikz.sty")]); - let items = COMMANDS + let items = language_data() + .tikz_commands .iter() - .map(|name| Cow::from(*name)) + .map(Cow::from) .map(|name| factory::create_command(name, &id)) .map(Arc::new) .collect(); @@ -45,638 +47,3 @@ impl FeatureProvider for LatexTikzCommandCompletionProvider { .await } } - -const COMMANDS: &[&str] = &[ - "afterdecoration", - "anchor", - "anchorborder", - "arrow", - "arrowreversed", - "attribute", - "beginpgfgraphicnamed", - "behindbackgroundpath", - "behindforegroundpath", - "backgroundpath", - "beforebackgroundpath", - "beforedecoration", - "beforeforegroundpath", - "breakforeach", - "clip", - "calendar", - "chainin", - "colorcurrentmixin", - "coordinate", - "datavisualization", - "decoration", - "deferredanchor", - "draw", - "endpgfgraphicnamed", - "fill", - "filldraw", - "foreach", - "foregroundpath", - "graph", - "inheritanchor", - "inheritanchorborder", - "inheritbackgroundpath", - "inheritbeforebackgroundpath", - "inheritbeforeforegroundpath", - "inheritbehindbackgroundpath", - "inheritbehindforegroundpath", - "inheritforegroundpath", - "inheritsavedanchors", - "ifdate", - "ifpgfallowupsidedowattime", - "ifpgfgdgraphdrawingscopeactive", - "ifpgfmathmathunitsdeclared", - "ifpgfmathunitsdeclared", - "ifpgfrememberpicturepositiononpage", - "ifpgfresetnontranslationsattime", - "ifpgfslopedattime", - "jobname", - "matrix", - "method", - "n", - "node", - "nodepart", - "nodeparts", - "pattern", - "p", - "path", - "pgfactualjobname", - "pgfaliasimage", - "pgfalternateextension", - "pgfapproximatenonlineartransformation", - "pgfapproximatenonlineartranslation", - "pgfarrowsaddtolateoptions", - "pgfarrowsaddtolengthscalelist", - "pgfarrowsaddtooptions", - "pgfarrowsaddtowidthscalelist", - "pgfarrowshullpoint", - "pgfarrowslengthdependent", - "pgfarrowslinewidthdependent", - "pgfarrowssave", - "pgfarrowssavethe", - "pgfarrowssetbackend", - "pgfarrowssetlineend", - "pgfarrowssettipend", - "pgfarrowssetvisualbackend", - "pgfarrowssetvisualtipend", - "pgfarrowsthreeparameters", - "pgfarrowsupperhullpoint", - "pgfcalendar", - "pgfcalendardatetojulian", - "pgfcalendarifdate", - "pgfcalendarjuliantodate", - "pgfcalendarjuliantoweekday", - "pgfcalendarmonthname", - "pgfcalendarmonthshortname", - "pgfcalendarshorthand", - "pgfcalendarsuggestedname", - "pgfcalendarweekdayname", - "pgfcalendarweekdayshortname", - "pgfcoordinate", - "pgfcurvilineardistancetotime", - "pgfdata", - "pgfdeclarearrow", - "pgfdeclaredataformat", - "pgfdeclaredecoration", - "pgfdeclarefading", - "pgfdeclarefunctionalshading", - "pgfdeclarehorizontalshading", - "pgfdeclareimage", - "pgfdeclarelayer", - "pgfdeclarelindenmayersystem", - "pgfdeclaremask", - "pgfdeclaremetadecorate", - "pgfdeclarepatternformonly", - "pgfdeclarepatterninherentlycolored", - "pgfdeclareplothandler", - "pgfdeclareplotmark", - "pgfdeclareradialshading", - "pgfdeclareshape", - "pgfdeclareverticalshading", - "pgfdecorateaftercode", - "pgfdecoratebeforecode", - "pgfdecoratecurrentpath", - "pgfdecoratedangle", - "pgfdecoratedcompleteddistance", - "pgfdecoratedinputsegmentcompleteddistance", - "pgfdecoratedinputsegmentlength", - "pgfdecoratedinputsegmentremainingdistance", - "pgfdecoratedpath", - "pgfdecoratedpathlength", - "pgfdecoratedremainingdistance", - "pgfdecorateexistingpath", - "pgfdecoratepath", - "pgfdecorationpath", - "pgfdvdeclarestylesheet", - "pgferror", - "pgfextra", - "pgfextractx", - "pgfextracty", - "pgfgdaddspecificationhook", - "pgfgdbegineventgroup", - "pgfgdbeginlayout", - "pgfgdbeginscope", - "pgfgdedge", - "pgfgdendeventgroup", - "pgfgdendlayout", - "pgfgdendscope", - "pgfgdevent", - "pgfgdeventgroup", - "pgfgdsetedgecallback", - "pgfgdsetlatenodeoption", - "pgfgdsetrequestcallback", - "pgfgdsubgraphnode", - "pgfgetlastxy", - "pgfgettransform", - "pgfgettransformentries", - "pgfhorizontaltransformationadjustment", - "pgfimage", - "pgfintersectionofpaths", - "pgfintersectionsolutions", - "pgfintersectionsortbyfirstpath", - "pgfintersectionsortbysecondpath", - "pgfkeys", - "pgfkeysactivatefamilies", - "pgfkeysactivatefamiliesandfilteroptions", - "pgfkeysactivatefamily", - "pgfkeysactivatesinglefamilyandfilteroptions", - "pgfkeysalso", - "pgfkeysalsofiltered", - "pgfkeysalsofilteredfrom", - "pgfkeysalsofrom", - "pgfkeysdeactivatefamily", - "pgfkeysdef", - "pgfkeysdefargs", - "pgfkeysdefnargs", - "pgfkeysedef", - "pgfkeysedefargs", - "pgfkeysedefnargs", - "pgfkeysevalkeyfilterwith", - "pgfkeysfiltered", - "pgfkeysgetfamily", - "pgfkeysgetvalue", - "pgfkeysifdefined", - "pgfkeysiffamilydefined", - "pgfkeysinstallkeyfilter", - "pgfkeysinstallkeyfilterhandler", - "pgfkeysisfamilyactive", - "pgfkeyslet", - "pgfkeyssavekeyfilterstateto", - "pgfkeyssetfamily", - "pgfkeyssetvalue", - "pgfkeysvalueof", - "pgflibraryfpuifactive", - "pgflindenmayersystem", - "pgflinewidth", - "pgflowlevel", - "pgflowlevelobj", - "pgflowlevelsynccm", - "pgflsystemcurrentleftangle", - "pgflsystemcurrentrightangle", - "pgflsystemcurrentstep", - "pgflsystemdrawforward", - "pgflsystemmoveforward", - "pgflsystemrandomizeleftangle", - "pgflsystemrandomizerightangle", - "pgflsystemrandomizestep", - "pgflsystemrestorestate", - "pgflsystemsavestate", - "pgflsystemturnleft", - "pgflsystemturnright", - "pgfmathabs", - "pgfmathacos", - "pgfmathadd", - "pgfmathaddtocount", - "pgfmathaddtocounter", - "pgfmathaddtolength", - "pgfmathand", - "pgfmathanglebetweenlines", - "pgfmathanglebetweenpoints", - "pgfmathapproxequalto", - "pgfmatharray", - "pgfmathasin", - "pgfmathatan", - "pgfmathatantwo", - "pgfmathbasetoBase", - "pgfmathbasetobase", - "pgfmathbasetodec", - "pgfmathbin", - "pgfmathceil", - "pgfmathcos", - "pgfmathcosec", - "pgfmathcosh", - "pgfmathcot", - "pgfmathdeclarefunction", - "pgfmathdeclarerandomlist", - "pgfmathdectoBase", - "pgfmathdectobase", - "pgfmathdeg", - "pgfmathdepth", - "pgfmathdiv", - "pgfmathdivide", - "pgfmathe", - "pgfmathequal", - "pgfmathexp", - "pgfmathfactorial", - "pgfmathfalse", - "pgfmathfloat", - "pgfmathfloatabserror", - "pgfmathfloatcreate", - "pgfmathfloatgetexponent", - "pgfmathfloatgetflags", - "pgfmathfloatgetflagstomacro", - "pgfmathfloatgetmantissa", - "pgfmathfloatgetmantissatok", - "pgfmathfloatifapproxequalrel", - "pgfmathfloatifflags", - "pgfmathfloatint", - "pgfmathfloatlessthan", - "pgfmathfloatmultiplyfixed", - "pgfmathfloatparsenumber", - "pgfmathfloatqparsenumber", - "pgfmathfloatrelerror", - "pgfmathfloatround", - "pgfmathfloatroundzerofill", - "pgfmathfloatsetextprecision", - "pgfmathfloatshift", - "pgfmathfloattoextentedprecision", - "pgfmathfloattofixed", - "pgfmathfloattoint", - "pgfmathfloattomacro", - "pgfmathfloattoregisters", - "pgfmathfloattoregisterstok", - "pgfmathfloattosci", - "pgfmathfloatvalueof", - "pgfmathfloor", - "pgfmathfrac", - "pgfmathgcd", - "pgfmathgeneratepseudorandomnumber", - "pgfmathgreater", - "pgfmathheight", - "pgfmathHex", - "pgfmathhex", - "pgfmathifisint", - "pgfmathifthenelse", - "pgfmathint", - "pgfmathiseven", - "pgfmathisodd", - "pgfmathisprime", - "pgfmathless", - "pgfmathln", - "pgfmathlog", - "pgfmathlogten", - "pgfmathlogtwo", - "pgfmathmax", - "pgfmathmin", - "pgfmathMod", - "pgfmathmod", - "pgfmathmultiply", - "pgfmathneg", - "pgfmathnot", - "pgfmathnotequal", - "pgfmathnotgreater", - "pgfmathnotless", - "pgfmathoct", - "pgfmathor", - "pgfmathparse", - "pgfmathpi", - "pgfmathpostparse", - "pgfmathpow", - "pgfmathprintnumber", - "pgfmathprintnumberto", - "pgfmathqparse", - "pgfmathrad", - "pgfmathrand", - "pgfmathrandom", - "pgfmathrandominteger", - "pgfmathrandomitem", - "pgfmathreal", - "pgfmathreciprocal", - "pgfmathredeclarefunction", - "pgfmathrnd", - "pgfmathround", - "pgfmathroundto", - "pgfmathroundtozerofill", - "pgfmathscalar", - "pgfmathsec", - "pgfmathsetbasenumberlength", - "pgfmathsetcount", - "pgfmathsetcounter", - "pgfmathsetlength", - "pgfmathsetlengthmacro", - "pgfmathsetmacro", - "pgfmathsetseed", - "pgfmathsign", - "pgfmathsin", - "pgfmathsinh", - "pgfmathsqrt", - "pgfmathsubtract", - "pgfmathtan", - "pgfmathtanh", - "pgfmathtodigitlist", - "pgfmathtrue", - "pgfmathtruncatemacro", - "pgfmathveclen", - "pgfmathwidth", - "pgfmatrix", - "pgfmatrixbegincode", - "pgfmatrixcurrentcolumn", - "pgfmatrixcurrentrow", - "pgfmatrixemptycode", - "pgfmatrixendcode", - "pgfmatrixendrow", - "pgfmatrixnextcell", - "pgfmetadecoratedcompleteddistance", - "pgfmetadecoratedinputsegmentcompleteddistance", - "pgfmetadecoratedinputsegmentremainingdistance", - "pgfmetadecoratedpathlength", - "pgfmetadecoratedremainingdistance", - "pgfmultipartnode", - "pgfnode", - "pgfnodealias", - "pgfnodepostsetupcode", - "pgfnoderename", - "pgfooclass", - "pgfoogc", - "pgfooget", - "pgfoolet", - "pgfoonew", - "pgfooobj", - "pgfooset", - "pgfoosuper", - "pgfoothis", - "pgfoovalueof", - "pgfpagescurrentpagewillbelogicalpage", - "pgfpagesdeclarelayout", - "pgfpageslogicalpageoptions", - "pgfpagesphysicalpageoptions", - "pgfpagesshipoutlogicalpage", - "pgfpagesuselayout", - "pgfparserdef", - "pgfparserparse", - "pgfparserswitch", - "pgfpatharc", - "pgfpatharcaxes", - "pgfpatharcto", - "pgfpatharctomaxstepsize", - "pgfpatharctoprecomputed", - "pgfpathcircle", - "pgfpathclose", - "pgfpathcosine", - "pgfpathcurvebetweentime", - "pgfpathcurvebetweentimecontinue", - "pgfpathcurveto", - "pgfpathellipse", - "pgfpathgrid", - "pgfpathlineto", - "pgfpathmoveto", - "pgfpathparabola", - "pgfpathqcircle", - "pgfpathqcurveto", - "pgfpathqlineto", - "pgfpathqmoveto", - "pgfpathquadraticcurveto", - "pgfpathrectangle", - "pgfpathrectanglecorners", - "pgfpathsine", - "pgfpathsvg", - "pgfplotbarwidth", - "pgfplotfunction", - "pgfplotgnuplot", - "pgfplothandlerclosedcurve", - "pgfplothandlerconstantlineto", - "pgfplothandlerconstantlinetomarkmid", - "pgfplothandlerconstantlinetomarkright", - "pgfplothandlercurveto", - "pgfplothandlerdiscard", - "pgfplothandlergapcycle", - "pgfplothandlergaplineto", - "pgfplothandlerjumpmarkleft", - "pgfplothandlerjumpmarkmid", - "pgfplothandlerjumpmarkright", - "pgfplothandlerlineto", - "pgfplothandlermark", - "pgfplothandlermarklisted", - "pgfplothandlerpolarcomb", - "pgfplothandlerpolygon", - "pgfplothandlerrecord", - "pgfplothandlerxbar", - "pgfplothandlerxbarinterval", - "pgfplothandlerxcomb", - "pgfplothandlerybar", - "pgfplothandlerybarinterval", - "pgfplothandlerycomb", - "pgfplotmarksize", - "pgfplotstreamend", - "pgfplotstreamnewdataset", - "pgfplotstreampoint", - "pgfplotstreampointoutlier", - "pgfplotstreampointundefined", - "pgfplotstreamspecial", - "pgfplotstreamstart", - "pgfplotxyfile", - "pgfplotxyzfile", - "pgfplotxzerolevelstreamconstant", - "pgfplotyzerolevelstreamconstant", - "pgfpoint", - "pgfpointadd", - "pgfpointanchor", - "pgfpointarcaxesattime", - "pgfpointborderellipse", - "pgfpointborderrectangle", - "pgfpointcurveattime", - "pgfpointcurvilinearbezierorthogonal", - "pgfpointcurvilinearbezierpolar", - "pgfpointcylindrical", - "pgfpointdecoratedinputsegmentlast", - "pgfpointdecoratedpathfirst", - "pgfpointdecoratedpathlast", - "pgfpointdecorationpathlast", - "pgfpointdiff", - "pgfpointintersectionofcircles", - "pgfpointintersectionoflines", - "pgfpointintersectionsolution", - "pgfpointlineatdistance", - "pgfpointlineattime", - "pgfpointmetadecoratedpathfirst", - "pgfpointmetadecoratedpathlast", - "pgfpointnormalised", - "pgfpointorigin", - "pgfpointpolar", - "pgfpointpolarxy", - "pgfpointscale", - "pgfpointshapeborder", - "pgfpointspherical", - "pgfpointtransformednonlinear", - "pgfpointxy", - "pgfpointxyz", - "pgfpositionnodelater", - "pgfpositionnodelaterbox", - "pgfpositionnodelatermaxx", - "pgfpositionnodelatermaxy", - "pgfpositionnodelaterminx", - "pgfpositionnodelaterminy", - "pgfpositionnodelatername", - "pgfpositionnodelaterpath", - "pgfpositionnodenow", - "pgfprofileend", - "pgfprofileifisrunning", - "pgfprofilenew", - "pgfprofilenewforcommand", - "pgfprofilenewforcommandpattern", - "pgfprofilenewforenvironment", - "pgfprofilepostprocess", - "pgfprofilesetrel", - "pgfprofileshowinvocationsexpandedfor", - "pgfprofileshowinvocationsfor", - "pgfprofilestart", - "pgfqbox", - "pgfqboxsynced", - "pgfqkeys", - "pgfqkeysactivatefamiliesandfilteroptions", - "pgfqkeysactivatesinglefamilyandfilteroptions", - "pgfqkeysalso", - "pgfqkeysfiltered", - "pgfqpoint", - "pgfqpointscale", - "pgfqpointxy", - "pgfqpointxyz", - "pgfrealjobname", - "pgfresetboundingbox", - "pgfsetadditionalshadetransform", - "pgfsetarrows", - "pgfsetarrowsend", - "pgfsetarrowsstart", - "pgfsetbaseline", - "pgfsetbaselinepointlater", - "pgfsetbaselinepointnow", - "pgfsetbeveljoin", - "pgfsetblendmode", - "pgfsetbuttcap", - "pgfsetcolor", - "pgfsetcornersarced", - "pgfsetcurvilinearbeziercurve", - "pgfsetdash", - "pgfsetdecorationsegmenttransformation", - "pgfseteorule", - "pgfsetfading", - "pgfsetfadingforcurrentpath", - "pgfsetfadingforcurrentpathstroked", - "pgfsetfillcolor", - "pgfsetfillopacity", - "pgfsetfillpattern", - "pgfsetinnerlinewidth", - "pgfsetinnerstrokecolor", - "pgfsetlayers", - "pgfsetlinetofirstplotpoint", - "pgfsetlinewidth", - "pgfsetmatrixcolumnsep", - "pgfsetmatrixrowsep", - "pgfsetmiterjoin", - "pgfsetmiterlimit", - "pgfsetmovetofirstplotpoint", - "pgfsetnonzerorule", - "pgfsetplotmarkphase", - "pgfsetplotmarkrepeat", - "pgfsetplotmarksize", - "pgfsetplottension", - "pgfsetrectcap", - "pgfsetroundcap", - "pgfsetroundjoin", - "pgfsetshortenend", - "pgfsetshortenstart", - "pgfsetstrokecolor", - "pgfsetstrokeopacity", - "pgfsettransform", - "pgfsettransformentries", - "pgfsettransformnonlinearflatness", - "pgfsetxvec", - "pgfsetyvec", - "pgfsetzvec", - "pgfshadecolortorgb", - "pgfshadepath", - "pgfsysdriver", - "pgftext", - "pgftransformarcaxesattime", - "pgftransformarrow", - "pgftransformationadjustments", - "pgftransformcm", - "pgftransformcurveattime", - "pgftransforminvert", - "pgftransformlineattime", - "pgftransformnonlinear", - "pgftransformreset", - "pgftransformresetnontranslations", - "pgftransformrotate", - "pgftransformscale", - "pgftransformshift", - "pgftransformtriangle", - "pgftransformxscale", - "pgftransformxshift", - "pgftransformxslant", - "pgftransformyscale", - "pgftransformyshift", - "pgftransformyslant", - "pgfuseimage", - "pgfusepath", - "pgfusepathqclip", - "pgfusepathqfill", - "pgfusepathqfillstroke", - "pgfusepathqstroke", - "pgfuseplotmark", - "pgfuseshading", - "pgfverticaltransformationadjustment", - "pgfwarning", - "pic", - "rule", - "savedanchor", - "saveddimen", - "savedmacro", - "scoped", - "shade", - "shadedraw", - "spy", - "state", - "symbol", - "tikz", - "tikzaliascoordinatesystem", - "tikzappendtofigurename", - "tikzdeclarecoordinatesystem", - "tikzdvdeclarestylesheetcolorseries", - "tikzexternaldisable", - "tikzexternalenable", - "tikzexternalfiledependsonfile", - "tikzexternalize", - "tikzexternalrealjob", - "tikzfading", - "tikzgraphforeachcolorednode", - "tikzgraphnodefullname", - "tikzgraphnodename", - "tikzgraphnodepath", - "tikzgraphnodetext", - "tikzgraphpreparecolor", - "tikzgraphsset", - "tikzifexternalizing", - "tikzifexternalizingnext", - "tikzinputsegmentfirst", - "tikzinputsegmentlast", - "tikzinputsegmentsupporta", - "tikzinputsegmentsupportb", - "tikzlastnode", - "tikzmath", - "tikzpicturedependsonfile", - "tikzset", - "tikzsetexternalprefix", - "tikzsetfigurename", - "tikzsetnextfilename", - "useasboundingbox", - "usegdlibrary", - "usepgflibrary", - "usetikzlibrary", - "value", - "x", - "y", -]; diff --git a/src/completion/latex/tikz_library.rs b/src/completion/latex/tikz_library.rs index 673ba64c..be3de8f9 100644 --- a/src/completion/latex/tikz_library.rs +++ b/src/completion/latex/tikz_library.rs @@ -1,11 +1,11 @@ use crate::completion::factory; use crate::completion::latex::combinators::{self, ArgumentLocation}; +use crate::data::language::language_data; use crate::feature::{FeatureProvider, FeatureRequest}; use futures_boxed::boxed; use lsp_types::{CompletionItem, CompletionParams}; use std::borrow::Cow; use std::sync::Arc; -use crate::data::language::{language_data}; pub struct LatexTikzLibraryCompletionProvider { items: Vec>, @@ -13,7 +13,8 @@ pub struct LatexTikzLibraryCompletionProvider { impl LatexTikzLibraryCompletionProvider { pub fn new() -> Self { - let items = language_data().tikz_libraries + let items = language_data() + .tikz_libraries .iter() .map(Cow::from) .map(factory::create_tikz_library) diff --git a/src/data/language.json b/src/data/language.json index 9cce484f..75869682 100644 --- a/src/data/language.json +++ b/src/data/language.json @@ -1542,5 +1542,639 @@ "topaths", "trees", "turtle" + ], + "tikzCommands": [ + "afterdecoration", + "anchor", + "anchorborder", + "arrow", + "arrowreversed", + "attribute", + "beginpgfgraphicnamed", + "behindbackgroundpath", + "behindforegroundpath", + "backgroundpath", + "beforebackgroundpath", + "beforedecoration", + "beforeforegroundpath", + "breakforeach", + "clip", + "calendar", + "chainin", + "colorcurrentmixin", + "coordinate", + "datavisualization", + "decoration", + "deferredanchor", + "draw", + "endpgfgraphicnamed", + "fill", + "filldraw", + "foreach", + "foregroundpath", + "graph", + "inheritanchor", + "inheritanchorborder", + "inheritbackgroundpath", + "inheritbeforebackgroundpath", + "inheritbeforeforegroundpath", + "inheritbehindbackgroundpath", + "inheritbehindforegroundpath", + "inheritforegroundpath", + "inheritsavedanchors", + "ifdate", + "ifpgfallowupsidedowattime", + "ifpgfgdgraphdrawingscopeactive", + "ifpgfmathmathunitsdeclared", + "ifpgfmathunitsdeclared", + "ifpgfrememberpicturepositiononpage", + "ifpgfresetnontranslationsattime", + "ifpgfslopedattime", + "jobname", + "matrix", + "method", + "n", + "node", + "nodepart", + "nodeparts", + "pattern", + "p", + "path", + "pgfactualjobname", + "pgfaliasimage", + "pgfalternateextension", + "pgfapproximatenonlineartransformation", + "pgfapproximatenonlineartranslation", + "pgfarrowsaddtolateoptions", + "pgfarrowsaddtolengthscalelist", + "pgfarrowsaddtooptions", + "pgfarrowsaddtowidthscalelist", + "pgfarrowshullpoint", + "pgfarrowslengthdependent", + "pgfarrowslinewidthdependent", + "pgfarrowssave", + "pgfarrowssavethe", + "pgfarrowssetbackend", + "pgfarrowssetlineend", + "pgfarrowssettipend", + "pgfarrowssetvisualbackend", + "pgfarrowssetvisualtipend", + "pgfarrowsthreeparameters", + "pgfarrowsupperhullpoint", + "pgfcalendar", + "pgfcalendardatetojulian", + "pgfcalendarifdate", + "pgfcalendarjuliantodate", + "pgfcalendarjuliantoweekday", + "pgfcalendarmonthname", + "pgfcalendarmonthshortname", + "pgfcalendarshorthand", + "pgfcalendarsuggestedname", + "pgfcalendarweekdayname", + "pgfcalendarweekdayshortname", + "pgfcoordinate", + "pgfcurvilineardistancetotime", + "pgfdata", + "pgfdeclarearrow", + "pgfdeclaredataformat", + "pgfdeclaredecoration", + "pgfdeclarefading", + "pgfdeclarefunctionalshading", + "pgfdeclarehorizontalshading", + "pgfdeclareimage", + "pgfdeclarelayer", + "pgfdeclarelindenmayersystem", + "pgfdeclaremask", + "pgfdeclaremetadecorate", + "pgfdeclarepatternformonly", + "pgfdeclarepatterninherentlycolored", + "pgfdeclareplothandler", + "pgfdeclareplotmark", + "pgfdeclareradialshading", + "pgfdeclareshape", + "pgfdeclareverticalshading", + "pgfdecorateaftercode", + "pgfdecoratebeforecode", + "pgfdecoratecurrentpath", + "pgfdecoratedangle", + "pgfdecoratedcompleteddistance", + "pgfdecoratedinputsegmentcompleteddistance", + "pgfdecoratedinputsegmentlength", + "pgfdecoratedinputsegmentremainingdistance", + "pgfdecoratedpath", + "pgfdecoratedpathlength", + "pgfdecoratedremainingdistance", + "pgfdecorateexistingpath", + "pgfdecoratepath", + "pgfdecorationpath", + "pgfdvdeclarestylesheet", + "pgferror", + "pgfextra", + "pgfextractx", + "pgfextracty", + "pgfgdaddspecificationhook", + "pgfgdbegineventgroup", + "pgfgdbeginlayout", + "pgfgdbeginscope", + "pgfgdedge", + "pgfgdendeventgroup", + "pgfgdendlayout", + "pgfgdendscope", + "pgfgdevent", + "pgfgdeventgroup", + "pgfgdsetedgecallback", + "pgfgdsetlatenodeoption", + "pgfgdsetrequestcallback", + "pgfgdsubgraphnode", + "pgfgetlastxy", + "pgfgettransform", + "pgfgettransformentries", + "pgfhorizontaltransformationadjustment", + "pgfimage", + "pgfintersectionofpaths", + "pgfintersectionsolutions", + "pgfintersectionsortbyfirstpath", + "pgfintersectionsortbysecondpath", + "pgfkeys", + "pgfkeysactivatefamilies", + "pgfkeysactivatefamiliesandfilteroptions", + "pgfkeysactivatefamily", + "pgfkeysactivatesinglefamilyandfilteroptions", + "pgfkeysalso", + "pgfkeysalsofiltered", + "pgfkeysalsofilteredfrom", + "pgfkeysalsofrom", + "pgfkeysdeactivatefamily", + "pgfkeysdef", + "pgfkeysdefargs", + "pgfkeysdefnargs", + "pgfkeysedef", + "pgfkeysedefargs", + "pgfkeysedefnargs", + "pgfkeysevalkeyfilterwith", + "pgfkeysfiltered", + "pgfkeysgetfamily", + "pgfkeysgetvalue", + "pgfkeysifdefined", + "pgfkeysiffamilydefined", + "pgfkeysinstallkeyfilter", + "pgfkeysinstallkeyfilterhandler", + "pgfkeysisfamilyactive", + "pgfkeyslet", + "pgfkeyssavekeyfilterstateto", + "pgfkeyssetfamily", + "pgfkeyssetvalue", + "pgfkeysvalueof", + "pgflibraryfpuifactive", + "pgflindenmayersystem", + "pgflinewidth", + "pgflowlevel", + "pgflowlevelobj", + "pgflowlevelsynccm", + "pgflsystemcurrentleftangle", + "pgflsystemcurrentrightangle", + "pgflsystemcurrentstep", + "pgflsystemdrawforward", + "pgflsystemmoveforward", + "pgflsystemrandomizeleftangle", + "pgflsystemrandomizerightangle", + "pgflsystemrandomizestep", + "pgflsystemrestorestate", + "pgflsystemsavestate", + "pgflsystemturnleft", + "pgflsystemturnright", + "pgfmathabs", + "pgfmathacos", + "pgfmathadd", + "pgfmathaddtocount", + "pgfmathaddtocounter", + "pgfmathaddtolength", + "pgfmathand", + "pgfmathanglebetweenlines", + "pgfmathanglebetweenpoints", + "pgfmathapproxequalto", + "pgfmatharray", + "pgfmathasin", + "pgfmathatan", + "pgfmathatantwo", + "pgfmathbasetoBase", + "pgfmathbasetobase", + "pgfmathbasetodec", + "pgfmathbin", + "pgfmathceil", + "pgfmathcos", + "pgfmathcosec", + "pgfmathcosh", + "pgfmathcot", + "pgfmathdeclarefunction", + "pgfmathdeclarerandomlist", + "pgfmathdectoBase", + "pgfmathdectobase", + "pgfmathdeg", + "pgfmathdepth", + "pgfmathdiv", + "pgfmathdivide", + "pgfmathe", + "pgfmathequal", + "pgfmathexp", + "pgfmathfactorial", + "pgfmathfalse", + "pgfmathfloat", + "pgfmathfloatabserror", + "pgfmathfloatcreate", + "pgfmathfloatgetexponent", + "pgfmathfloatgetflags", + "pgfmathfloatgetflagstomacro", + "pgfmathfloatgetmantissa", + "pgfmathfloatgetmantissatok", + "pgfmathfloatifapproxequalrel", + "pgfmathfloatifflags", + "pgfmathfloatint", + "pgfmathfloatlessthan", + "pgfmathfloatmultiplyfixed", + "pgfmathfloatparsenumber", + "pgfmathfloatqparsenumber", + "pgfmathfloatrelerror", + "pgfmathfloatround", + "pgfmathfloatroundzerofill", + "pgfmathfloatsetextprecision", + "pgfmathfloatshift", + "pgfmathfloattoextentedprecision", + "pgfmathfloattofixed", + "pgfmathfloattoint", + "pgfmathfloattomacro", + "pgfmathfloattoregisters", + "pgfmathfloattoregisterstok", + "pgfmathfloattosci", + "pgfmathfloatvalueof", + "pgfmathfloor", + "pgfmathfrac", + "pgfmathgcd", + "pgfmathgeneratepseudorandomnumber", + "pgfmathgreater", + "pgfmathheight", + "pgfmathHex", + "pgfmathhex", + "pgfmathifisint", + "pgfmathifthenelse", + "pgfmathint", + "pgfmathiseven", + "pgfmathisodd", + "pgfmathisprime", + "pgfmathless", + "pgfmathln", + "pgfmathlog", + "pgfmathlogten", + "pgfmathlogtwo", + "pgfmathmax", + "pgfmathmin", + "pgfmathMod", + "pgfmathmod", + "pgfmathmultiply", + "pgfmathneg", + "pgfmathnot", + "pgfmathnotequal", + "pgfmathnotgreater", + "pgfmathnotless", + "pgfmathoct", + "pgfmathor", + "pgfmathparse", + "pgfmathpi", + "pgfmathpostparse", + "pgfmathpow", + "pgfmathprintnumber", + "pgfmathprintnumberto", + "pgfmathqparse", + "pgfmathrad", + "pgfmathrand", + "pgfmathrandom", + "pgfmathrandominteger", + "pgfmathrandomitem", + "pgfmathreal", + "pgfmathreciprocal", + "pgfmathredeclarefunction", + "pgfmathrnd", + "pgfmathround", + "pgfmathroundto", + "pgfmathroundtozerofill", + "pgfmathscalar", + "pgfmathsec", + "pgfmathsetbasenumberlength", + "pgfmathsetcount", + "pgfmathsetcounter", + "pgfmathsetlength", + "pgfmathsetlengthmacro", + "pgfmathsetmacro", + "pgfmathsetseed", + "pgfmathsign", + "pgfmathsin", + "pgfmathsinh", + "pgfmathsqrt", + "pgfmathsubtract", + "pgfmathtan", + "pgfmathtanh", + "pgfmathtodigitlist", + "pgfmathtrue", + "pgfmathtruncatemacro", + "pgfmathveclen", + "pgfmathwidth", + "pgfmatrix", + "pgfmatrixbegincode", + "pgfmatrixcurrentcolumn", + "pgfmatrixcurrentrow", + "pgfmatrixemptycode", + "pgfmatrixendcode", + "pgfmatrixendrow", + "pgfmatrixnextcell", + "pgfmetadecoratedcompleteddistance", + "pgfmetadecoratedinputsegmentcompleteddistance", + "pgfmetadecoratedinputsegmentremainingdistance", + "pgfmetadecoratedpathlength", + "pgfmetadecoratedremainingdistance", + "pgfmultipartnode", + "pgfnode", + "pgfnodealias", + "pgfnodepostsetupcode", + "pgfnoderename", + "pgfooclass", + "pgfoogc", + "pgfooget", + "pgfoolet", + "pgfoonew", + "pgfooobj", + "pgfooset", + "pgfoosuper", + "pgfoothis", + "pgfoovalueof", + "pgfpagescurrentpagewillbelogicalpage", + "pgfpagesdeclarelayout", + "pgfpageslogicalpageoptions", + "pgfpagesphysicalpageoptions", + "pgfpagesshipoutlogicalpage", + "pgfpagesuselayout", + "pgfparserdef", + "pgfparserparse", + "pgfparserswitch", + "pgfpatharc", + "pgfpatharcaxes", + "pgfpatharcto", + "pgfpatharctomaxstepsize", + "pgfpatharctoprecomputed", + "pgfpathcircle", + "pgfpathclose", + "pgfpathcosine", + "pgfpathcurvebetweentime", + "pgfpathcurvebetweentimecontinue", + "pgfpathcurveto", + "pgfpathellipse", + "pgfpathgrid", + "pgfpathlineto", + "pgfpathmoveto", + "pgfpathparabola", + "pgfpathqcircle", + "pgfpathqcurveto", + "pgfpathqlineto", + "pgfpathqmoveto", + "pgfpathquadraticcurveto", + "pgfpathrectangle", + "pgfpathrectanglecorners", + "pgfpathsine", + "pgfpathsvg", + "pgfplotbarwidth", + "pgfplotfunction", + "pgfplotgnuplot", + "pgfplothandlerclosedcurve", + "pgfplothandlerconstantlineto", + "pgfplothandlerconstantlinetomarkmid", + "pgfplothandlerconstantlinetomarkright", + "pgfplothandlercurveto", + "pgfplothandlerdiscard", + "pgfplothandlergapcycle", + "pgfplothandlergaplineto", + "pgfplothandlerjumpmarkleft", + "pgfplothandlerjumpmarkmid", + "pgfplothandlerjumpmarkright", + "pgfplothandlerlineto", + "pgfplothandlermark", + "pgfplothandlermarklisted", + "pgfplothandlerpolarcomb", + "pgfplothandlerpolygon", + "pgfplothandlerrecord", + "pgfplothandlerxbar", + "pgfplothandlerxbarinterval", + "pgfplothandlerxcomb", + "pgfplothandlerybar", + "pgfplothandlerybarinterval", + "pgfplothandlerycomb", + "pgfplotmarksize", + "pgfplotstreamend", + "pgfplotstreamnewdataset", + "pgfplotstreampoint", + "pgfplotstreampointoutlier", + "pgfplotstreampointundefined", + "pgfplotstreamspecial", + "pgfplotstreamstart", + "pgfplotxyfile", + "pgfplotxyzfile", + "pgfplotxzerolevelstreamconstant", + "pgfplotyzerolevelstreamconstant", + "pgfpoint", + "pgfpointadd", + "pgfpointanchor", + "pgfpointarcaxesattime", + "pgfpointborderellipse", + "pgfpointborderrectangle", + "pgfpointcurveattime", + "pgfpointcurvilinearbezierorthogonal", + "pgfpointcurvilinearbezierpolar", + "pgfpointcylindrical", + "pgfpointdecoratedinputsegmentlast", + "pgfpointdecoratedpathfirst", + "pgfpointdecoratedpathlast", + "pgfpointdecorationpathlast", + "pgfpointdiff", + "pgfpointintersectionofcircles", + "pgfpointintersectionoflines", + "pgfpointintersectionsolution", + "pgfpointlineatdistance", + "pgfpointlineattime", + "pgfpointmetadecoratedpathfirst", + "pgfpointmetadecoratedpathlast", + "pgfpointnormalised", + "pgfpointorigin", + "pgfpointpolar", + "pgfpointpolarxy", + "pgfpointscale", + "pgfpointshapeborder", + "pgfpointspherical", + "pgfpointtransformednonlinear", + "pgfpointxy", + "pgfpointxyz", + "pgfpositionnodelater", + "pgfpositionnodelaterbox", + "pgfpositionnodelatermaxx", + "pgfpositionnodelatermaxy", + "pgfpositionnodelaterminx", + "pgfpositionnodelaterminy", + "pgfpositionnodelatername", + "pgfpositionnodelaterpath", + "pgfpositionnodenow", + "pgfprofileend", + "pgfprofileifisrunning", + "pgfprofilenew", + "pgfprofilenewforcommand", + "pgfprofilenewforcommandpattern", + "pgfprofilenewforenvironment", + "pgfprofilepostprocess", + "pgfprofilesetrel", + "pgfprofileshowinvocationsexpandedfor", + "pgfprofileshowinvocationsfor", + "pgfprofilestart", + "pgfqbox", + "pgfqboxsynced", + "pgfqkeys", + "pgfqkeysactivatefamiliesandfilteroptions", + "pgfqkeysactivatesinglefamilyandfilteroptions", + "pgfqkeysalso", + "pgfqkeysfiltered", + "pgfqpoint", + "pgfqpointscale", + "pgfqpointxy", + "pgfqpointxyz", + "pgfrealjobname", + "pgfresetboundingbox", + "pgfsetadditionalshadetransform", + "pgfsetarrows", + "pgfsetarrowsend", + "pgfsetarrowsstart", + "pgfsetbaseline", + "pgfsetbaselinepointlater", + "pgfsetbaselinepointnow", + "pgfsetbeveljoin", + "pgfsetblendmode", + "pgfsetbuttcap", + "pgfsetcolor", + "pgfsetcornersarced", + "pgfsetcurvilinearbeziercurve", + "pgfsetdash", + "pgfsetdecorationsegmenttransformation", + "pgfseteorule", + "pgfsetfading", + "pgfsetfadingforcurrentpath", + "pgfsetfadingforcurrentpathstroked", + "pgfsetfillcolor", + "pgfsetfillopacity", + "pgfsetfillpattern", + "pgfsetinnerlinewidth", + "pgfsetinnerstrokecolor", + "pgfsetlayers", + "pgfsetlinetofirstplotpoint", + "pgfsetlinewidth", + "pgfsetmatrixcolumnsep", + "pgfsetmatrixrowsep", + "pgfsetmiterjoin", + "pgfsetmiterlimit", + "pgfsetmovetofirstplotpoint", + "pgfsetnonzerorule", + "pgfsetplotmarkphase", + "pgfsetplotmarkrepeat", + "pgfsetplotmarksize", + "pgfsetplottension", + "pgfsetrectcap", + "pgfsetroundcap", + "pgfsetroundjoin", + "pgfsetshortenend", + "pgfsetshortenstart", + "pgfsetstrokecolor", + "pgfsetstrokeopacity", + "pgfsettransform", + "pgfsettransformentries", + "pgfsettransformnonlinearflatness", + "pgfsetxvec", + "pgfsetyvec", + "pgfsetzvec", + "pgfshadecolortorgb", + "pgfshadepath", + "pgfsysdriver", + "pgftext", + "pgftransformarcaxesattime", + "pgftransformarrow", + "pgftransformationadjustments", + "pgftransformcm", + "pgftransformcurveattime", + "pgftransforminvert", + "pgftransformlineattime", + "pgftransformnonlinear", + "pgftransformreset", + "pgftransformresetnontranslations", + "pgftransformrotate", + "pgftransformscale", + "pgftransformshift", + "pgftransformtriangle", + "pgftransformxscale", + "pgftransformxshift", + "pgftransformxslant", + "pgftransformyscale", + "pgftransformyshift", + "pgftransformyslant", + "pgfuseimage", + "pgfusepath", + "pgfusepathqclip", + "pgfusepathqfill", + "pgfusepathqfillstroke", + "pgfusepathqstroke", + "pgfuseplotmark", + "pgfuseshading", + "pgfverticaltransformationadjustment", + "pgfwarning", + "pic", + "rule", + "savedanchor", + "saveddimen", + "savedmacro", + "scoped", + "shade", + "shadedraw", + "spy", + "state", + "symbol", + "tikz", + "tikzaliascoordinatesystem", + "tikzappendtofigurename", + "tikzdeclarecoordinatesystem", + "tikzdvdeclarestylesheetcolorseries", + "tikzexternaldisable", + "tikzexternalenable", + "tikzexternalfiledependsonfile", + "tikzexternalize", + "tikzexternalrealjob", + "tikzfading", + "tikzgraphforeachcolorednode", + "tikzgraphnodefullname", + "tikzgraphnodename", + "tikzgraphnodepath", + "tikzgraphnodetext", + "tikzgraphpreparecolor", + "tikzgraphsset", + "tikzifexternalizing", + "tikzifexternalizingnext", + "tikzinputsegmentfirst", + "tikzinputsegmentlast", + "tikzinputsegmentsupporta", + "tikzinputsegmentsupportb", + "tikzlastnode", + "tikzmath", + "tikzpicturedependsonfile", + "tikzset", + "tikzsetexternalprefix", + "tikzsetfigurename", + "tikzsetnextfilename", + "useasboundingbox", + "usegdlibrary", + "usepgflibrary", + "usetikzlibrary", + "value", + "x", + "y" ] } diff --git a/src/data/language.rs b/src/data/language.rs index 5c31b89d..ff501652 100644 --- a/src/data/language.rs +++ b/src/data/language.rs @@ -134,6 +134,7 @@ pub struct LanguageData { pub fields: Vec, pub pgf_libraries: Vec, pub tikz_libraries: Vec, + pub tikz_commands: Vec, } impl LanguageData { diff --git a/tests/build.rs b/tests/build.rs index 24cef311..ee5c31e3 100644 --- a/tests/build.rs +++ b/tests/build.rs @@ -16,10 +16,7 @@ async fn set_options<'a>(scenario: &'a Scenario, executable: &'a str, on_save: b options.latex_build = Some(build_options); } -async fn run( - executable: &'static str, - name: &'static str, -) -> (Scenario, BuildResult) { +async fn run(executable: &'static str, name: &'static str) -> (Scenario, BuildResult) { let scenario = Scenario::new("build").await; scenario.open(name).await; set_options(&scenario, executable, false).await; diff --git a/tests/diagnostics.rs b/tests/diagnostics.rs index 30262fe6..287ff2e2 100644 --- a/tests/diagnostics.rs +++ b/tests/diagnostics.rs @@ -11,7 +11,9 @@ async fn test_lint_latex() { scenario.open("foo.tex").await; { let mut options = scenario.client.options.lock().await; - options.latex_lint = Some(LatexLintOptions { on_save: Some(true) }); + options.latex_lint = Some(LatexLintOptions { + on_save: Some(true), + }); } let identifier = TextDocumentIdentifier::new(scenario.uri("foo.tex")); scenario.server.did_save(DidSaveTextDocumentParams { diff --git a/tests/formatting.rs b/tests/formatting.rs index aeb33969..c7c0e363 100644 --- a/tests/formatting.rs +++ b/tests/formatting.rs @@ -40,7 +40,9 @@ async fn test_bibtex_entry_infinite_line_length() { let (scenario, edits) = run( "bibtex/infinite_line_length", "foo.bib", - Some(BibtexFormattingOptions { line_length: Some(0) }), + Some(BibtexFormattingOptions { + line_length: Some(0), + }), ) .await; assert_eq!(edits.len(), 1);