diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-12 17:02:54 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-12 22:57:34 +0200 |
| commit | 1734929edd6ceb47fcee53cb9d0a408b41dea14a (patch) | |
| tree | 2bd06885ddd5f91656dfb7851ddb3446e6a2ca74 /.config/nvim/plugin/50-transform_text.lua | |
| parent | c3c0fe51524d0e7bbc2d93fb9ee0127db691287a (diff) | |
| download | dotfiles-1734929edd6ceb47fcee53cb9d0a408b41dea14a.tar.gz dotfiles-1734929edd6ceb47fcee53cb9d0a408b41dea14a.zip | |
misc(nvim): reformat lua files to 100 char line width
Diffstat (limited to '.config/nvim/plugin/50-transform_text.lua')
| -rw-r--r-- | .config/nvim/plugin/50-transform_text.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/nvim/plugin/50-transform_text.lua b/.config/nvim/plugin/50-transform_text.lua index 9ec74d5..6786ba2 100644 --- a/.config/nvim/plugin/50-transform_text.lua +++ b/.config/nvim/plugin/50-transform_text.lua @@ -1,5 +1,8 @@ local function get_visual_selection_text() - return table.concat(vim.fn.getregion(vim.fn.getpos("v"), vim.fn.getpos("."), { type = vim.fn.mode() }), "\n") + return table.concat( + vim.fn.getregion(vim.fn.getpos("v"), vim.fn.getpos("."), { type = vim.fn.mode() }), + "\n" + ) end local function delete_visual_selection() @@ -7,7 +10,8 @@ local function delete_visual_selection() local eovisual_pos, cur_pos = vim.fn.getpos("v"), vim.fn.getpos(".") local region = vim.fn.getregionpos(eovisual_pos, cur_pos, { type = mode })[1] local start_row, start_col = unpack(region[1], 2, 3) - local end_row, end_col = mode == "v" and region[2][2] or math.max(eovisual_pos[2], cur_pos[2]), region[2][3] + local end_row, end_col = + mode == "v" and region[2][2] or math.max(eovisual_pos[2], cur_pos[2]), region[2][3] vim.api.nvim_buf_set_text(0, start_row - 1, start_col - 1, end_row - 1, end_col, {}) end |
