Skip to content

Commit

Permalink
added new vscode config
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanshu-semwal committed Mar 3, 2024
1 parent 0f6b82b commit f1c4402
Show file tree
Hide file tree
Showing 15 changed files with 334 additions and 13 deletions.
Binary file not shown.
2 changes: 2 additions & 0 deletions .config/Code/User/profiles/-1452bd45/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
1 change: 1 addition & 0 deletions .config/Code/User/profiles/-29b26ea4/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"identifier":{"id":"dbaeumer.vscode-eslint","uuid":"583b2b34-2c1e-4634-8c0b-0b82e283ea3a"},"version":"2.4.4","location":{"$mid":1,"path":"/home/totoro/.vscode/extensions/dbaeumer.vscode-eslint-2.4.4","scheme":"file"},"relativeLocation":"dbaeumer.vscode-eslint-2.4.4","metadata":{"id":"583b2b34-2c1e-4634-8c0b-0b82e283ea3a","publisherId":"29859a75-d81b-4f0e-8578-2c80ecee6f99","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1707336754409,"pinned":false}},{"identifier":{"id":"esbenp.prettier-vscode","uuid":"96fa4707-6983-4489-b7c5-d5ffdfdcce90"},"version":"10.1.0","location":{"$mid":1,"path":"/home/totoro/.vscode/extensions/esbenp.prettier-vscode-10.1.0","scheme":"file"},"relativeLocation":"esbenp.prettier-vscode-10.1.0","metadata":{"id":"96fa4707-6983-4489-b7c5-d5ffdfdcce90","publisherId":"d16f4e39-2ffb-44e3-9c0d-79d873570e3a","publisherDisplayName":"Prettier","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1707336776208,"pinned":false}},{"identifier":{"id":"pkief.material-icon-theme","uuid":"5db78037-f674-459f-a236-db622c427c5b"},"version":"4.34.0","location":{"$mid":1,"path":"/home/totoro/.vscode/extensions/pkief.material-icon-theme-4.34.0","scheme":"file"},"relativeLocation":"pkief.material-icon-theme-4.34.0","metadata":{"id":"5db78037-f674-459f-a236-db622c427c5b","publisherId":"f9e5bc2f-fea1-4075-917f-d83e01e69f56","publisherDisplayName":"Philipp Kief","targetPlatform":"undefined","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1708366682455,"pinned":false,"preRelease":false}}]
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
//editor config
"editor.mouseWheelZoom": true,
"editor.fontFamily": "'IosevkaTerm Nerd Font', monospace",
"editor.renderWhitespace": "boundary",
"editor.semanticHighlighting.enabled": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": "on",
"editor.suggestSelection": "first",
"editor.unicodeHighlight.nonBasicASCII": false,
"editor.guides.bracketPairs": true,
"editor.minimap.enabled": false,
// workbench
"workbench.startupEditor": "none",
"workbench.editor.languageDetection": false,
"workbench.statusBar.visible": true,
// windows config
"window.autoDetectColorScheme": true,
"window.zoomLevel": 1,
// zenmode
"zenMode.fullScreen": false,
"zenMode.centerLayout": true,
"zenMode.hideLineNumbers": false,
// terminal
"terminal.integrated.enableMultiLinePasteWarning": "auto",
"terminal.explorerKind": "external",
"terminal.integrated.fontSize": 16,
// git
"git.autoRepositoryDetection": "subFolders",
"git.openRepositoryInParentFolders": "never",
// extensions
"extensions.ignoreRecommendations": true,

// PROFILE JS
"workbench.iconTheme": "material-icon-theme",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.run": "onSave"
}
14 changes: 14 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/snippets/basic.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Print Basic Header": {
"scope": "shellscript",
"prefix": "head",
"body": [
"# Use: $1",
"# Dependencies: $2",
"# Description: $3",
"# Working: $4",
"# Author: $5"
],
"description": "Basic template for shell scripts"
}
}
170 changes: 170 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/snippets/cpp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
{
// https://code.visualstudio.com/docs/editor/userdefinedsnippets
// prefix - what you have to serach snipped by
// $1, $2 tab stops
// $0 final cursor postion
// ${1:label} default values
"header": {
"prefix": "header",
"body": [
"#include <bits/stdc++.h>",
"using namespace std;",
""
],
"description": "cp template"
},
"competitive programming basic": {
"prefix": "cp",
"body": [
"#include <bits/stdc++.h>",
"using namespace std;",
"",
"int main(){",
"\t$1",
"\treturn 0;",
"}"
],
"description": "cp template"
},
"leetcode competitive programming": {
"prefix": "leetcode",
"body": [
"int main(){",
"\tSolution s;",
"\ts$1",
"\treturn 0;",
"}"
],
"description": "cp template"
},
"cp tree": {
"prefix": "cptree",
"body": [
"struct node {",
"\tint val;",
"\tnode *right;",
"\tnode *left;",
"\tnode(): val(0), left(nullptr), right(nullptr) {};",
"\tnode(int x): val(x), left(nullptr), right(nullptr) {};",
"\tnode(int x, node* xx): val(x), left(xx), right(xx) {};",
"\tnode(int x, node *l, node *r): val(x), left(l), right(r) {};",
"};"
],
"description": "cp template"
},
"for": {
"prefix": "for",
"body": [
"for (${1:size_t} ${2:i} = 0; $2 < ${3:count}; $2++) {",
"\t${4:/* code */}",
"}",
],
"description": "Main function"
},
"main": {
"prefix": "main",
"body": [
"int main() {",
"\t$1",
"\treturn 0;",
"}"
]
},
"headers": {
"prefix": "headers",
"body": [
"#include <iostream>",
"#include <algorithm>",
"#include <vector>",
"",
"using namespace std;\n"
]
},
"upper case": {
"prefix": "upper_case",
"body": [
"transform($1.begin(), $1.end(), $1.begin(), ::toupper)"
],
"description": "Convert string to uppercase."
},
"lower case": {
"prefix": "lower_case",
"body": [
"transform($1.begin(), $1.end(), $1.begin(), ::tolower)"
],
"description": "Convert string to lowercase."
},
"debug-print": {
"prefix": "debug",
"body": [
"void print(const int& x) { cout << x; }",
"void print(const long& x) { cout << x; }",
"void print(const bool& x) { cout << (x ? \"true\" : \"false\"); }",
"void print(const long long& x) { cout << x; }",
"void print(const unsigned& x) { cout << x; }",
"void print(const unsigned long& x) { cout << x; }",
"void print(const unsigned long long& x) { cout << x; }",
"void print(const float& x) { cout << x; }",
"void print(const double& x) { cout << x; }",
"void print(const long double& x) { cout << x; }",
"void print(const char& x) { cout << (char)44 << x << (char)44; }",
"void print(const char* x) { cout << (char)34 << x << (char)34; }",
"void print(const string& x) { cout << (char)34 << x << (char)34; }",
"template <typename T, typename V>",
"void print(const pair<T, V>& x);",
"template <typename T>",
"void print(const vector<T>& x);",
"template <typename T>",
"void print(const T& x);",
"template <typename T, typename V>",
"void print(const pair<T, V>& x) {",
"\tcout << '{';",
"\tprint(x.first);",
"\tcout << ',';",
"\tprint(x.second);",
"\tcout << \"}\";",
"}",
"template <typename T, typename V, typename U>",
"void print(const tuple<T, V, U>& x) {",
"\tcout << '{';",
"\tprint(get<0>(x));",
"\tcout << ',';",
"\tprint(get<1>(x));",
"\tcout << ',';",
"\tprint(get<2>(x));",
"\tcout << \"}\";",
"}",
"template <typename T>",
"void print(const vector<T>& x) {",
"\tcout << \"{\";",
"\tfor (int i = 0; i < x.size(); i++) {",
"\t print(x[i]);",
"\t cout << (x.size() - i - 1 ? \",\" : \"\");",
"\t};",
"\tcout << \"}\";",
"}",
"template <typename T>",
"void print(const T& x) {",
"\tint f = 0;",
"\tcout << '{';",
"\tfor (auto& i : x) cout << (f++ ? \",\" : \"\"), print(i);",
"\tcout << \"}\";",
"}",
"void dprint() { cout << \"]\\n\"; }",
"template <typename T, typename... V>",
"void dprint(T t, V... v) {",
"\tprint(t);",
"\tif (sizeof...(v)) cout << \", \";",
"\tdprint(v...);",
"}",
"#ifndef ONLINE_JUDGE",
"#define debug(x...) \\",
"\tcout << \"[\" << #x << \"] = [\"; \\",
"\tdprint(x)",
"#else",
"#define debug(x...)",
"#endif",
],
"description": "for printing values"
}
}
28 changes: 28 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/snippets/lex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Place your snippets for lex here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"basic program": {
"prefix": "basic",
"body": [
"%{",
"\t// c code",
"\t#include <stdio.h>",
"\t#include <stdlib.h>",
"%}",
"",
"%%",
"",
"%%",
"",
"int main(){",
"\tyylex();",
"\treturn 0;",
"}",
],
"description": "basic lex code"
}

}
15 changes: 15 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/snippets/markdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
}
48 changes: 48 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/snippets/react.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"Print to console": {
"prefix": "cl",
"scope": "javascript,typescript,javascriptreact",
"body": [
"console.log($1)"
],
"description": "console.log"
},
"reactComponent": {
"prefix": "rfc",
"scope": "javascript,typescript,javascriptreact",
"body": [
"function ${1:${TM_FILENAME_BASE}}() {",
"\treturn (",
"\t\t<div>",
"\t\t\t$0",
"\t\t</div>",
"\t)",
"}",
"",
"export default ${1:${TM_FILENAME_BASE}}",
""
],
"description": "React component"
},
"reactStyledComponent": {
"prefix": "rsc",
"scope": "javascript,typescript,javascriptreact",
"body": [
"import styled from 'styled-components'",
"",
"const Styled${TM_FILENAME_BASE} = styled.$0``",
"",
"function ${TM_FILENAME_BASE}() {",
"\treturn (",
"\t\t<Styled${TM_FILENAME_BASE}>",
"\t\t\t${TM_FILENAME_BASE}",
"\t\t</Styled${TM_FILENAME_BASE}>",
"\t)",
"}",
"",
"export default ${TM_FILENAME_BASE}",
""
],
"description": "React styled component"
}
}
15 changes: 15 additions & 0 deletions .config/Code/User/profiles/-29b26ea4/snippets/shellscript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Place your snippets for shellscript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
}
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ update_app() {

declare -a config=("fontconfig" "libinput-gestures.conf" "mpv" "starship.toml" "zathura")
declare -a i3=("i3" "dunst" "rofi" "polybar" "picom")
declare -a code=("snippets" "keybindings.json" "settings.json")
declare -a code=("snippets" "keybindings.json" "settings.json" "profiles")
declare -a codium=("snippets" "keybindings.json" "settings.json")
declare -a vim=("autoload" "bitmaps" "vimrc")
declare -a sublime=("User")
Expand Down
13 changes: 1 addition & 12 deletions vscode/c-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@
```json
{
"C_Cpp.intelliSenseCacheSize": 1024,
"C_Cpp.clang_format_fallbackStyle": "{
BasedOnStyle: LLVM,
UseTab: Never,
IndentWidth: 4,
TabWidth: 4,
BreakBeforeBraces: Attach,
AllowShortIfStatementsOnASingleLine: true,
IndentCaseLabels: false,
ColumnLimit: 0,
AccessModifierOffset: -4,
AllowShortLoopsOnASingleLine: true
}",
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Attach, AllowShortIfStatementsOnASingleLine: true, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, AllowShortLoopsOnASingleLine: true }",
}
```

Expand Down
1 change: 1 addition & 0 deletions vscode/javascript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Javascript

0 comments on commit f1c4402

Please sign in to comment.