-
-
Notifications
You must be signed in to change notification settings - Fork 884
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 YANG LSP support #4390
Conversation
834943f
to
55cafa8
Compare
There is a compile error:
Can you update our CHANGELOG.org too? :) |
I'll fix both in the next patch, thanks. |
55cafa8
to
866fbdd
Compare
@jcs090218 request your rereview here |
clients/lsp-yang.el
Outdated
:group 'lsp-yang | ||
:package-version '(lsp-mode . "8.0.1")) | ||
|
||
(setq lsp-json-schemas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... where does this variable come from? 🤔 This looks a bit odd to me. Usually, we don't change the variable at the root level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from lsp-json.el in this repo. Is it better to append to the list? How does one do that for repeat alist
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess my question is, why is the YANG lsp client required to modify JSON language server settings? 🤔 Most language server clients are isolated, so it's a bit odd to see something like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The json schema association settings could be set in init.el
or .emacs
for user specified associations as per variable provided by lsp-json.el
. json schema associations are not always possible to encode in the json itself due to variability in editor support and how strictly json schema is written.
The association, hence, is provided via json schema handling subsystem configuration, which is the lsp-json.el
in lsp-mode based emacs world as I see. The validation et al under the hood happens via vscode json language server.
Now, it should be possible for "emacs extensions" which are json based config consumers, to provide schema and association (like it is possible via vscode extensions), as an addition to a list of known associations, else each user of lsp-yang.el
for example will have to make the association themselves, or there would be a central database of association configuration, neither of which scale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this setting for this commit, since setq
overrides any default settings. There should be a mechanism provided by lsp-json.el
which allows for appending any default or further setq
.
866fbdd
to
5d7381a
Compare
5d7381a
to
dd27bc6
Compare
dd27bc6
to
e3f91e1
Compare
Thanks @jcs090218. Could you please guide me on how to resolve the failing checks? I don't know where to start. |
This addresses emacs-lsp#4355 Signed-off-by: Siddharth Sharma <[email protected]>
e3f91e1
to
f77a36a
Compare
Signed-off-by: Siddharth Sharma <[email protected]>
Don't worry about the failing tests. It's irrelevant to this PR. |
Thanks a lot @jcs090218. I have resolved the review comments hopefully, and also fixed the |
Thank you for your contribution! |
This addresses #4355