A NeoVIM plugin that can sort current JSON file by key name.
Screen-2023-07-01-145913.mp4
-- lazy.nvim
return {
"2nthony/sortjson.nvim",
cmd = {
"SortJSONByAlphaNum",
"SortJSONByAlphaNumReverse",
"SortJSONByKeyLength",
"SortJSONByKeyLengthReverse",
},
-- options with default values
opts = {
log_level = "WARN", -- log level, see `:h vim.log.levels`, print error info when parsing json failed
},
}# Supported commands see `cmd = {}` above
:SortJSONByAlphaNumMIT © 2nthony