vim-nix icon indicating copy to clipboard operation
vim-nix copied to clipboard

add snippets for UltiSnips

Open Mic92 opened this issue 5 years ago • 2 comments

Mic92 avatar Oct 04 '18 22:10 Mic92

Used by that extension: https://github.com/SirVer/ultisnips

Mic92 avatar Oct 04 '18 22:10 Mic92

maybe buildInputs and nativeBuildInputs:

snippet buildInputs "buildInputs"
buildInputs = [ ${1} ];
endsnippet
snippet nativeBuildInputs "nativeBuildInputs"
nativeBuildInputs = [ ${1} ];
endsnippet

but this is probably not saving a lot typing.

but nixpkgs might be handy:

snippet nixpkgs "with import <nixpkgs> {};"
with import <nixpkgs> {};
endsnippet

Mic92 avatar Oct 04 '18 22:10 Mic92

Someone else can pick this up. These days I use something smarter than snippet templates.

Mic92 avatar Aug 13 '23 10:08 Mic92

Added some snippets at https://github.com/rafamadriz/friendly-snippets/pull/356 . Thanks for the inspiration.

doronbehar avatar Aug 19 '23 10:08 doronbehar