Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit documentation of LSP version and message support #241

Open
esmasth opened this issue Apr 15, 2024 · 4 comments
Open

Explicit documentation of LSP version and message support #241

esmasth opened this issue Apr 15, 2024 · 4 comments

Comments

@esmasth
Copy link
Contributor

esmasth commented Apr 15, 2024

There are initiatives now to integration this LSP server into editors such as Emacs/(Neo)Vim/Sublime/... and it is very helpful if the API support is documented explicitly.

@esmasth
Copy link
Contributor Author

esmasth commented Apr 16, 2024

@dhuebner request your team's support here

An immediate help would be clarification on following

  • what LSP message content/trigger results in yang.settings file being read by the language server
  • what LSP message content/trigger results in all *.yang files in the workspace being read by the server

May I get a way to trigger LSP communication log for the VS Code client? I can provide the logs of communication triggered via the emacs lsp-mode or eglot lsp client frameworks, if differing from VS Code plugin logs.

@dhuebner
Copy link
Member

@esmasth
Some things I recall from working with the vs-code extension:

  • In vs-code's extensions view you can see the extension details and its activation events. For Yangster thees are: onCommand:yang.diagram.open and onLanguage:yang. Where onLanguage means that the extension will be activated as soon as the user opens a *.yang file.
  • When the extension starts it will start the language server
  • Language server will start building the workspace (loading *.yang files)
  • Each time a preference value is needed the yang.settings preferences will be loaded by reading the yang.settings file
  • Regarding the Log. I think there is already an output channel connected to the Yang LSP in vs-code. It just doesn't log much, only errors I think. The output channel is only visible in vs-code after the first logging event.

To give you more exact answer for some of your questions I will need to do some code digging. I don't know when I will have time for that

@esmasth
Copy link
Contributor Author

esmasth commented Apr 17, 2024

@dhuebner thanks for the initiation.

I think something goes sideways relatively in the other LSP client sequence that "Language server will start building the workspace (loading *.yang files)" does not work well with Emacs/Vim but works with VSCode/Sublime - precisely only the YANG files open as buffers in Emacs/Vim are passed on to the Language Server, and further yang.settings file is seemingly not accessed by the server, possibly related to how the workspace/project settings are sent over to the server.

Could we please have an option implemented in yang-vscode to log verbosely, as a cheaper alternate to code digging? Created TypeFox/yang-vscode#92 for LSP client side aspects - should there be a separate server ticket or can this ticket #241 itself be used for it?

@esmasth
Copy link
Contributor Author

esmasth commented Apr 26, 2024

Could we please have an option implemented in yang-vscode to log verbosely, as a cheaper alternate to code digging? Created TypeFox/yang-vscode#92 for LSP client side aspects

@dhuebner closed TypeFox/yang-vscode#92 with vscode-languageclient based tracing. Would still be helpful to have clarification and documentation via this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants