diff --git a/lua/jsonfly/parsers.lua b/lua/jsonfly/parsers.lua index 2ffe8ee..45be2f6 100644 --- a/lua/jsonfly/parsers.lua +++ b/lua/jsonfly/parsers.lua @@ -142,7 +142,7 @@ function M:get_entries_from_lsp_symbols(symbols) -- We assume a default JSON file like: -- `"my_key": "my_value"` -- Since we get the end of the key, we can just add 4 to get the start of the value - value_start = symbol.selectionRange["end"].character + 4 + value_start = symbol.selectionRange["end"].character + 3, } } table.insert(keys, entry) diff --git a/lua/telescope/_extensions/jsonfly.lua b/lua/telescope/_extensions/jsonfly.lua index 8e4cfe9..61db420 100644 --- a/lua/telescope/_extensions/jsonfly.lua +++ b/lua/telescope/_extensions/jsonfly.lua @@ -47,7 +47,7 @@ local opts = { }, jump_behavior = "key_start", subkeys_display = "normal", - backend = "lua", + backend = "lsp", } ---@param results Entry[]