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

Enhance automatically generated snippets #45

Open EmilyGraceSeville7cf opened 1 year ago

EmilyGraceSeville7cf commented 1 year ago

Use placeholders instead of:

and the same terms enclosed inside square brackets. To be clear, generate: getline ${1:var} <${2:file} instead of getline var <file.

BTW, I also suggest preprocess initial terms replacing them for more human readable ones:

In other words, generate: getline ${1:variable} <${2:path/to/file} instead of getline var <file.

Shane-XB-Qian commented 1 year ago

i was curious where such getline var <file came from...

// seems getline ${1:var} <${2:file} is the correct format.

Shane-XB-Qian commented 1 year ago

and why this lsp server no auto compl feature, and no any trigger char, a bit weird... :smile:

EmilyGraceSeville7cf commented 1 year ago

There is an awk script to generate doc.json (I don't remember it's name precise, but it's smth like that) file which is used then as a source for generated snippets

Shane-XB-Qian commented 1 year ago

oh, but anyway getline var <file looks was not a format can be recognized.

Beaglefoot commented 1 year ago

I'll take another look at generating docs when I have spare time but nowadays it's scarce.