first commit

This commit is contained in:
captain 2026-04-11 22:22:01 +08:00
commit 3b19a9c8a8
29 changed files with 2428 additions and 0 deletions

62
snippets/lua.json Normal file
View file

@ -0,0 +1,62 @@
{
"sec": {
"prefix": "sec",
"body": [
"-- ===",
"-- === ${0}",
"-- ==="
],
"description": "Section comment"
},
"github": {
"prefix": "github",
"body": [
"\"https:\/\/github.com\/${0}\","
],
"description": "Github url"
},
"nvpack": {
"prefix": "nvpack",
"body": [
"-- === ${1:插件描述} ===",
"if vim.g.vscode then return end",
"",
"local P = {",
"\tname = \"${2:<++>}\", -- 仓库名",
"\tmodule = \"${3:<++>}\", -- require模块名",
"\tdeps = { ${4} },",
"\tbuild_cmd = ${5:nil},",
"}",
"",
"${6}-- 注册构建监听器",
"PackUtils.setup_listener(P.name, P.build_cmd)",
"",
"-- 懒加载触发器",
"vim.api.nvim_create_autocmd({",
"\t${7}-- \"InsertEnter\", \"CmdlineEnter\", -- 补全/命令行",
"\t-- \"BufReadPost\", \"BufNewFile\", -- 界面/语法类",
"\t-- \"LspAttach\", -- LSP 相关",
"\t-- \"FileType\", -- 确定文件类型",
"\t-- \"VimEnter\", -- 核心初始化完成",
"\t-- \"UIEnter\", -- vim.schedule(function()",
"}, {",
"\tcallback = function()",
"\t\tPackUtils.load(P, function(plugin)",
"\t\t\tplugin.setup({",
"\t\t\t\t$8",
"\t\t\t})",
"\t\tend)",
"\tend",
"})",
"-- vim.keymap.set({ \"n\", \"v\" }, \"${9:<++>}\", function()",
"-- \tPackUtils.load(P, function(plugin)",
"-- \t\tplugin.setup({",
"-- \t\t\t$10",
"-- \t\t})",
"-- \tend)",
"-- \tvim.cmd(\"${11:Command}\")",
"-- end, { desc = \"${0:描述}\" })"
],
"description": "Neovim Native Package Loader (Pure Config)"
}
}

47
snippets/markdown.json Normal file
View file

@ -0,0 +1,47 @@
{
"t2": {
"prefix": "t2",
"body": [
"| ${2:<++>} | <++> |",
"|-|-|",
"| <++> | <++> |${1}"
],
"description": "Snippet t2"
},
"t3": {
"prefix": "t3",
"body": [
"| ${2:<++>} | <++> | <++> |",
"|-|-|-|",
"| <++> | <++> | <++> |${1}"
],
"description": "Snippet t3"
},
"t4": {
"prefix": "t4",
"body": [
"| ${2:<++>} | <++> | <++> | <++> |",
"|-|-|-|-|",
"| <++> | <++> | <++> | <++> |${1}"
],
"description": "Snippet t4"
},
"t5": {
"prefix": "t5",
"body": [
"| ${2:<++>} | <++> | <++> | <++> | <++> |",
"|-|-|-|-|-|",
"| <++> | <++> | <++> | <++> | <++> |${1}"
],
"description": "Snippet t5"
},
"t6": {
"prefix": "t6",
"body": [
"| ${2:<++>} | <++> | <++> | <++> | <++> | <++> |",
"|-|-|-|-|-|-|",
"| <++> | <++> | <++> | <++> | <++> | <++> |${1}"
],
"description": "Snippet t6"
}
}

17
snippets/python.json Normal file
View file

@ -0,0 +1,17 @@
{
"pri": {
"prefix": "pri",
"body": [
"print(${0})"
],
"description": "print()"
},
"main": {
"prefix": "main",
"body": [
"if __name__ == '__main__':",
"\t${0}"
],
"description": "if main"
}
}

73
snippets/rust.json Normal file
View file

@ -0,0 +1,73 @@
{
"main": {
"prefix": "main",
"body": [
"fn main() {",
"\t${0}",
"}"
],
"description": "custom main"
},
"fn": {
"prefix": "fn",
"body": [
"fn ${1}(${2}) ${3}{",
"\t${4}",
"}"
],
"description": "custom function"
},
"let":{
"prefix": "let",
"body": [
"let ${1} = ${2};"
],
"description": "custom let"
},
"letmut":{
"prefix": "letm",
"body": [
"let mut ${1} = ${2};"
],
"description": "custom let mut"
},
"pri":{
"prefix": "pri",
"body": [
"println!(\"${1}\"${2});"
],
"description": "custom println"
},
"println":{
"prefix": "println",
"body": [
"println!(\"${1}\"${2});"
],
"description": "custom println"
},
"print":{
"prefix": "print",
"body": [
"print!(\"${1}\"${2});"
],
"description": "custom print"
},
"if": {
"prefix": "if",
"body": [
"if ${1} {",
"\t${2}",
"}"
],
"description": "custom if"
},
"for": {
"prefix": "for",
"body": [
"for ${1} in ${2} {",
"\t${3}",
"}"
],
"description": "custom for"
}
}