@@ -1261,7 +1261,7 @@ impl Config {
12611261impl Config {
12621262 pub fn assist ( & self , source_root : Option < SourceRootId > ) -> AssistConfig {
12631263 AssistConfig {
1264- snippet_cap : SnippetCap :: new ( self . experimental ( "snippetTextEdit" ) ) ,
1264+ snippet_cap : self . snippet_cap ( ) ,
12651265 allowed : None ,
12661266 insert_use : self . insert_use_config ( source_root) ,
12671267 prefer_no_std : self . imports_preferNoStd ( source_root) . to_owned ( ) ,
@@ -1321,6 +1321,7 @@ impl Config {
13211321 ExprFillDefaultDef :: Todo => ExprFillDefaultMode :: Todo ,
13221322 ExprFillDefaultDef :: Default => ExprFillDefaultMode :: Default ,
13231323 } ,
1324+ snippet_cap : self . snippet_cap ( ) ,
13241325 insert_use : self . insert_use_config ( source_root) ,
13251326 prefer_no_std : self . imports_preferNoStd ( source_root) . to_owned ( ) ,
13261327 prefer_prelude : self . imports_preferPrelude ( source_root) . to_owned ( ) ,
@@ -2007,8 +2008,10 @@ impl Config {
20072008 * self . references_excludeTests ( )
20082009 }
20092010
2010- pub fn snippet_cap ( & self ) -> bool {
2011- self . experimental ( "snippetTextEdit" )
2011+ pub fn snippet_cap ( & self ) -> Option < SnippetCap > {
2012+ // FIXME: Also detect the proposed lsp version at caps.workspace.workspaceEdit.snippetEditSupport
2013+ // once lsp-types has it.
2014+ SnippetCap :: new ( self . experimental ( "snippetTextEdit" ) )
20122015 }
20132016
20142017 pub fn call_info ( & self ) -> CallInfoConfig {
0 commit comments