silicon.lua icon indicating copy to clipboard operation
silicon.lua copied to clipboard

Gobble feature inaccuracy

Open DrKGD opened this issue 3 years ago • 0 comments

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

DrKGD avatar Dec 10 '22 12:12 DrKGD