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

Max width on menu entries #88

Open
seblj opened this issue Aug 26, 2021 · 2 comments
Open

Max width on menu entries #88

seblj opened this issue Aug 26, 2021 · 2 comments

Comments

@seblj
Copy link

@seblj seblj commented Aug 26, 2021

Is it possible to get an option for doing something like this in nvim-cmp? hrsh7th/nvim-compe#124

@hrsh7th
Copy link
Owner

@hrsh7th hrsh7th commented Aug 26, 2021

You can already do it with formatting.format.

formatting = {
  format = function(entry, vim_item)
    vim_item.abbr = string.sub(vim_item.abbr, 1, 20)
    return vim_item
  end
}

But it can be conflicts with deprecated indicator so I will introduce it as configuration option (maybe)

@seblj
Copy link
Author

@seblj seblj commented Aug 26, 2021

It's no problem for me with the way it can be done now, so the issue is fixed for me at least! So feel free to close if you want to

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

Successfully merging a pull request may close this issue.

None yet
2 participants