feat(struct_tags): trim output

This commit is contained in:
Oleksandr Smirnov 2025-03-19 15:53:30 +02:00
parent 59c150259d
commit 10abcb661e
No known key found for this signature in database
2 changed files with 10 additions and 6 deletions

View file

@ -62,6 +62,10 @@ local function handle_tags(fpath, bufnr, user_args)
error("failed to set tags " .. vim.inspect(res["errors"]))
end
for i, v in ipairs(res["lines"]) do
res["lines"][i] = string.gsub(v, "%s+$", "")
end
vim.api.nvim_buf_set_lines(
bufnr,
res["start"] - 1,

View file

@ -1,11 +1,11 @@
package main
type Test struct {
ID int
Name string
Num int64
ID int
Name string
Num int64
Another struct {
First int
Second string
}
First int
Second string
}
}