neovim/luasnip: snippet system -> stdenv.hostPlatform.system

This commit is contained in:
Primrose 2025-11-26 09:06:36 +08:00
parent 8f0bc83348
commit 765fe566fc
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -5,8 +5,8 @@ local cr = function() return t { "", "" } end
local i = luasnip.insert_node local i = luasnip.insert_node
local f = luasnip.function_node local f = luasnip.function_node
local function datetime() return os.date('%Y-%m-%d %H:%M:%S') end local function datetime() return os.date("%Y-%m-%d %H:%M:%S") end
local function date() return os.date('%Y-%m-%d') end local function date() return os.date("%Y-%m-%d") end
local function quoted(s) return '"' .. s .. '"' end local function quoted(s) return '"' .. s .. '"' end
luasnip.add_snippets("typst", { luasnip.add_snippets("typst", {
@ -57,5 +57,9 @@ luasnip.add_snippets("ruler", {
}), }),
}) })
luasnip.add_snippets("nix", {
s("system", { t("stdenv.hostPlatform.system") }),
})
local haskell_snippets = require("haskell-snippets").all local haskell_snippets = require("haskell-snippets").all
luasnip.add_snippets("haskell", haskell_snippets, { key = "haskell" }) luasnip.add_snippets("haskell", haskell_snippets, { key = "haskell" })