feat(struct_tags): trim output
This commit is contained in:
parent
59c150259d
commit
10abcb661e
2 changed files with 10 additions and 6 deletions
|
|
@ -62,6 +62,10 @@ local function handle_tags(fpath, bufnr, user_args)
|
||||||
error("failed to set tags " .. vim.inspect(res["errors"]))
|
error("failed to set tags " .. vim.inspect(res["errors"]))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for i, v in ipairs(res["lines"]) do
|
||||||
|
res["lines"][i] = string.gsub(v, "%s+$", "")
|
||||||
|
end
|
||||||
|
|
||||||
vim.api.nvim_buf_set_lines(
|
vim.api.nvim_buf_set_lines(
|
||||||
bufnr,
|
bufnr,
|
||||||
res["start"] - 1,
|
res["start"] - 1,
|
||||||
|
|
|
||||||
12
spec/fixtures/tags/remove_output.go
vendored
12
spec/fixtures/tags/remove_output.go
vendored
|
|
@ -1,11 +1,11 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
type Test struct {
|
type Test struct {
|
||||||
ID int
|
ID int
|
||||||
Name string
|
Name string
|
||||||
Num int64
|
Num int64
|
||||||
Another struct {
|
Another struct {
|
||||||
First int
|
First int
|
||||||
Second string
|
Second string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue