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

Confusing documentation #270

Closed
CapedBojji opened this issue Nov 14, 2023 · 1 comment
Closed

Confusing documentation #270

CapedBojji opened this issue Nov 14, 2023 · 1 comment

Comments

@CapedBojji
Copy link

is it possible to just show pictures of code instead of confusing explanations. The completion documentation makes no sense to me, if i want to enable custom completions, do i use the handler function or do i use the other 3 what is the purpose of the other 3. A simple image of the code and what it produces is all is needed
image
look at how simple nushell does it. thats all it takes to understand how it works

@TorchedSammy
Copy link
Member

TorchedSammy commented Nov 14, 2023

i'm working on improving the docs in #260 but i've also been doing other things irl.

to make completions for a command, here's an example:

hilbish.complete('command.animal', function(query, ctx, fields)
	local comp = {
		{
			items = {'dog', 'cat'},
			type = 'grid'
		}
	}

	return comp, query
end)

this is the bare minimum. it turns comp and the prefix, so you'll have to cut your completion string for it to work properly. if you have any suggestions on how to improve the docs that would be great, since the "confusing explanation" is still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants