jsonls.lua 427 B

1234567891011121314151617181920212223
  1. local full_schemas = vim.tbl_deep_extend(
  2. "force",
  3. require("schemastore").json.schemas(),
  4. require("nlspsettings.jsonls").get_default_schemas()
  5. )
  6. local opts = {
  7. settings = {
  8. json = {
  9. schemas = full_schemas,
  10. },
  11. },
  12. setup = {
  13. commands = {
  14. Format = {
  15. function()
  16. vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
  17. end,
  18. },
  19. },
  20. },
  21. }
  22. return opts