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

preselect false with gopls #51

Closed
seblj opened this issue Aug 24, 2021 · 9 comments
Closed

preselect false with gopls #51

seblj opened this issue Aug 24, 2021 · 9 comments

Comments

@seblj
Copy link

seblj commented Aug 24, 2021

I recently started learning go, and it was annoying that it preselected the first completion. I found a fix for this with compe, but can't seem to find a similar setting in this plugin. Is there anything like this available? And if not, is it possible to add this?

See this for reference: hrsh7th/nvim-compe#52

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

Its' easy but I'm worried about configuration schema.

I'm now considering the following signature.

cmp.setup {
  preselect = cmp.Preselect.{Enabled,Disabled}
}

@seblj
Copy link
Author

seblj commented Aug 24, 2021

That would be totally ok for me at least

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

I've categorized the configuration schema like completion/confirmation/sorting/formatting.

The preselect can't be contained in such categories. I will give up to consider it.

@seblj
Copy link
Author

seblj commented Aug 24, 2021

So preselect will be a separate category?

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

I can't think of a new category. Therefore, as it is, preselect = cmp.Preselect. Add {Enabled, Disabled} .

(google translated)

@seblj
Copy link
Author

seblj commented Aug 24, 2021

I would be okay with that, but I would also think that it could fit into the category completion? Maybe I am misunderstanding, but I think that would make sense?

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

Hm... I have no confidence about it is completion.
So I might add preselect configuration. We can change it later.... (maybe... it will be breaking change but can show an error message at that time)

@seblj
Copy link
Author

seblj commented Aug 24, 2021

yeah that would be ok for me. just show an error message to inform the user so it's an easy change

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 25, 2021

@aca @seblj I've implemented the option.

cmp.setup {
  preselect = cmp.PreselectMode.None
}

@hrsh7th hrsh7th closed this as completed Aug 25, 2021
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