WIP: update-upstream #4
|
@ -391,14 +391,19 @@ M.blankline = {
|
||||||
n = {
|
n = {
|
||||||
["<leader>cc"] = {
|
["<leader>cc"] = {
|
||||||
function()
|
function()
|
||||||
local ok, start = require("indent_blankline.utils").get_current_context(
|
local config = { scope = {} }
|
||||||
vim.g.indent_blankline_context_patterns,
|
config.scope.exclude = { language = {}, node_type = {} }
|
||||||
vim.g.indent_blankline_use_treesitter_scope
|
config.scope.include = { node_type = {} }
|
||||||
)
|
|
||||||
|
|
||||||
if ok then
|
local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config)
|
||||||
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
|
|
||||||
vim.cmd [[normal! _]]
|
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
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue