Skip to content

Commit 81d06ff

Browse files
authored
Add sublime-package.json to support LSP (#424)
This commit adds required metadata to drive LSP-json's code intelligence for PackageDev related settings. Note: Schemas for other ST related resources are already provided by LSP-json.
1 parent e44f40b commit 81d06ff

1 file changed

Lines changed: 138 additions & 0 deletions

File tree

sublime-package.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"contributions": {
3+
"settings": [
4+
{
5+
"file_patterns": [
6+
"PackageDev.sublime-settings"
7+
],
8+
"schema": {
9+
"additionalProperties": false,
10+
"properties": {
11+
"log_level": {
12+
"type": "string",
13+
"enum": ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"],
14+
"default": "WARNING",
15+
"markdownDescription": "Define the minimum log level used for logging output on the console."
16+
},
17+
"settings.auto_complete": {
18+
"type": "boolean",
19+
"default": true,
20+
"markdownDescription": "Auto complete keys and values in Sublime Settings."
21+
},
22+
"settings.exclude_color_scheme_patterns": {
23+
"type": "array",
24+
"default": [
25+
"/Color Scheme - Legacy",
26+
"/InactivePanes",
27+
"/User/GitSavvy",
28+
"/User/SFTP",
29+
"/User/SublimeLinter",
30+
"/User/Terminus"
31+
],
32+
"markdownDescription": "List of patterns for color schemes not to be displayed in completions. Each color scheme containing one of the list's strings is hidden."
33+
},
34+
"settings.exclude_syntax_patterns": {
35+
"type": "array",
36+
"default": [
37+
"*.tmLanguage",
38+
"Packages/zzz A File Icon zzz/*"
39+
],
40+
"markdownDescription": "List of patterns for syntax definitions that will not be offered in completions. The syntaxes resource paths are fnmatch'ed (`*` matches everything, including slashes) against these patterns."
41+
},
42+
"settings.exclude_theme_patterns": {
43+
"type": "array",
44+
"default": [],
45+
"markdownDescription": "List of patterns for themes not to be displayed in completions. Each theme containing one of the list's strings is hidden."
46+
},
47+
"settings.highlight_scope": {
48+
"type": "string",
49+
"default": "markup.warning.unknown-key.sublime-settings",
50+
"markdownDescription": "Scope for highlighting unknown settings keys."
51+
},
52+
"settings.highlight_styles": {
53+
"type": "array",
54+
"default": ["DRAW_SOLID_UNDERLINE", "DRAW_NO_FILL", "DRAW_NO_OUTLINE"],
55+
"items": {
56+
"type": "string",
57+
"enum": ["DRAW_EMPTY", "HIDE_ON_MINIMAP", "DRAW_EMPTY_AS_OVERWRITE", "DRAW_NO_FILL", "DRAW_NO_OUTLINE", "DRAW_SOLID_UNDERLINE", "DRAW_STIPPLED_UNDERLINE", "DRAW_SQUIGGLY_UNDERLINE", "HIDDEN", "PERSISTENT"],
58+
},
59+
"markdownDescription": "What add_region styles to use for highlighting of unknown settings keys."
60+
},
61+
"settings.linting": {
62+
"type": "boolean",
63+
"default": true,
64+
"markdownDescription": "Underline unknown keys in Sublime Settings."
65+
},
66+
"settings.show_quick_edit_icon": {
67+
"type": "boolean",
68+
"default": true,
69+
"markdownDescription": "Whether to show the edit settings pencil icon. Close & reopen the settings file for this to take effect."
70+
},
71+
"settings.tooltip": {
72+
"type": "boolean",
73+
"default": true,
74+
"markdownDescription": "Show tooltip with setting description on hovering keys and values."
75+
},
76+
"syntax.captures_highlight_scope": {
77+
"type": "string",
78+
"default": "markup.info.capture.sublime-syntax",
79+
"markdownDescription": "Scope for highlighting capture group for the current scope line."
80+
},
81+
"syntax.captures_highlight_styles": {
82+
"type": "array",
83+
"default": ["DRAW_NO_FILL"],
84+
"items": {
85+
"type": "string",
86+
"enum": ["DRAW_EMPTY", "HIDE_ON_MINIMAP", "DRAW_EMPTY_AS_OVERWRITE", "DRAW_NO_FILL", "DRAW_NO_OUTLINE", "DRAW_SOLID_UNDERLINE", "DRAW_STIPPLED_UNDERLINE", "DRAW_SQUIGGLY_UNDERLINE", "HIDDEN", "PERSISTENT"],
87+
},
88+
"markdownDescription": "What add_region styles to use for highlighting of the capture group."
89+
},
90+
"syntax_test.highlight_scope": {
91+
"type": "string",
92+
"default": "markup.info.test.sublime-syntax",
93+
"markdownDescription": "Scope for highlighting the line/positions being tested."
94+
},
95+
"syntax_test.highlight_styles": {
96+
"type": "array",
97+
"default": ["DRAW_NO_FILL"],
98+
"items": {
99+
"type": "string",
100+
"enum": ["DRAW_EMPTY", "HIDE_ON_MINIMAP", "DRAW_EMPTY_AS_OVERWRITE", "DRAW_NO_FILL", "DRAW_NO_OUTLINE", "DRAW_SOLID_UNDERLINE", "DRAW_STIPPLED_UNDERLINE", "DRAW_SQUIGGLY_UNDERLINE", "HIDDEN", "PERSISTENT"],
101+
},
102+
"markdownDescription": "What add_region styles to use for highlighting of the line/positions being tested."
103+
},
104+
"syntax_test.skip_whitespace": {
105+
"type": "boolean",
106+
"default": true,
107+
"markdownDescription": "Whether to skip whitespace after the previous line's test assertions when pressing the Tab key on a new syntax test line"
108+
},
109+
"syntax_test.suggest_scope_suffix": {
110+
"type": "boolean",
111+
"default": true,
112+
"markdownDescription": "Whether or not to keep the scope suffix in the suggested test scopes i.e. if the base scope is text.html.markdown then suggest meta.example.markdown (true) vs meta.example (false)."
113+
},
114+
"syntax_test.suggest_asserted_prefix": {
115+
"type": "boolean",
116+
"default": false,
117+
"markdownDescription": "Whether to trim leading scopes from suggestions that are already part of previous assertions."
118+
}
119+
}
120+
}
121+
},
122+
{
123+
"file_patterns": [
124+
"Preferences.sublime-settings"
125+
],
126+
"schema": {
127+
"properties": {
128+
"packagedev.syntax.input_helpers": {
129+
"type": "boolean",
130+
"default": false,
131+
"markdownDescription": "Enable input helpers for syntax definitions.\n\nInput helpers automatically insert whitespace after a `-` or `:`."
132+
}
133+
}
134+
}
135+
}
136+
]
137+
}
138+
}

0 commit comments

Comments
 (0)