I've decided to try out
yasnippet recently, and while it seems to work for me, I have an issue with how it handles comments. I've set my trigger key to SPC, which causes unnecessary snippet expansion in comments (and strings).
It seems that
yasnippet has a predefined condition to avoid expansion in such cases in
yas-not-string-or-comment-condition, but it causes the trigger key to do nothing rather than falling back to its original behavior, namely
self-insert-command. After checking whether setting
yas-not-string-or-comment-condition solves the problem for me, I attempted to wrap the function that's bound to trigger keys (
yas-expand-from-trigger-key) with advice that falls back to running
self-insert-command, but that fails since I don't have access to the key that was pressed.
Has anyone ran into this issue (I wasn't able to find any questions about this here, or in github issues for