fix: mapping update for new version of indent-blankline plugin (#2683)

* fix: mapping update for new version of indent-blankline plugin

obsolete function, correcting for the new version of said indent-blankline plugin

* improve blankline mapping
---------

Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
This commit is contained in:
Jhon Vidal 2024-02-22 22:28:59 -04:00 committed by GitHub
parent ddef3aa172
commit 9414658e35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 7 deletions

View File

@ -391,14 +391,19 @@ M.blankline = {
n = {
["<leader>cc"] = {
function()
local ok, start = require("indent_blankline.utils").get_current_context(
vim.g.indent_blankline_context_patterns,
vim.g.indent_blankline_use_treesitter_scope
)
local config = { scope = {} }
config.scope.exclude = { language = {}, node_type = {} }
config.scope.include = { node_type = {} }
if ok then
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
vim.cmd [[normal! _]]
local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config)
if node then
local start_row, _, end_row, _ = node:range()
if start_row ~= end_row then
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 })
vim.api.nvim_feedkeys("_", "n", true)
end
end
end,