nvim config stolen from @Lukacms

This commit is contained in:
2023-11-03 11:24:41 +01:00
parent e881d7c7f5
commit 50c4761b4b
42 changed files with 1809 additions and 0 deletions

96
nvim/snippets/c.json Normal file
View File

@@ -0,0 +1,96 @@
{
"header": {
"prefix": "header_c",
"body": [
"/*",
"** EPITECH PROJECT, 2023",
"** $TM_DIRECTORY",
"** File description:",
"** $TM_FILENAME_BASE",
"*/",
"",
"$0"
],
"description": "Code snippet for header"
},
"header_hpp": {
"prefix": "header_h",
"body": [
"/*",
"** EPITECH PROJECT, 2023",
"** $TM_DIRECTORY",
"** File description:",
"** $TM_FILENAME_BASE",
"*/",
"",
"#ifndef $3",
"#define $3",
"$0",
"#endif /* !$3 */",
""
],
"description": "Code snippet for header"
},
"main_": {
"prefix": "main_",
"body": [
"int main(int argc, char *const argv[]) {",
" return 0;",
"}"
]
},
"main": {
"prefix": "main",
"body": [
"int main(void) {",
" return 0;",
"}"
]
},
"while": {
"prefix": "while",
"body": [
"while ($1) {",
" $0",
"}"
],
"description": ""
},
"if": {
"prefix": "if",
"body": [
"if ($1) {",
" $0",
"}"
],
"description": "Code snippet for if statement"
},
"else": {
"prefix": "else",
"body": [
"else {",
" $0",
"}"
],
"description": "Code snippet for else statement"
},
"else if": {
"prefix": "else if",
"body": [
"else if ($1) {",
" $0",
"}"
],
"description": "Code snippet for else-if statement"
},
"Test()": {
"prefix": "Test",
"body": [
"Test(${1:function name}, ${2:test description})",
"{",
"$0",
"}"
],
"description": "Test criterion"
}
}

12
nvim/snippets/cmake.json Normal file
View File

@@ -0,0 +1,12 @@
{
"header": {
"prefix": "header",
"body": [
"##",
"## CMakeLists: $WORKSPACE_FOLDER / $TM_DIRECTORY",
"##",
"",
"$0"
]
}
}

147
nvim/snippets/cpp.json Normal file
View File

@@ -0,0 +1,147 @@
{
"header": {
"prefix": "header_cpp",
"body": [
"/*",
"** EPITECH PROJECT, 2023",
"** $TM_DIRECTORY",
"** File description:",
"** $TM_FILENAME_BASE",
"*/",
"",
"$0"
],
"description": "Code snippet for header"
},
"header_hpp": {
"prefix": "header_hpp",
"body": [
"/*",
"** EPITECH PROJECT, 2023",
"** $TM_DIRECTORY",
"** File description:",
"** $TM_FILENAME_BASE",
"*/",
"",
"#ifndef $3",
"#define $3",
"$0",
"#endif /* !$3 */",
""
],
"description": "Code snippet for header"
},
"header_hpp_": {
"prefix": "header_hpp_",
"body": [
"/*",
"** EPITECH PROJECT, 2023",
"** $TM_DIRECTORY",
"** File description:",
"** $TM_FILENAME_BASE",
"*/",
"",
"#pragma once",
"$0",
""
],
"description": "Code snippet for header"
},
"class": {
"prefix": "class",
"body": [
"class ${1:ClassName} {",
" public:",
" $1() = default;",
" $1($1 const& to_copy) = default;",
" $1($1&& to_move) = default;",
" ~$1() = default;",
" $1& operator=($1 const& to_copy) = default;",
" $1& operator=($1 && to_move) = default;",
"",
" private:",
"};",
""
],
"description": "Code snippet for class"
},
"ifndef": {
"prefix": "ifndef",
"body": [
"#ifndef $1",
"#define $1",
"",
"$0",
"",
"#endif /* !$1 */",
""
],
"description": "Code snippet for header"
},
"main_": {
"prefix": "main_",
"body": [
"int main(int argc, const char* argv[]) {",
" return 0;",
"}"
]
},
"main": {
"prefix": "main",
"body": [
"int main() {",
" return 0;",
"}"
]
},
"while": {
"prefix": "while",
"body": [
"while ($1)",
"{",
" $0",
"}"
],
"description": ""
},
"if": {
"prefix": "if",
"body": [
"if ($1)",
"{",
" $0",
"}"
],
"description": "Code snippet for if statement"
},
"else": {
"prefix": "else",
"body": [
"else",
"{",
" $0",
"}"
],
"description": "Code snippet for else statement"
},
"else if": {
"prefix": "else if",
"body": [
"else if ($1)",
"{",
" $0",
"}"
],
"description": "Code snippet for else-if statement"
},
"Test()": {
"prefix": "Test",
"body": [
"Test(${1:function name}, ${2:test description})",
"{",
"$0",
"}"
],
"description": "Test criterion"
}
}

View File

@@ -0,0 +1,16 @@
{
"header": {
"prefix": "header_haskell",
"body": [
"{-",
"-- EPITECH PROJECT, 2023",
"-- $TM_DIRECTORY",
"-- File description:",
"-- $TM_FILENAME_BASE",
"-}",
"",
"$0"
],
"description": "Code snippet for haskell header"
}
}

45
nvim/snippets/make.json Normal file
View File

@@ -0,0 +1,45 @@
{
"header": {
"prefix": "header_make",
"body": [
"##",
"## EPITECH PROJECT, 2023",
"## $RELATIVE_FILEPATH",
"## File description:",
"## $TM_FILENAME_BASE",
"##",
"",
"$0"
]
},
"src_c": {
"prefix": "SRC_C",
"body": [
"SRC\t=\t$1",
"",
"OBJ\t=\t(SRC:.c=.o)",
"",
"$0"
]
},
"src_cpp": {
"prefix": "SRC_CPP",
"body": [
"SRC\t=\t$1",
"",
"OBJ\t=\t(SRC:.cpp=.o)",
"",
"$0"
]
},
"src_asm": {
"prefix": "SRC_ASM",
"body": [
"SRC\t=\t$1",
"",
"OBJ\t=\t(SRC:.asm=.o)",
"",
"$0"
]
}
}

View File

@@ -0,0 +1 @@
{}

37
nvim/snippets/python.json Normal file
View File

@@ -0,0 +1,37 @@
{
"header": {
"prefix": "header_py",
"body": [
"##",
"## EPITECH PROJECT, 2023",
"## $TM_DIRECTORY",
"## File description:",
"## $TM_FILENAME_BASE",
"##",
"",
"$0"
],
"description": "code snippet for python header"
},
"rich print": {
"prefix": "frich",
"body": [
"from rich import print as rprint"
],
"description": ""
},
"pandas import": {
"prefix": "ipd",
"body": [
"import pandas as pd"
],
"description": ""
},
"numpy import": {
"prefix": "inp",
"body": [
"import numpy as np"
],
"description": ""
}
}

8
nvim/snippets/rust.json Normal file
View File

@@ -0,0 +1,8 @@
{
"header": {
"prefix": "header",
"body": [
""
]
}
}