chore: Update README.md for new jsonpath integration

This commit is contained in:
Myzel394 2025-06-07 22:43:38 +02:00
parent a1c07adc00
commit fdbf1dd63a
Signed by: Myzel394
GPG Key ID: 79E65B4AA44EBBF0

View File

@ -1,3 +1,5 @@
**NOTICE**: I'm slowly migrating my repositories to my own Git server. Please visit this repository at [https://git.myzel394.app/Myzel394/jsonfly.nvim](https://git.myzel394.app/Myzel394/jsonfly.nvim) for the latest updates.
# jsonfly.nvim
Fly through your JSON, XML and YAML files with ease.
@ -17,6 +19,7 @@ It's completely customizable and even supports highlighting of the values.
* 🗑 Values automatically cached for faster navigation
* 🫣 Automatic concealment based on your configuration
* 📐 Everything completely customizable!
* 📝 [JSONPath](https://github.com/phelipetls/jsonpath.nvim) support - copy JSON paths to your clipboard
## Installation
@ -26,22 +29,30 @@ Install with your favorite plugin manager, for example with [lazy.nvim](https://
{
"nvim-telescope/telescope.nvim",
dependencies = {
-- "Myzel394/easytables.nvim",
-- "Myzel394/telescope-last-positions",
-- "https://git.myzel394.app/Myzel394/easytables.nvim",
-- "https://git.myzel394.app/Myzel394/telescope-last-positions",
-- Other dependencies
-- ..
"Myzel394/jsonfly.nvim",
"https://git.myzel394.app/Myzel394/jsonfly.nvim",
}
}
```
Load the extension with:
```lua
require("telescope").load_extension("jsonfly")
```
### Example
Here's how I load it with lazy.nvim with lazy-loading and `<leader>j` as the keymap :)
```lua
{
"nvim-telescope/telescope.nvim",
dependencies = {
"Myzel394/jsonfly.nvim",
"https://git.myzel394.app/Myzel394/jsonfly.nvim",
},
keys = {
{
@ -55,12 +66,6 @@ Here's how I load it with lazy.nvim with lazy-loading and `<leader>j` as the key
}
```
Load the extension with:
```lua
require("telescope").load_extension("jsonfly")
```
## Usage
Go to a JSON file and run:
@ -87,6 +92,24 @@ The following schemas are valid:
Please note: JSON(fly) is intended to be used with **human-readable** JSON files. Inserting keys won't work with minified JSON files.
## Integrating jsonpath.nvim
json(fly) has native support for [jsonpath.nvim](https://github.com/phelipetls/jsonpath.nvim).
Just make sure jsonpath is loaded when you call json(fly), and you can copy the currently selected path by pressing `<C-j>` (you can also change this keybinding of course).
Example:
```lua
{
url = "https://git.myzel394.app/Myzel394/jsonfly.nvim",
dependencies = {
"phelipetls/jsonpath.nvim"
},
},
```
## See also
* [jsonpath.nvim](https://github.com/phelipetls/jsonpath.nvim) - Copy JSON paths to your clipboard