Beaglefoot / awk-language-server

Language Server for AWK and associated VSCode client extension
https://marketplace.visualstudio.com/items?itemName=beaglefoot.awk-ide-vscode
MIT License
90 stars 5 forks source link

Feature/add snippets #43

Closed EmilyGraceSeville7cf closed 1 year ago

Shane-XB-Qian commented 1 year ago

the snip should be placed at server side? or just for vsc? if for vsc only, then perhaps there are some local snip plugin/extension can do that already.

EmilyGraceSeville7cf commented 1 year ago

the snip should be placed at server side? or just for vsc?

It's better to place them at server side like in Bash IDE for VS Code, but I don't know how to do it now, not TypeScript developer. I don't like the idea to have several extensions just to provide both code hints and snippets. I prefer to have one good extension which provides these features. 😄 BTW, there is another similar extension with snippets provided too.

Shane-XB-Qian commented 1 year ago

yes, i think if this snip fs placed at client for vsc only, then looks unnecessary, or conflict. // i recall vsc had general way to add snips.

if you like to add snip within lsp server package, i thought better be in server folder.

Shane-XB-Qian commented 1 year ago

I prefer to have one good extension which provides these features.

i do not use vsc much, but to vim, there several plugins can generally offer snips for many langs, and can do without lsp.

but you're ok to add snips into lsp server package, (which should be in server folder), that would be workable for all clients (not only vsc or vim), that's a good impl as well.

Beaglefoot commented 1 year ago

The snippets ended up on server side. Hopefully this makes more sense and lets all editors to benefit from them.

Shane-XB-Qian commented 1 year ago

but I don't know how to do it now, not TypeScript developer.

@Beaglefoot would you mind help @EmilySeville7cfg move this snip file to right place?

Beaglefoot commented 1 year ago

but I don't know how to do it now, not TypeScript developer.

@Beaglefoot would you mind help @EmilySeville7cfg move this snip file to right place?

It's already there. The last published version provides snippets on server side.

Shane-XB-Qian commented 1 year ago

thx, i just verified a bit, but seems not work still. maybe should directly registered snippets.json to src/snippets.ts as const var?

Beaglefoot commented 1 year ago

Hate to say it but works on my side: output

Would you mind to open an issue describing all the steps to replicate?

Shane-XB-Qian commented 1 year ago

// i opened #44

seems a bit complex to me to desc the steps, i am not using vsc. but i am trying to debug a bit, please check #44