You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "pospisilf (via GitHub)" <gi...@apache.org> on 2023/04/13 12:11:19 UTC
[GitHub] [netbeans] pospisilf opened a new issue, #5822: LanguageServerProvider should be able to pass initialization options to Language Server
pospisilf opened a new issue, #5822:
URL: https://github.com/apache/netbeans/issues/5822
### Description
While developing new plugin (Language Client for Apache Camel) I found out that I am not able to pass initialization options to my Language Server. I opened [discussion](https://github.com/apache/netbeans/discussions/5776) few days ago about this but I get no response.
Camel Language server uses this initialization options for passing user preferences, like custom components, different catalog providers and so. This abilities are important for my thesis solution, so I decided to try edit existing API. I was able to pass these options, but I don't feel it's good enough to open Pull Request. You can see my partial solution in my NetBeans fork in branch [initOptions](https://github.com/pospisilf/netbeans/tree/initOptions). [(Link to specific commit changes.)](https://github.com/pospisilf/netbeans/commit/82c725026ffd4434bf5016a6dd293d7e7d2f81d6)
### Use case/motivation
Developer should be able to use whole potential of Language Server Protocol with added feature to pass initialization options to server.
### Related issues
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] pospisilf commented on issue #5822: LanguageServerProvider should be able to pass initialization options to Language Server
Posted by "pospisilf (via GitHub)" <gi...@apache.org>.
pospisilf commented on issue #5822:
URL: https://github.com/apache/netbeans/issues/5822#issuecomment-1721144655
Although I agree that provided solution can solve my situation, I still think that implementation of `initializationOptions` should be added as it's part of `InitializeParams`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] albilu commented on issue #5822: LanguageServerProvider should be able to pass initialization options to Language Server
Posted by "albilu (via GitHub)" <gi...@apache.org>.
albilu commented on issue #5822:
URL: https://github.com/apache/netbeans/issues/5822#issuecomment-1510206058
You can pass LSP configuration to the server from Netbeans like this:
```java
Gson create = new GsonBuilder()
.setObjectToNumberStrategy(ToNumberPolicy.BIG_DECIMAL).create();
Map<String, Object> settings = create
.fromJson("{YOUR_JSON_SETTINGS_OBJECT}",
new TypeToken<HashMap<String, Object>>() {
}.getType());
Map<String, Object> paramsObject = new HashMap<>();
DidChangeConfigurationParams params = new DidChangeConfigurationParams(paramsObject);
LSPBindings.getBindingsImpl(fileObject).getWorkspaceService()
.didChangeConfiguration(params);
```
You can call the didChangeConfiguration method at any time assuming your LSP server support it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] pospisilf commented on issue #5822: LanguageServerProvider should be able to pass initialization options to Language Server
Posted by "pospisilf (via GitHub)" <gi...@apache.org>.
pospisilf commented on issue #5822:
URL: https://github.com/apache/netbeans/issues/5822#issuecomment-1721144869
Although I agree that provided solution can solve my situation, I still think that implementation of `initializationOptions` should be added as it's part of `InitializeParams`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists