mirror of
https://github.com/anotherhadi/jwt-tui.nvim.git
synced 2026-10-05 11:18:25 +02:00
@@ -0,0 +1,24 @@
|
||||
local M = {}
|
||||
|
||||
function M.setup(opts)
|
||||
local term = require("jwt-tui.term")
|
||||
term.config = vim.tbl_deep_extend("force", term.defaults, opts or {})
|
||||
|
||||
vim.api.nvim_create_user_command("JwtTui", function()
|
||||
term.open({})
|
||||
end, { desc = "jwt-tui: open JWT inspector" })
|
||||
|
||||
vim.api.nvim_create_user_command("JwtTuiOpen", function()
|
||||
term.open_selection()
|
||||
end, { range = true, desc = "jwt-tui: open with visual selection as token" })
|
||||
end
|
||||
|
||||
function M.open(opts)
|
||||
require("jwt-tui.term").open(opts or {})
|
||||
end
|
||||
|
||||
function M.open_selection()
|
||||
require("jwt-tui.term").open_selection()
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user