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

obsolete function, correcting for the new version of said indent-blankline plugin
pull/2683/head
Jhon Vidal 4 months ago committed by GitHub
parent ddef3aa172
commit f976f67f95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -391,14 +391,26 @@ 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
)
if ok then
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
vim.cmd [[normal! _]]
local config = {
scope = {
exclude = {
language = {},
node_type = {},
},
include = {
node_type = {},
},
injected_languages = true,
},
}
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.cmd [[normal! _]]
end
end
end,

Loading…
Cancel
Save