Skip to content

Commit e059403

Browse files
authored
Merge pull request #746 from fortran-lang/feat/fortls-schema
feat: added fortls schema
2 parents 344e347 + 542e98b commit e059403

File tree

3 files changed

+199
-0
lines changed

3 files changed

+199
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12+
- Added schema support for fortls configuration files with autocopmletions
13+
([#745](https://github.com/fortran-lang/vscode-fortran-support/issues/745))
1214
- Added Nightly Release Channel for the extension that triggers every day at 00:00 UTC.
1315
- Added new settings for disabling Linter initialization and display of initialization Diagnostics
1416
`fortran.linter.initialize` and `fortran.experimental.keepInitDiagnostics`

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@
118118
}
119119
}
120120
],
121+
"jsonValidation": [
122+
{
123+
"fileMatch": [
124+
".fortlsrc",
125+
".fortls.json",
126+
".fortls"
127+
],
128+
"url": "./schemas/fortls.schema.json"
129+
}
130+
],
121131
"tomlValidation": [
122132
{
123133
"fileMatch": "fpm.toml",

schemas/fortls.schema.json

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
{
2+
"title": "MainModel",
3+
"description": "Schema for the fortls Fortran Language Server version: 2.13.1.dev55+g8dedddc",
4+
"type": "object",
5+
"properties": {
6+
"config": {
7+
"title": "Config",
8+
"description": "Configuration options file (default file name: .fortlsrc, other default supported names: .fortls.json, .fortls)",
9+
"default": ".fortlsrc",
10+
"type": "string"
11+
},
12+
"nthreads": {
13+
"title": "Nthreads",
14+
"description": "Number of threads to use during workspace initialization (default: 4)",
15+
"default": 4,
16+
"type": "integer"
17+
},
18+
"notify_init": {
19+
"title": "Notify Init",
20+
"description": "Send notification message when workspace initialization is complete",
21+
"default": false,
22+
"type": "boolean"
23+
},
24+
"incremental_sync": {
25+
"title": "Incremental Sync",
26+
"description": "Use incremental document synchronization (beta)",
27+
"default": false,
28+
"type": "boolean"
29+
},
30+
"sort_keywords": {
31+
"title": "Sort Keywords",
32+
"description": "Display variable keywords information, function/subroutine definitions, etc. in a consistent (sorted) manner default: no sorting, display code as is)",
33+
"default": false,
34+
"type": "boolean"
35+
},
36+
"disable_autoupdate": {
37+
"title": "Disable Autoupdate",
38+
"description": "fortls automatically checks PyPi for newer version and installs them.Use this option to disable the autoupdate feature.",
39+
"default": false,
40+
"type": "boolean"
41+
},
42+
"preserve_keyword_order": {
43+
"title": "Preserve Keyword Order",
44+
"description": "DEPRECATED, this is now the default. To sort use sort_keywords",
45+
"default": false,
46+
"type": "boolean"
47+
},
48+
"debug_log": {
49+
"title": "Debug Log",
50+
"description": "Generate debug log in project root folder",
51+
"default": false,
52+
"type": "boolean"
53+
},
54+
"source_dirs": {
55+
"title": "Source Dirs",
56+
"description": "Folders containing source files (default: set())",
57+
"default": [],
58+
"type": "array",
59+
"items": {},
60+
"uniqueItems": true
61+
},
62+
"incl_suffixes": {
63+
"title": "Incl Suffixes",
64+
"description": "Consider additional file extensions to the default (default: F,F77,F90,F95,F03,F08,FOR,FPP (lower & upper casing))",
65+
"default": [],
66+
"type": "array",
67+
"items": {},
68+
"uniqueItems": true
69+
},
70+
"excl_suffixes": {
71+
"title": "Excl Suffixes",
72+
"description": "Source file extensions to be excluded (default: set())",
73+
"default": [],
74+
"type": "array",
75+
"items": {},
76+
"uniqueItems": true
77+
},
78+
"excl_paths": {
79+
"title": "Excl Paths",
80+
"description": "Folders to exclude from parsing",
81+
"default": [],
82+
"type": "array",
83+
"items": {},
84+
"uniqueItems": true
85+
},
86+
"autocomplete_no_prefix": {
87+
"title": "Autocomplete No Prefix",
88+
"description": "Do not filter autocomplete results by variable prefix",
89+
"default": false,
90+
"type": "boolean"
91+
},
92+
"autocomplete_no_snippets": {
93+
"title": "Autocomplete No Snippets",
94+
"description": "Do not use snippets with place holders in autocomplete results",
95+
"default": false,
96+
"type": "boolean"
97+
},
98+
"autocomplete_name_only": {
99+
"title": "Autocomplete Name Only",
100+
"description": "Complete only the name of procedures and not the parameters",
101+
"default": false,
102+
"type": "boolean"
103+
},
104+
"lowercase_intrinsics": {
105+
"title": "Lowercase Intrinsics",
106+
"description": "Use lowercase for intrinsics and keywords in autocomplete requests",
107+
"default": false,
108+
"type": "boolean"
109+
},
110+
"use_signature_help": {
111+
"title": "Use Signature Help",
112+
"description": "Use signature help instead of subroutine/function snippets. This effectively sets --autocomplete_no_snippets",
113+
"default": false,
114+
"type": "boolean"
115+
},
116+
"variable_hover": {
117+
"title": "Variable Hover",
118+
"description": "DEPRECATED: This option is always on. Show hover information for variables",
119+
"default": false,
120+
"type": "boolean"
121+
},
122+
"hover_signature": {
123+
"title": "Hover Signature",
124+
"description": "Show signature information in hover for arguments ",
125+
"default": false,
126+
"type": "boolean"
127+
},
128+
"hover_language": {
129+
"title": "Hover Language",
130+
"description": "Language used for responses to hover requests a VSCode language id (default: fortran90)",
131+
"default": "fortran90",
132+
"type": "string"
133+
},
134+
"max_line_length": {
135+
"title": "Max Line Length",
136+
"description": "Maximum line length (default: -1)",
137+
"default": -1,
138+
"type": "integer"
139+
},
140+
"max_comment_line_length": {
141+
"title": "Max Comment Line Length",
142+
"description": "Maximum comment line length (default: -1)",
143+
"default": -1,
144+
"type": "integer"
145+
},
146+
"disable_diagnostics": {
147+
"title": "Disable Diagnostics",
148+
"description": "Disable diagnostics",
149+
"default": false,
150+
"type": "boolean"
151+
},
152+
"pp_suffixes": {
153+
"title": "Pp Suffixes",
154+
"description": "File extensions to be parsed ONLY for preprocessor commands (default: all uppercase source file suffixes)",
155+
"default": [],
156+
"type": "array",
157+
"items": {},
158+
"uniqueItems": true
159+
},
160+
"include_dirs": {
161+
"title": "Include Dirs",
162+
"description": "Folders containing preprocessor files with extensions PP_SUFFIXES.",
163+
"default": [],
164+
"type": "array",
165+
"items": {},
166+
"uniqueItems": true
167+
},
168+
"pp_defs": {
169+
"title": "Pp Defs",
170+
"description": "A dictionary with additional preprocessor definitions. Preprocessor definitions are normally included via INCLUDE_DIRS",
171+
"default": {},
172+
"type": "object"
173+
},
174+
"symbol_skip_mem": {
175+
"title": "Symbol Skip Mem",
176+
"description": "Do not include type members in document symbol results",
177+
"default": false,
178+
"type": "boolean"
179+
},
180+
"enable_code_actions": {
181+
"title": "Enable Code Actions",
182+
"description": "Enable experimental code actions (default: false)",
183+
"default": false,
184+
"type": "boolean"
185+
}
186+
}
187+
}

0 commit comments

Comments
 (0)