NeoVIM plugin port of vscode-sort-json.
Screen-2023-07-01-145913.mp4
- jq use
jqas the processor by default.
-- 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
:SortJSONByAlphaNumMIT © 2nthony