From fdbf1dd63a4d706aaf5c5d83d21581693ddbf777 Mon Sep 17 00:00:00 2001 From: Myzel394 Date: Sat, 7 Jun 2025 22:43:38 +0200 Subject: [PATCH] chore: Update README.md for new jsonpath integration --- README.md | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2529b49..3abfc70 100644 --- a/README.md +++ b/README.md @@ -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 `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 `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 `` (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