Skip to content

Gobble feature inaccuracy #25

@DrKGD

Description

@DrKGD

The gobble feature sometimes breaks, here are two examples of it happening (LaTeX, Lua)
image
image

The blocks are indented as following (using indentation tabs as character). In the second example I also included the visual highlighting utilized for the screenshot
image
image

	\begin{warn}[Test]
		Just a simple test in latex
	\end{warn}
	-- Disable global cursor line
	--  Enable on focus buffer()
	vim.opt.cursorline = false
	vim.api.nvim_create_autocmd({'VimEnter', 'WinEnter', 'BufWinEnter'},
		{ callback = function() vim.opt_local.cursorline = true end})
	vim.api.nvim_create_autocmd({'WinLeave'},
		{ callback = function() vim.opt_local.cursorline = false end})

I think it has something to do with the prefix-indentation (i.e. both blocks are indented once)
image

Oddly enough, the problem disappears by adding one (or more) indentation level(s)
image
image
image

I am also going to include my indent configuration for the sake of completeness.

-- Indentation --
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.expandtab = false
vim.opt.smarttab = false
vim.opt.shiftround = true
vim.opt.autoindent = true
vim.opt.smartindent = false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions