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 candidate display is wrong. #48

Closed
uga-rosa opened this issue Aug 24, 2021 · 15 comments
Closed

The candidate display is wrong. #48

uga-rosa opened this issue Aug 24, 2021 · 15 comments

Comments

@uga-rosa
Copy link
Contributor

The source is nvim_lsp (sumneko_lua).

image

image

If I return to normal mode with esc from the first picture, the display will remain like this.

image

I am using lspkind, but this is not relevant.

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

It seems to cause by deprecated strike through.
I think it's related to your using fonts. I will disable it by default.

The correct case is here.
スクリーンショット 2021-08-24 14 41 06

The table.move method is not available in LuaJIT so sumneko_lua mark it as deprecated.

@uga-rosa
Copy link
Contributor Author

I see. Thank you for the response!

@siduck
Copy link

siduck commented Aug 24, 2021

@hrsh7th how did you get the [LSP] text in the completion menu? I added lspkind to formatting but I just get the icons 😞

image

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

I have below code in my formatting.format function.

        vim_item.menu = ({
          nvim_lsp = '[LSP]',
          buffer = '[Buf]',
        })[entry.source.name]

@siduck
Copy link

siduck commented Aug 24, 2021

I have below code in my formatting.format function.

        vim_item.menu = ({
          nvim_lsp = '[LSP]',
          buffer = '[Buf]',
        })[entry.source.name]

cool that works , Btw how do I add the completion item type too? cmp by default adds the type text to the item like "Function" "variable" etc but after adding lspkind it doesnt show that ;

image

compe :

image

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

Try this.

        vim_item.kind = lspkind.presets.default[vim_item.kind] .. ' ' .. vim_item.kind

@siduck
Copy link

siduck commented Aug 24, 2021

thanks that worked.

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 24, 2021

@uga-rosa I've introduced formatting.deprecated option (sorry. But it is true by default).

You can set formatting.deprecated = false to solve this.

@hrsh7th hrsh7th closed this as completed Aug 24, 2021
@uga-rosa
Copy link
Contributor Author

Solved. Thx!!

@rhcher
Copy link

rhcher commented Aug 27, 2021

I would like to know which font you are using @hrsh7th 🤣

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 27, 2021

I'm using JetBrainsMono NerdFont Medium with iTerm2 on Mac OS.

@rhcher
Copy link

rhcher commented Aug 27, 2021

Hi, I also use JetBrainsMono NF but with windows terminal. cmp seems to add a new special Unicode character after each character to achieve the strikethrough effect, And my deprecated strikethrough looks like that😭:

image

However, windows terminal is suppoted this kind of strikethrough:

image

Can this effect be achieved in cmp?

@Shougo
Copy link

Shougo commented Aug 27, 2021

I have seen the issue in other issues...

@hrsh7th
Copy link
Owner

hrsh7th commented Aug 27, 2021

OK. I will change deprecate indicator default value.

@LimbicSys
Copy link

图片
I have the same problem with @rhcher. But the strikethrough can be shown properly in neovim when use Windows Terminal.

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

6 participants