Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'char' is not a valid key of ibl.config.scope #672

Closed
CharlesChiuGit opened this issue Oct 2, 2023 · 4 comments · Fixed by #673
Closed

'char' is not a valid key of ibl.config.scope #672

CharlesChiuGit opened this issue Oct 2, 2023 · 4 comments · Fixed by #673
Labels
bug Something isn't working

Comments

@CharlesChiuGit
Copy link

Problem

In v3.2.3, ibl.config.scope.char doesn't seem to be a valid key, but it shows in the help page. So what's the right way to config it? tks!

image

Steps to reproduce

ibl config:

return function()
	require("ibl").setup({
		enabled = true,
		debounce = 200,
		indent = {
			char = "",
			tab_char = "",
			smart_indent_cap = true,
			priority = 2,
		},
		whitespace = { remove_blankline_trail = true },
		-- Note: Scope requires treesitter to be set up
		scope = {
			enabled = true,
			char = "",
			show_start = false,
			show_end = false,
			injected_languages = true,
			priority = 1000,
			include = {
				node_type = {
					["*"] = {
						"argument_list",
						"arguments",
						"assignment_statement",
						"Block",
						"chunk",
						"class",
						"ContainerDecl",
						"dictionary",
						"do_block",
						"do_statement",
						"element",
						"except",
						"FnCallArguments",
						"for",
						"for_statement",
						"function",
						"function_declaration",
						"function_definition",
						"if_statement",
						"IfExpr",
						"IfStatement",
						"import",
						"InitList",
						"list_literal",
						"method",
						"object",
						"ParamDeclList",
						"repeat_statement",
						"selector",
						"SwitchExpr",
						"table",
						"table_constructor",
						"try",
						"tuple",
						"type",
						"var",
						"while",
						"while_statement",
						"with",
					},
				},
			},
		},
		exclude = {
			filetypes = {
				"", -- for all buffers without a file type
				"alpha",
				"big_file_disabled_ft",
				"dashboard",
				"dotooagenda",
				"flutterToolsOutline",
				"fugitive",
				"git",
				"gitcommit",
				"help",
				"json",
				"log",
				"markdown",
				"NvimTree",
				"Outline",
				"peekaboo",
				"startify",
				"TelescopePrompt",
				"todoist",
				"txt",
				"undotree",
				"vimwiki",
				"vista",
			},
			buftypes = { "terminal", "nofile", "quickfix", "prompt" },
		},
	})
end

Expected behavior

ibl.config.scope.char is a valid key.

Neovim version (nvim -v)

NVIM v0.9.2

@CharlesChiuGit CharlesChiuGit added the bug Something isn't working label Oct 2, 2023
lukas-reineke added a commit that referenced this issue Oct 2, 2023
lukas-reineke added a commit that referenced this issue Oct 2, 2023
lukas-reineke added a commit that referenced this issue Oct 2, 2023
@lukas-reineke
Copy link
Owner

Pushed a fix

@CharlesChiuGit
Copy link
Author

tks! it works properly now.

@pkropachev
Copy link

Hi!

I use LazyVim config for NeoVim and see the following warning each time open file in Nvim.

scr1

It looks like I use the latest version from master.

scr2

Could you please advise what the reason can be?

@lukas-reineke
Copy link
Owner

That error is correct, char is not a valid key there.
it's either :help ibl.config.indent.char or :help ibl.config.scope.char

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants