diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-01-14 21:06:56 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-01-15 14:59:24 +0100 |
| commit | ca837f5218e409a35d987246280f28a43984de31 (patch) | |
| tree | 1e7bb45b91f1760351ee7e10e56b1649cdc36f6c /lua | |
| parent | highlights(php): fix and add missing highlights (diff) | |
| download | nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.tar nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.tar.gz nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.tar.bz2 nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.tar.lz nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.tar.xz nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.tar.zst nvim-treesitter-ca837f5218e409a35d987246280f28a43984de31.zip | |
fix(util): pass offset_encoding to apply_text_edits
Offset encoding is a mandatory argument to
`vim.lsp.util.apply_text_edits` since https://github.com/neovim/neovim/commit/bc722c8a74766e14aff3a8e2fc46db72ed864053
Since we are always within a Neovim context, we can just pass `"utf-8"`.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/ts_utils.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/ts_utils.lua b/lua/nvim-treesitter/ts_utils.lua index b3261fd42..06b43ce4c 100644 --- a/lua/nvim-treesitter/ts_utils.lua +++ b/lua/nvim-treesitter/ts_utils.lua @@ -331,7 +331,7 @@ function M.swap_nodes(node_or_range1, node_or_range2, bufnr, cursor_to_second) local edit1 = { range = range1, newText = table.concat(text2, "\n") } local edit2 = { range = range2, newText = table.concat(text1, "\n") } - vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr) + vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr, "utf-8") if cursor_to_second then utils.set_jump() |
