allow extensions to be defined
dantleech opened this issue · comments
for example the core extension would include the handlers for all the workspace operstions etc.
extensions should also be able to mutate the ServerCapabilities object which is returned from the initialize command.
this is necessary, f.e. to support specifying the completion trigger characters, a phpactor extension might look like:
class PhpactorExtension
{
public function setCapabilities(ServerCapabilities $capabilities)
{
$capabilities->completionProvider = new CompletionOptions(...);
}
public function handlers(): array
{
return [
new CompletionHandler(),
new GotoDefinitionHandler(),
// ...
];
}
}