File tree Expand file tree Collapse file tree 7 files changed +74
-0
lines changed
Expand file tree Collapse file tree 7 files changed +74
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Sqlorm intends to provide a solution where SQL stays front and center and where
1818- Built-in SQL based migration system
1919- Low coupling between different parts of the library which can be used directly with DBAPI Connections
2020- Easy to understand code
21+ - VS Code syntax highlighting using [ extension] ( https://marketplace.visualstudio.com/items?itemName=hyperflask.sqlorm-language-support )
2122
2223[ Read the documentation] ( https://hyperflask.github.io/sqlorm )
2324
Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ with engine as tx:
122122 task.toggle()
123123```
124124
125+ ## Editor support
126+
127+ VS Code syntax highlighting using [ extension] ( https://marketplace.visualstudio.com/items?itemName=hyperflask.sqlorm-language-support )
128+
125129## Acknowledgements
126130
127131sqlorm is inspired by the many great ORMs that already exists in Python and other languages.
Original file line number Diff line number Diff line change 1+ // A launch configuration that launches the extension inside a new window
2+ // Use IntelliSense to learn about possible attributes.
3+ // Hover to view descriptions of existing attributes.
4+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+ {
6+ "version" : " 0.2.0" ,
7+ "configurations" : [
8+ {
9+ "name" : " Extension" ,
10+ "type" : " extensionHost" ,
11+ "request" : " launch" ,
12+ "args" : [
13+ " --extensionDevelopmentPath=${workspaceFolder}"
14+ ]
15+ }
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ .vscode /**
2+ .vscode-test /**
3+ .gitignore
4+ vsc-extension-quickstart.md
Original file line number Diff line number Diff line change 1+ # sqlorm-syntax-highligting
2+
3+ Highlight SQL statements inside SQLORM sql functions
4+
5+ WARNING: this is a basic extension that highlights docstrings that start with an SQL keyword. works need to be done to make it better
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " sqlorm-language-support" ,
3+ "displayName" : " SQLORM Syntax Highlighting" ,
4+ "description" : " Highlight SQL statements inside Python function docstrings" ,
5+ "version" : " 0.0.1" ,
6+ "engines" : {
7+ "vscode" : " ^1.96.0"
8+ },
9+ "categories" : [
10+ " Programming Languages"
11+ ],
12+ "contributes" : {
13+ "grammars" : [{
14+ "path" : " ./syntaxes/injection.json" ,
15+ "scopeName" : " sql-docstring.injection" ,
16+ "injectTo" : [" source.python" ],
17+ "embeddedLanguages" : {
18+ "meta.embedded.sql" : " sql"
19+ }
20+ }]
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ {
2+ "scopeName" : " sql-docstring.injection" ,
3+ "injectionSelector" : " L:string.quoted.docstring.multi.python" ,
4+ "patterns" : [
5+ {
6+ "begin" : " \\ b(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER|WITH)\\ b" ,
7+ "end" : " (?=\"\"\" )|(?=''')" ,
8+ "beginCaptures" : {
9+ "1" : {
10+ "name" : " keyword.other.sql"
11+ }
12+ },
13+ "contentName" : " meta.embedded.sql" ,
14+ "patterns" : [
15+ {
16+ "include" : " source.sql"
17+ }
18+ ]
19+ }
20+ ]
21+ }
You can’t perform that action at this time.
0 commit comments