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

Why are Keyword completion items being returned with a Text CompletionItemKind? #219

Open
ravilock opened this issue Aug 14, 2023 · 1 comment

Comments

@ravilock
Copy link
Contributor

ravilock commented Aug 14, 2023

After updating to 1.7.0, I was trying to test the new DROP TABLE keyword support.

But I noticed that on LunarVim (in particular), the suggestions where not being displayed.
After some debugging, I noticed that sqlls was properly configured, and also returning suggestions as usual. But still, suggestions where not being displayed

After some more debugging I found out that LunarVim skips LSP suggestions that have the Text kind.
WIth this information in hand, I found out this code

export const ICONS = {
  KEYWORD: CompletionItemKind.Text,
  COLUMN: CompletionItemKind.Interface,
  TABLE: CompletionItemKind.Field,
  FUNCTION: CompletionItemKind.Property,
  ALIAS: CompletionItemKind.Variable,
  UTILITY: CompletionItemKind.Event,
}

My questions is Why is that? Shouldn't keyword candidates be returned as CompletionItemKind.Keyword?

BTW, this ICONS object is being repeated here

@ravilock
Copy link
Contributor Author

Just for added context, the problem is solved here.
But I believe that it was just a coincidence. And is not necessarily related to this issue in particular.

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

1 participant