cue icon indicating copy to clipboard operation
cue copied to clipboard

lsp: Add intellisense code completion

Open project0 opened this issue 1 month ago • 4 comments

Is your feature request related to a problem? Please describe. I have just tried the latest CUE version within VSCode and missing code suggestions for fields. This would incredible useful for automatically discover the schema while writing.

Describe the solution you'd like Full IntelliSense support (e.g. suggest field names of current schema, ctrl+space)

Describe alternatives you've considered There is none

Additional context v0.15.0-rc.1

project0 avatar Nov 03 '25 13:11 project0

Is this a VSCode specific problem ? I used the LSP both with and without the cue plugin in IntelliJ and I have autocomplete for fields in schemas.

LelouBil avatar Nov 05 '25 01:11 LelouBil

It seems to work mostly only if you know what you are looking for (e.g. type t and it suggest template etc..) .

But i am not be able to scroll through all the possibilities to get a better overview of what is possible Image

project0 avatar Nov 05 '25 08:11 project0

I also have ctrl+space functionality in nvim using lazyvim. I believe its blink.cmp under the hood, but i imagine getting it working with vscode would make it work in nvim all the same. I'm happy to test later if need be

kai-kystverket avatar Nov 17 '25 13:11 kai-kystverket

This isn't about any particular editor. I think the way I've built completions is a bit wrong. I currently store completions for file offsets within idents that are either field declaration names, or are uses of fields. This is a bit wrong because it means there's nothing stored in the empty lines between field declarations, which is what you're observing. I need to have a think about how to improve this.

cuematthew avatar Nov 17 '25 14:11 cuematthew