mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nvim: stop using nix for nvim
I just wanna work, I don't wanna nix
This commit is contained in:
parent
157b568ab4
commit
3b08674586
30 changed files with 0 additions and 9 deletions
27
.config/nvim/snippets/c.json
Normal file
27
.config/nvim/snippets/c.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"Create main function": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"int main()",
|
||||
"{",
|
||||
"\t$0",
|
||||
"\treturn 0;",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Debug expression": {
|
||||
"prefix": "dbg",
|
||||
"body": [
|
||||
"printf(\"${1:expression}: ${2:format}\\n\", ${1:expression});"
|
||||
]
|
||||
},
|
||||
"Check pointer": {
|
||||
"prefix": "cpt",
|
||||
"body": [
|
||||
"if (${1:ptr} == NULL) {",
|
||||
"\treturn $2;",
|
||||
"}",
|
||||
"$0"
|
||||
]
|
||||
}
|
||||
}
|
||||
35
.config/nvim/snippets/package.json
Normal file
35
.config/nvim/snippets/package.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "leana-snippets",
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "c",
|
||||
"path": "./c.json"
|
||||
},
|
||||
{
|
||||
"language": "python",
|
||||
"path": "./python.json"
|
||||
},
|
||||
{
|
||||
"language": "rust",
|
||||
"path": "./rust.json"
|
||||
},
|
||||
{
|
||||
"language": "scala",
|
||||
"path": "./scala.json"
|
||||
},
|
||||
{
|
||||
"language": "tex",
|
||||
"path": "./tex.json"
|
||||
},
|
||||
{
|
||||
"language": "typst",
|
||||
"path": "./typst.json"
|
||||
},
|
||||
{
|
||||
"language": "xml",
|
||||
"path": "./xml.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
41
.config/nvim/snippets/python.json
Normal file
41
.config/nvim/snippets/python.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"Dict comprehension": {
|
||||
"prefix": "dc",
|
||||
"body": [
|
||||
"{",
|
||||
"\t${3:key}:${4:value}",
|
||||
"\tfor ${1:var} in ${2:iterated}",
|
||||
"}",
|
||||
""
|
||||
]
|
||||
},
|
||||
"List comprehension": {
|
||||
"prefix": "lc",
|
||||
"body": [
|
||||
"[",
|
||||
"\t${3:var}${4:transformation}",
|
||||
"\tfor ${1:var} in ${2:iterated}",
|
||||
"]",
|
||||
""
|
||||
]
|
||||
},
|
||||
"For": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:var} in ${2:iterable}:",
|
||||
"\t"
|
||||
]
|
||||
},
|
||||
"Open, read and save file to variable": {
|
||||
"prefix": "open",
|
||||
"body": [
|
||||
"${1:var} = []",
|
||||
"with open(\"${2:file.txt}\") as f:",
|
||||
"\t${1:var} = [",
|
||||
"\t\tline.strip()",
|
||||
"\t\tfor line in f.readlines() if line != '\\n'",
|
||||
"\t]",
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
9
.config/nvim/snippets/rust.json
Normal file
9
.config/nvim/snippets/rust.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Create main function": {
|
||||
"prefix": "main",
|
||||
"body": [
|
||||
"${0}",
|
||||
"fn main() {}"
|
||||
]
|
||||
}
|
||||
}
|
||||
12
.config/nvim/snippets/scala.json
Normal file
12
.config/nvim/snippets/scala.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"Debug a flow chain of consecutive methods": {
|
||||
"prefix": ".dbg",
|
||||
"body": [
|
||||
".map(x => {",
|
||||
"// DEBUG: this in an identity function that debugs to println",
|
||||
"\tprintln(x)",
|
||||
"\tx",
|
||||
"})"
|
||||
]
|
||||
}
|
||||
}
|
||||
25
.config/nvim/snippets/tex.json
Normal file
25
.config/nvim/snippets/tex.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"Verbatim mode": {
|
||||
"prefix": "```",
|
||||
"body": [
|
||||
"\\begin{BVerbatim}[commandchars=\\\\\\\\\\{\\\\}]",
|
||||
"$0",
|
||||
"\\end{BVerbatim}"
|
||||
],
|
||||
"description": "Verbatim mode mapped to markdown's codeblock"
|
||||
},
|
||||
"Opening French quotes": {
|
||||
"prefix": "<<",
|
||||
"body": [
|
||||
"«~"
|
||||
],
|
||||
"description": "Opening French quote with non breaking space"
|
||||
},
|
||||
"Closing French quote": {
|
||||
"prefix": ">>",
|
||||
"body": [
|
||||
"~»"
|
||||
],
|
||||
"description": "Closing French quote with non breaking space"
|
||||
}
|
||||
}
|
||||
91
.config/nvim/snippets/typst.json
Normal file
91
.config/nvim/snippets/typst.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"Enum item": {
|
||||
"prefix": "ei",
|
||||
"body": [
|
||||
"#enum.item[",
|
||||
"$0",
|
||||
"]"
|
||||
]
|
||||
},
|
||||
"List item": {
|
||||
"prefix": "li",
|
||||
"body": [
|
||||
"#list.item[",
|
||||
"$0",
|
||||
"]"
|
||||
]
|
||||
},
|
||||
"code": {
|
||||
"prefix": "sc",
|
||||
"body": [
|
||||
"#code[```$1",
|
||||
"$0",
|
||||
"```]"
|
||||
]
|
||||
},
|
||||
"showybox": {
|
||||
"prefix": "sb",
|
||||
"body": [
|
||||
"#showybox(title: [ $1 ],",
|
||||
"[ $0 ]",
|
||||
")"
|
||||
]
|
||||
},
|
||||
"showybox definition": {
|
||||
"prefix": "sd",
|
||||
"body": [
|
||||
"#showybox_definition(title: [ $1 ],",
|
||||
"[ $0 ]",
|
||||
")"
|
||||
]
|
||||
},
|
||||
"showybox remark": {
|
||||
"prefix": "sr",
|
||||
"body": [
|
||||
"#showybox_remark(title: [ $1 ],",
|
||||
"[ $0 ]",
|
||||
")"
|
||||
]
|
||||
},
|
||||
"showybox example": {
|
||||
"prefix": "se",
|
||||
"body": [
|
||||
"#showybox_example(title: [ $1 ],",
|
||||
"[ $0 ]",
|
||||
")"
|
||||
]
|
||||
},
|
||||
"showybox file": {
|
||||
"prefix": "sf",
|
||||
"body": [
|
||||
"#showybox_file(title: [ $1 ],",
|
||||
"[ $0 ]",
|
||||
")"
|
||||
]
|
||||
},
|
||||
"algorithm": {
|
||||
"prefix": "algo",
|
||||
"body": [
|
||||
"#algorithm(",
|
||||
"\tcaption: [ $1 ],",
|
||||
"\t{",
|
||||
"\t\tpseudocode(",
|
||||
"\t\t$0",
|
||||
"\t)},",
|
||||
")"
|
||||
]
|
||||
},
|
||||
"Config report": {
|
||||
"prefix": "report",
|
||||
"body": [
|
||||
"#import \"template/report.typ\": *",
|
||||
"",
|
||||
"#show: conf.with(",
|
||||
" title : \"${1}\",",
|
||||
" author : \"${2:Léana CHIANG}\",",
|
||||
" lang : \"${3:fr}\",",
|
||||
")",
|
||||
"$0"
|
||||
]
|
||||
}
|
||||
}
|
||||
16
.config/nvim/snippets/xml.json
Normal file
16
.config/nvim/snippets/xml.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"Tag": {
|
||||
"prefix": "<",
|
||||
"body": [
|
||||
"<${1:element}${2:property}>",
|
||||
"${0}",
|
||||
"</${1:element}>"
|
||||
]
|
||||
},
|
||||
"Auto-closing tag": {
|
||||
"prefix": "</",
|
||||
"body": [
|
||||
"<${1:element}/>"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue