config.nvim

NeoVim config
git clone git://popovic.xyz/nvim.config.git/
Log | Files | Refs

basic.lua (320B)


      1 local ls = require("luasnip")
      2 
      3 local s = ls.snippet
      4 
      5 local date = function() return { os.date('%Y-%m-%d') } end
      6 local func = ls.function_node
      7 
      8 ls.add_snippets(nil, {
      9   all = {
     10     s({
     11       trig = "date",
     12       namr = "Date",
     13       dscr = "Date in the form of YYYY-MM-DD",
     14     }, {
     15       func(date, {}),
     16     }),
     17   },
     18 })