summaryrefslogtreecommitdiff
path: root/snippets
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-02-08 11:49:10 +0100
committerNaz <ndpm13@ch-naseem.com>2025-02-08 11:49:10 +0100
commit9b9eab0b94e1aa7202226002d8774603677d23ba (patch)
treec6b9f4d4485d0873553bf324a976b7691aa70667 /snippets
parent0f181056a80d84e71f402b4d202c68c0212e215a (diff)
✨feat: add LSP and IDEish plugins
Diffstat (limited to 'snippets')
-rw-r--r--snippets/global.json7
-rw-r--r--snippets/package.json27
-rw-r--r--snippets/sql.json21
3 files changed, 55 insertions, 0 deletions
diff --git a/snippets/global.json b/snippets/global.json
new file mode 100644
index 0000000..027921b
--- /dev/null
+++ b/snippets/global.json
@@ -0,0 +1,7 @@
+{
+ "Naz's git config": {
+ "prefix": "gitnaz",
+ "body": ["[user]", " name = Naz", " email = ndpm13@ch-naseem.com"],
+ "description": "Naz's git config"
+ }
+}
diff --git a/snippets/package.json b/snippets/package.json
new file mode 100644
index 0000000..6582dd0
--- /dev/null
+++ b/snippets/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "my-snippets",
+ "engines": {
+ "vscode": "^1.11.0"
+ },
+ "contributes": {
+ "snippets": [
+ {
+ "language": [
+ "plaintext",
+ "markdown",
+ "tex",
+ "html",
+ "global",
+ "all"
+ ],
+ "path": "./global.json"
+ },
+ {
+ "language": [
+ "sql"
+ ],
+ "path": "./sql.json"
+ }
+ ]
+ }
+}
diff --git a/snippets/sql.json b/snippets/sql.json
new file mode 100644
index 0000000..d191703
--- /dev/null
+++ b/snippets/sql.json
@@ -0,0 +1,21 @@
+{
+ "BaseAuditEntity fields": {
+ "prefix": "sqlbae",
+ "body": [
+ "-- BaseAuditEntity fields",
+ "creator INT NOT NULL, -- FK to users.user_id",
+ "date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,",
+ "changed_by INT DEFAULT NULL, -- FK to users.user_id",
+ "date_changed TIMESTAMP DEFAULT NULL,",
+ "voided BOOLEAN NOT NULL DEFAULT FALSE,",
+ "voided_by INT DEFAULT NULL, -- FK to users.user_id",
+ "date_voided TIMESTAMP DEFAULT NULL,",
+ "void_reason VARCHAR(256) DEFAULT NULL,",
+ "uuid UUID NOT NULL DEFAULT gen_random_uuid () UNIQUE,",
+ "CONSTRAINT fk_${0}_creator FOREIGN KEY (creator) REFERENCES users (user_id),",
+ "CONSTRAINT fk_${0}_changed_by FOREIGN KEY (changed_by) REFERENCES users (user_id),",
+ "CONSTRAINT fk_${0}_voided_by FOREIGN KEY (voided_by) REFERENCES users (user_id)"
+ ],
+ "description": "BaseAuditEntity fields"
+ }
+}