json.lua 465 B

12345678910111213141516171819202122
  1. local common = require("lsp.common-config")
  2. local opts = {
  3. capabilities = common.capabilities,
  4. flags = common.flags,
  5. on_attach = function(client, bufnr)
  6. -- use fixjson to format
  7. -- https://github.com/rhysd/fixjson
  8. common.disableFormat(client)
  9. common.keyAttach(bufnr)
  10. end,
  11. settings = {
  12. json = {
  13. schemas = require("schemastore").json.schemas(),
  14. },
  15. },
  16. }
  17. return {
  18. on_setup = function(server)
  19. server.setup(opts)
  20. end,
  21. }