-
Notifications
You must be signed in to change notification settings - Fork 349
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
Introduce LSP Support #904
base: master
Are you sure you want to change the base?
Conversation
I would prefer if lsp was an "optional dependency", i.e., if I don't use lsp I should not have to install it in order to use pyang. Also, please add some documentation (and update the README) |
Thanks @mbj4668. I can work on productization given the encouragement. Ambition level for this PR is to more or less keep to the same functionality level over LSP as much is available over CLI. |
This addresses mbj4668#903 Signed-off-by: Siddharth Sharma <[email protected]>
Also pruned dummy textDocument/inlineValue support Signed-off-by: Siddharth Sharma <[email protected]>
Signed-off-by: Siddharth Sharma <[email protected]>
Also add markdownlint.json configuration and github action to lint Signed-off-by: Siddharth Sharma <[email protected]>
Signed-off-by: Siddharth Sharma <[email protected]>
Also removed hard install requirement of pygls where users are not interested in using pyang as an LSP server. Signed-off-by: Siddharth Sharma <[email protected]>
Added more documentation Also introduced test cases to match manual validation Signed-off-by: Siddharth Sharma <[email protected]>
It was hardcoded to 64 with --lint earlier Signed-off-by: Siddharth Sharma <[email protected]>
Signed-off-by: Siddharth Sharma <[email protected]>
Signed-off-by: Siddharth Sharma <[email protected]>
It works on the shell but not in vscode tasks Signed-off-by: Siddharth Sharma <[email protected]>
@mbj4668 your comments were addressed by removing pygls installation dependency. It is still kept as a development dependency. Documentation and tests are now added to productize the code. Request your review and trial. |
Signed-off-by: Siddharth Sharma <[email protected]>
Version updates and module name updates are handled without duplicates or stale errors. Signed-off-by: Siddharth Sharma <[email protected]>
LSP clients do not clear diagnostics automatically based on local file system events, and without LSP server clearing the diagnostics LSP clients will have a stale entry for deleted/renamed URIs. See https://microsoft.github.io/language-server-protocol/specifications/lsp PublishDiagnostics Notification section. Signed-off-by: Siddharth Sharma <[email protected]>
This helps in inadvertent usage of models from pyang installation or certain environment variables when they are not controllable. Signed-off-by: Siddharth Sharma <[email protected]>
I tried this usinc coc.nvim in vim, but the Is this just broken or might there be a configuration option that I have missed? |
@marvinthepa thanks a lot for trying it out. I have progressed a lot further than this pull request, but didn't disturb the initial review here to get acceptance of the approach first. I will point you to the branch on esmasth/pyang, when I push the latest. |
This addresses #903