Skip to content

Allow configuring CompletionItem dropdown suggestions list order, or partial disabling of language server altogether #138665

@hamirmahal

Description

@hamirmahal

It would be nice if we could give preference to our language's CompletionItems in the suggestions dropdown list.

We made our language very similar to JavaScript, by design, so that it's more familiar to new developers.

So, it's nice when VSCode auto-detects our source files as JavaScript, because then we get nice things like syntax highlighting and variable renaming.

What isn't ideal, however, is that when developers type lines of code into a source file in our programming language, all the JavaScript suggestions appear first, and then our language's keywords appear in the suggestions dropdown list, near the bottom.

It would be awesome if we could give preference to our language's keywords, or just disable JavaScript's CompletionItems suggestions dropdown list altogether, i.e., pick-and-choose which parts of the JavaScript language server we want to enable, so that the CompletionItem suggestions dropdown list only shows our own keywords.

Or, it would also be very helpful if we could at least tell Visual Studio Code that we want JavaScript's CompletionItems to appear lower down in the suggestions dropdown list, i.e., let us be able to tell Visual Studio Code which precedence to give different language servers' CompletionItems in the suggestions dropdown list, if we can't disable a language's CompletionItems altogether, so that our language's keywords aren't appearing dead-last when developers write in our programming language.

We don't want to straight-up remove all of the functionality that JavaScript's language server provides, because like I said earlier, we get nice functionality like syntax highlighting and variable renaming by letting Visual Studio Code auto-detect our sources files as JavaScript. It would just be nice if we could pick-and-choose which parts of the JavaScript language server we want, or to at least give precedence to our language's keywords in the CompletionItem dropdown suggestions list.

I looked into implementing this in our programming language's language server, but Dirk recommended I open an issue here, since this is not under the control of the LSP library.

Screen.Recording.2021-12-07.at.9.55.22.AM.mov

Metadata

Metadata

Assignees

Labels

*questionIssue represents a question, should be posted to StackOverflow (VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions