yes there's a bit of java in my nvim config why do you ask?
This commit is contained in:
28
lua/snippets/norg.lua
Normal file
28
lua/snippets/norg.lua
Normal file
@ -0,0 +1,28 @@
|
||||
require('core.snippets.shorthands')
|
||||
|
||||
local function file_name(args, parent, user_args)
|
||||
return vim.fn.expand("%:t:r")
|
||||
end
|
||||
|
||||
return {
|
||||
-- header level 1, usually this has the same name as the file
|
||||
s("h1", {
|
||||
t("* "),
|
||||
c(1, {
|
||||
f(file_name, {}),
|
||||
i(1, "header")
|
||||
})
|
||||
}),
|
||||
|
||||
-- link snippet
|
||||
s("link", {
|
||||
t("{"),
|
||||
c(1, {
|
||||
sn(nil, { t({":$/"}), i(1, "path to file"), t(":") }),
|
||||
i(1, "https://example.com")
|
||||
}),
|
||||
t("}["),
|
||||
i(2, "description"),
|
||||
t("]")
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user