Closed martinfojtik closed 6 years ago
I think we'd either want them to override provideAutocomplete
or wire these up to read config settings automatically as AutoLanguageClient's surface area is already too big. Thoughts?
I think overriding provideAutocomplete
is riskier than overriding this new getters. Because if in future we make new changes inside provideAutocomplete
, it could introduce breaking change, and we will be forced to propagate that code change into other plugins. @damieng What do you think?
The easiest option I think is to call down to the base provideAutocomplete and then change the properties, e.g.
provideAutocomplete() {
const provided = super.provideAutocomplete()
provided.inclusionPriority = ... // get config
provided.suggestionPriority = ... // get config
provided.excludeLowerPriority = ... // get config
return provided
}
This can be useful when you want to change autocomplete suggestions priority inside LSP package.