Closed kpbochenek closed 2 years ago
Example: https://github.com/kpbochenek/emacs-scala-metals
Creating new file from template
is best example as it uses this feature and messageBox.
When you execute command metals.new-scala-file
metals will ask client firstly about one of a few choices(class, trait, ...) and then expect to type name of file.
A gif showing how it looks in VSCode attached in mentioned repo.
Specs for LSP for initialization message: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#initialize
When sending
ClientCapabilities
client can addexperimental
section that is custom for different client/server settings.Metals supports parameter
inputBoxProvider
that is boolean and can be set to true/false.If this setting is set to
true
metals will assume this request can be handled by client:Command name will be:
metals/inputBox
Request will contain this parameter(it is as with all other requets serialized to json)response: