awk-language-server
awk-language-server copied to clipboard
Enhance automatically generated snippets
Use placeholders instead of:
- var
- file
- expr-list
- fmt
- cmd-line
- how
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:
- var -> variable
- file -> path/to/file
- expr-list -> expressions
- fmt -> format
- cmd-line -> command
In other words, generate: getline ${1:variable} <${2:path/to/file}
instead of getline var <file
.
i was curious where such getline var <file
came from...
// seems getline ${1:var} <${2:file}
is the correct format.
and why this lsp server no auto compl feature, and no any trigger char, a bit weird... :smile:
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
oh, but anyway getline var <file
looks was not a format can be recognized.
I'll take another look at generating docs when I have spare time but nowadays it's scarce.