From ef483bc6443bd049f58f4521dd06889f6c3f934a Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Tue, 25 Feb 2025 13:58:16 +0200 Subject: [PATCH] docs(struct_tags): update --- lua/gopher/struct_tags.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lua/gopher/struct_tags.lua b/lua/gopher/struct_tags.lua index 4389b62..b3c9dc7 100644 --- a/lua/gopher/struct_tags.lua +++ b/lua/gopher/struct_tags.lua @@ -1,13 +1,15 @@ ----@toc_entry Modifty struct tags +---@toc_entry Modify struct tags ---@tag gopher.nvim-struct-tags ---@text struct-tags is utilizing the `gomodifytags` tool to add or remove tags to struct fields. ----@usage - put your coursor on the struct ---- - run `:GoTagAdd json` to add json tags to struct fields ---- - run `:GoTagRm json` to remove json tags to struct fields +---@usage +--- How to add/remove tags to struct fields: +-- 1. Place cursor on the struct +--- 2. Run `:GoTagAdd json` to add json tags to struct fields +--- 3. Run `:GoTagRm json` to remove json tags to struct fields --- ---- note: if you dont spesify the tag it will use `json` as default +--- NOTE: if you dont specify the tag it will use `json` as default --- ---- simple example: +--- Example: --- >go --- // before --- type User struct { @@ -74,7 +76,7 @@ local function modify(...) end, }) - -- decode goted value + -- decode value local tagged = vim.json.decode(table.concat(output)) if tagged.errors ~= nil