From be1fbe38b31b6046d396407c4efbf238941c6b08 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 21 Feb 2025 02:02:32 +0100 Subject: feat(lua): vim.text.indent() Problem: Indenting text is a common task in plugins/scripts for presentation/formatting, yet vim has no way of doing it (especially "dedent", and especially non-buffer text). Solution: Introduce `vim.text.indent()`. It sets the *exact* indentation because that's a more difficult (and thus more useful) task than merely "increasing the current indent" (which is somewhat easy with a `gsub()` one-liner). --- test/functional/plugin/lsp/inlay_hint_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/plugin') diff --git a/test/functional/plugin/lsp/inlay_hint_spec.lua b/test/functional/plugin/lsp/inlay_hint_spec.lua index fc6c3f46f7..eefcf825b8 100644 --- a/test/functional/plugin/lsp/inlay_hint_spec.lua +++ b/test/functional/plugin/lsp/inlay_hint_spec.lua @@ -316,13 +316,13 @@ test text local grid_without_inlay_hints = [[ test text | - ^ | + ^ | | ]] local grid_with_inlay_hints = [[ {1:01234}test text | - ^ | + ^ | | ]] -- cgit