LnL7 / vim-nix

Vim configuration files for Nix http://nixos.org/nix
MIT License
288 stars 26 forks source link

add snippets for UltiSnips #23

Closed Mic92 closed 1 year ago

Mic92 commented 6 years ago

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

Mic92 commented 6 years ago

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 commented 1 year ago

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

doronbehar commented 1 year ago

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