Skip to content

Commit 995db11

Browse files
authored
add vscode package
1 parent d81b86e commit 995db11

8 files changed

+179
-67
lines changed
File renamed without changes.

PDL/Codespace/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Python Data Library Syntax-Highlighting
2+
3+
pdl-hl stands for Python Data Library Highlighter and it supports custom syntax highlighting for `.pdl` files in VSCode depending on your color theme.
4+
5+
## Features
6+
7+
The only thing pdl-hl does is syntax highlighting and pdl language support once installed it should automaticly highlight within the `.pdl` file. If not press `Ctrl + Shift + P` to pull the command pallete up then type `change langauge mode` and search `pdl` then press `Enter` keywords, comments, types and doc-strings are highlighted.
8+
9+
## Requirements
10+
11+
pdl-hl is syntax highlighting for Python Data Librarys so its recommended [python 3.11](https://www.python.org/downloads/release/python-3110/) is installed to use the created `.pdl` files in programs it is also good to have the [PDL pypi package](https://pypi.org/project/pdlparse/)
12+
13+
## Releases and Updates
14+
15+
This is the one and only release there will ever be of pdl-hl there are no live updates unless I get bored and return to this project for a 'revamp'. The syntax of pdl is made to be simple so this extension is not complicated at all, just simple highlighting however my python package [pdlparse](https://pypi.org/project/pdlparse/) will continue to get updates periodically.
16+
17+
[Python-Data-Library Github](https://github.com/itzCozi/Python-Data-Library)

PDL/pdl-hl/pdl-config.json PDL/Codespace/language-configuration.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
{ "open": "{", "close": "}" },
1313
{ "open": "[", "close": "]" },
1414
{ "open": "(", "close": ")" },
15+
{ "open": "'''", "close": "'''" },
16+
{ "open": "#*", "close": "*#", "notIn": ["string"] },
1517
{ "open": "'", "close": "'", "notIn": ["string"] }
1618
],
1719
"surroundingPairs": [
1820
["{", "}"],
1921
["[", "]"],
2022
["(", ")"],
21-
["\"", "\""],
23+
["#*", "*#"],
2224
["'", "'"]
2325
]
2426
}

PDL/pdl-hl/package.json PDL/Codespace/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"id": "pdl",
1515
"aliases": ["pdl", "pdl"],
1616
"extensions": [".pdl"],
17-
"configuration": "./pdl-config.json"
17+
"configuration": "./language-configuration.json"
1818
}],
1919
"grammars": [{
2020
"language": "pdl",

PDL/Codespace/pdl.tmLanguage.json

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "pdl",
4+
"patterns": [
5+
{
6+
"include": "#keywords"
7+
},
8+
{
9+
"include": "#types"
10+
},
11+
{
12+
"include": "#strings"
13+
},
14+
{
15+
"include": "#array"
16+
},
17+
{
18+
"include": "#constant"
19+
},
20+
{
21+
"include": "#comments"
22+
},
23+
{
24+
"include": "#commentblock"
25+
},
26+
{
27+
"include": "#docblock"
28+
},
29+
{
30+
"include": "#class"
31+
},
32+
{
33+
"include": "#symbols"
34+
}
35+
],
36+
"repository": {
37+
"keywords": {
38+
"patterns": [{
39+
"name": "keyword.class.pdl",
40+
"match": "\\b(class|priv|ext|handle)\\b"
41+
}]
42+
},
43+
"symbols": {
44+
"patterns": [{
45+
"name": "punctuation.symbol.pdl",
46+
"match": "\\b(=|;)\\b"
47+
}]
48+
},
49+
"strings": {
50+
"name": "string.quoted.pdl",
51+
"begin": "'",
52+
"end": "'",
53+
"patterns": [{
54+
"name": "constant.character.escape.pdl",
55+
"match": "\\."
56+
}]
57+
},
58+
"types": {
59+
"match": "\\b(str|int|list)\\b",
60+
"name": "language.types.pdl"
61+
},
62+
"constant": {
63+
"match": "\\b(?:true|false|null)\\b",
64+
"name": "constant.language.pdl"
65+
},
66+
"array": {
67+
"begin": "\\[",
68+
"beginCaptures": {
69+
"0": {
70+
"name": "punctuation.definition.array.begin.pdl"
71+
}
72+
},
73+
"end": "\\]",
74+
"endCaptures": {
75+
"0": {
76+
"name": "punctuation.definition.array.end.pdl"
77+
}
78+
},
79+
"name": "meta.structure.array.pdl",
80+
"patterns": [
81+
{
82+
"match": ",",
83+
"name": "punctuation.separator.array.pdl"
84+
},
85+
{
86+
"match": "[^\\s\\]]",
87+
"name": "invalid.illegal.expected-array-separator.pdl"
88+
}
89+
]
90+
},
91+
"class": {
92+
"begin": "\\{",
93+
"beginCaptures": {
94+
"0": {
95+
"name": "punctuation.definition.class.begin.pdl"
96+
}
97+
},
98+
"end": "\\}",
99+
"endCaptures": {
100+
"0": {
101+
"name": "punctuation.definition.class.end.pdl"
102+
}
103+
}
104+
},
105+
"commentblock": {
106+
"begin": "#*",
107+
"beginCaptures": {
108+
"0": {
109+
"name": "punctuation.definition.blockComment.begin.pdl"
110+
}
111+
},
112+
"end": "*#",
113+
"endCaptures": {
114+
"0": {
115+
"name": "punctuation.definition.blockComment.end.pdl"
116+
}
117+
}
118+
},
119+
"comments": {
120+
"patterns": [{
121+
"name": "punctuation.definition.comments.line.pdl",
122+
"match": "\\b(//|#)\\b"
123+
}]
124+
},
125+
"docblock": {
126+
"begin": "\\'''",
127+
"beginCaptures": {
128+
"0": {
129+
"name": "punctuation.definition.blockcomment.begin.pdl"
130+
}
131+
},
132+
"end": "\\'''",
133+
"endCaptures": {
134+
"0": {
135+
"name": "punctuation.definition.blockcomment.end.pdl"
136+
}
137+
}
138+
}
139+
},
140+
"scopeName": "source.pdl"
141+
}

PDL/Codespace/vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}

PDL/pdl-hl/README.md

-65
This file was deleted.

0 commit comments

Comments
 (0)