zls
zls copied to clipboard
Add snippet completion configuration options
const std = @import("std");
const panic = std.debug.pan <<-- TAB
After you TAB to complete that import in the newest vscode, zls completes and fills in the parameter signatures for the panic function. However, if you just wanted to complete to 'std.debug.panic;' by trying to hit ';' after the TAB (which is the default in some other languages), then the parameter signatures don't self delete properly.
Not sure if that is the correct behavior here but thought I would mention it.
Title changed as per suggestion from @alexnask after discussing this. I was using a third party completion tool called Tabnine that was giving me different options for TAB completions. This situation doesn't seem to be solvable the way I mentioned above, but Alex may have a different solution.
We could add options like inserting a tab stop before the parentheses, which may be useful to some people to have the option to delete argument lists more quickly when they don't need them.
Another option could be choice completion of enum literals for enum arguments.
We can do so some interesting stuff with snippet completions.
Options for different types of behavior like this are usually appreciated by the end users...in my experience, at least. It would be a nice addition when you get the chance. Thanks
If I understand the issue description correctly then this has become configurable through enable_argument_placeholders
option.
Solved almost 4 years later. 🫡