Skip to content

2nthony/sortjson.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sortjson.nvim

NeoVIM plugin port of vscode-sort-json.

Screen-2023-07-01-145913.mp4

Requirements

  • jq use jq as the processor by default.

Usage

-- lazy.nvim
return {
  "2nthony/sortjson.nvim",
  cmd = {
    "SortJSONByAlphaNum",
    "SortJSONByAlphaNumReverse",
    "SortJSONByKeyLength",
    "SortJSONByKeyLengthReverse",
  },
  -- options with default values
  opts = {
    jq = "jq", -- jq command, you can try `jaq` `gojq` etc.
    log_level = "WARN", -- log level, see `:h vim.log.levels`, when parsing json failed
  },
}
# Supported commands see `cmd = {}` above
:SortJSONByAlphaNum

License

MIT © 2nthony

About

sort json objects plugin for neovim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages