From ea77956c0224d9f9997d60e91642a4e255750f5b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 14 Nov 2023 18:10:22 +0100 Subject: Add a new blog post --- src/blog/nvim-ts/change-command.diff.gsp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/blog/nvim-ts/change-command.diff.gsp (limited to 'src/blog/nvim-ts/change-command.diff.gsp') diff --git a/src/blog/nvim-ts/change-command.diff.gsp b/src/blog/nvim-ts/change-command.diff.gsp new file mode 100644 index 0000000..8f1aeeb --- /dev/null +++ b/src/blog/nvim-ts/change-command.diff.gsp @@ -0,0 +1,9 @@ + end + + if node ~= nil then +@span .diff-del {-- -- TODO} +@span .diff-ins {-+ local sr, sc, er, ec = node:child(0):range()} +@span .diff-ins {-+ vim.api.nvim_buf_set_text(0, sr, sc, er, ec, { rhs \})} + end + end, { + buffer = true, -- cgit v1.2.3