Initial commit
This commit is contained in:
91
modules/features/neovim/lua-config/snippets/nix.lua
Normal file
91
modules/features/neovim/lua-config/snippets/nix.lua
Normal file
@@ -0,0 +1,91 @@
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
return {
|
||||
-- Full lux module (both nixos and homeManager)
|
||||
s("luxmod", {
|
||||
t({
|
||||
"{ inputs, ... }:",
|
||||
"{",
|
||||
" lux."
|
||||
}),
|
||||
i(1, "moduleName"),
|
||||
t({
|
||||
" = {",
|
||||
" nixos = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(2),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
"",
|
||||
" homeManager = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(3),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
" };",
|
||||
"}",
|
||||
}),
|
||||
}),
|
||||
|
||||
-- lux nixos only module
|
||||
s("luxnixos", {
|
||||
t({
|
||||
"{ inputs, ... }:",
|
||||
"{",
|
||||
" lux."
|
||||
}),
|
||||
i(1, "moduleName"),
|
||||
t({
|
||||
".nixos = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(0),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
"}",
|
||||
}),
|
||||
}),
|
||||
|
||||
-- lux homeManager only module
|
||||
s("luxhm", {
|
||||
t({
|
||||
"{ inputs, ... }:",
|
||||
"{",
|
||||
" lux."
|
||||
}),
|
||||
i(1, "moduleName"),
|
||||
t({
|
||||
".homeManager = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(0),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
"}",
|
||||
}),
|
||||
}),
|
||||
|
||||
-- den inline aspect
|
||||
s("denaspect", {
|
||||
t({
|
||||
"(",
|
||||
" { host, user, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(0),
|
||||
t({
|
||||
"",
|
||||
" }",
|
||||
")"
|
||||
}),
|
||||
}),
|
||||
}
|
||||
Reference in New Issue
Block a user