Skip to content

Conversation

@kiennq
Copy link
Member

@kiennq kiennq commented Dec 11, 2019

Per #1073, adding lsp-json with server automatically installation capability.

Copy link
Member

@yyoncho yyoncho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Few questions:

  1. Is it possible to associate the current buffer with a specific schema?
  2. Do we need a method like lsp-json-update-schemas which should be called when schema mappings are changed?

lsp-json.el Outdated
"LSP support for JSON, using vscode-json-languageserver."
:group 'lsp-mode
:link '(url-link "https://github.com/vscode-langservers/vscode-json-languageserver")
:package-version '(lsp-mode . "6.2"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.2 was just released. We are now 6.3

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@kiennq
Copy link
Member Author

kiennq commented Dec 11, 2019

  1. Is it possible to associate the current buffer with a specific schema?

Yes, either via "$schema": "..." in json file or special mapping with lsp-json-schemas.
Please refer here for latter settings.

  1. Do we need a method like lsp-json-update-schemas which should be called when schema mappings are changed?

Not really, if we update schema then just run lsp-restart-workspace would be easier :).
I don't want to provide additional method (we can try to do it through :set for defcustom) unless it's necessary.

@yyoncho
Copy link
Member

yyoncho commented Dec 11, 2019

Ok, if lsp-json--schema-associations is intended to be used by the users it should be renamed to lsp-json-schema-associations.

@kiennq
Copy link
Member Author

kiennq commented Dec 11, 2019

Ok, if lsp-json--schema-associations is intended to be used by the users it should be renamed to lsp-json-schema-associations.

No, user should use lsp-json-schemas, the lsp-json--schema-associations is internal.

@yyoncho yyoncho merged commit 65ef971 into emacs-lsp:master Dec 11, 2019
@yyoncho
Copy link
Member

yyoncho commented Dec 11, 2019

Thank you!

@yyoncho
Copy link
Member

yyoncho commented Dec 11, 2019

No, user should use lsp-json-schemas, the lsp-json--schema-associations is internal.

Yes, you are right.

@yyoncho
Copy link
Member

yyoncho commented Dec 11, 2019

Do you have twitter? If yes, can you twit about it with a gif? IMO it will be very useful language server for a lot of people.

@kiennq kiennq deleted the feat/lsp-json branch December 11, 2019 19:58
@yyoncho
Copy link
Member

yyoncho commented Dec 11, 2019

@kiennq one more thing - if you have twitter account it will be great to tweet about the new functionality with a gif. IMO this server will be helpful for a lot of people.

@kiennq
Copy link
Member Author

kiennq commented Dec 11, 2019

Thanks, here is my twit https://twitter.com/neikmaster/status/1204859535610957824

@@ -0,0 +1,136 @@
;;; lsp-pwsh.el --- vscode-json-languageserver integration -*- lexical-binding: t; -*-
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this filename in this comment is wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, the downfall of copy/paste :(. Will update it next time I touch this file again.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries.

patgro1 pushed a commit to patgro1/lsp-mode that referenced this pull request Dec 15, 2019
* add lsp-json with automatic installation

* update README to include lsp-json
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

Successfully merging this pull request may close these issues.

3 participants