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

The items inside popup menu are mis-indented #999

Closed
2 tasks done
AstroShen opened this issue May 18, 2022 · 5 comments
Closed
2 tasks done

The items inside popup menu are mis-indented #999

AstroShen opened this issue May 18, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@AstroShen
Copy link

FAQ

  • I have checked the FAQ and it didn't resolve my problem.

Announcement

Minimal reproducible full config

Description

For example, I enter cout, the popup menu looks like this:
cout variable [lsp]
cout snippet [luasnip]
The first item is more indented than the second item, whick looks uncomfortable.

Steps to reproduce

When popup menu are activated and more than one items are in the popup menu.

Expected behavior

The items inside popup menu are correctly indented.

Actual behavior

The popup menu looks like this:
cout variable [lsp]
cout snippet [luasnip]

Additional context

No response

@AstroShen AstroShen added the bug Something isn't working label May 18, 2022
@Shougo
Copy link

Shougo commented May 18, 2022

Hm... It is hard to understand. Can you upload the screenshot?

@hrsh7th
Copy link
Owner

hrsh7th commented May 18, 2022

It's caused by clandg.

@AstroShen
Copy link
Author

It's caused by clandg.

Yep, but is it a bug? If not, do you know how to shut down this annoying feature?

@hrsh7th
Copy link
Owner

hrsh7th commented May 18, 2022

Sorry. I don't know how to acoid tjis with clang...(I don't write c family...

@AstroShen
Copy link
Author

Sorry. I don't know how to acoid tjis with clang...(I don't write c family...

I just solved this, clangd have an option --header-insertion-decorators to identify items which will be potentially requiring a header file. For example, cout is declared in header file, so before using cout #include <iostream> must be added. Clangd allows users to use function&variable&class without include required headers, because clangd will automatically include missing headers, and those items are tagged which may insert header file.
Set the option --header-insertion-decorators=false will work.

Just for those who have the same issue. Maybe adding another layer in nvim-cmp to format the items? Maybe unecessary i guess.

williamboman added a commit to williamboman/nvim-cmp that referenced this issue Sep 23, 2022
…indow

* upstream/main: (36 commits)
  feat: add `filter` option to sources (hrsh7th#1067)
  Restore rockspec
  Fix grammar mistake: "setup" -> "set up" (hrsh7th#1155)
  fix(timer): close timers before Neovim exits (hrsh7th#1166)
  Add incsearch_redraw_keys settings (hrsh7th#1162)
  Fix hrsh7th#1149 (temporary fix)
  Fix hrsh7th#1146
  Re-fix hrsh7th#1144
  Fix hrsh7th#1144
  Fix hrsh7th#1142
  Fix hrsh7th#1135
  Fix onetime configuration handling
  fix(entry/get_replace_range): handle TextEdit.range (hrsh7th#1140)
  Refactor a bit
  Restore filetype setting
  Fix hrsh7th#1139
  Add FAQ for clangd's command-line arguments. Fixes hrsh7th#999
  The default highlight groups shouldn't be default=true. Fixes hrsh7th#972
  Fix hrsh7th#1102
  Use `cmp.config.sources` (hrsh7th#1105)
  ...
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

No branches or pull requests

3 participants