Skip to content

Commit aefe26d

Browse files
authored
makes vscode a bit nicer, fewer spurious warnings or errors (#940)
1 parent adcc0dd commit aefe26d

File tree

4 files changed

+266
-11
lines changed

4 files changed

+266
-11
lines changed

.fortls.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"source_dirs": [
3+
"src/",
4+
"src/common/",
5+
"src/simulation/",
6+
"src/pre_process/",
7+
"src/post_process/"
8+
],
9+
"excl_paths": [
10+
"benchmarks/",
11+
"examples/",
12+
"tests/",
13+
"misc/",
14+
"src/pre_process/include/2dHardcodedIC.fpp",
15+
"src/pre_process/include/3dHardcodedIC.fpp",
16+
"src/pre_process/include/ExtrusionHardcodedIC.fpp"
17+
],
18+
"include_dirs": [
19+
"src/common/include/",
20+
"src/simulation/include/",
21+
"src/pre_process/include/",
22+
"src/post_process/include/"
23+
],
24+
"pp_suffixes": [".fpp"],
25+
"pp_defs": {
26+
"MFC": 1,
27+
"MFC_DOUBLE_PRECISION": 1
28+
},
29+
"lowercase_intrinsics": true,
30+
"debug_log": false,
31+
"disable_diagnostics": true,
32+
"use_signature_help": true,
33+
"variable_hover": true,
34+
"hover_signature": true,
35+
"enable_code_actions": true,
36+
"mod_dirs": [
37+
"build/pre_process/",
38+
"build/simulation/",
39+
"build/post_process/",
40+
"build/common/"
41+
],
42+
"ext_mod_dirs": [
43+
"/usr/include/",
44+
"/usr/local/include/",
45+
"/opt/homebrew/include/"
46+
],
47+
"implicit_external_mods": [
48+
"mpi",
49+
"m_thermochem",
50+
"hipfort",
51+
"hipfort_check",
52+
"hipfort_hipfft",
53+
"cutensorex",
54+
"silo_f9x",
55+
"m_model"
56+
],
57+
"disable_diagnostics_for_external_modules": true,
58+
"max_line_length": 132,
59+
"symbol_skip_mem": [
60+
"mpi_*"
61+
],
62+
"disable_var_diagnostics": true,
63+
"disable_fypp": false,
64+
"fypp_strict": false,
65+
"error_suppression_list": [
66+
"include-not-found",
67+
"mod-not-found",
68+
"var-masking",
69+
"declared-twice",
70+
"no-matching-declaration",
71+
"invalid-parent",
72+
"parsing-error",
73+
"fypp-error",
74+
"preprocessor-error",
75+
"syntax-error",
76+
"semantic-error",
77+
"type-error",
78+
"undefined-variable",
79+
"line-too-long"
80+
],
81+
"incremental_sync": false,
82+
"debug_parser": false,
83+
"skip_parse_errors": true,
84+
"disable_parser": [
85+
"src/post_process/m_data_output.fpp",
86+
"src/pre_process/include/ExtrusionHardcodedIC.fpp",
87+
"src/pre_process/m_checker.fpp",
88+
"src/pre_process/include/2dHardcodedIC.fpp",
89+
"src/pre_process/include/3dHardcodedIC.fpp",
90+
"src/simulation/m_qbmm.fpp",
91+
"src/common/m_variables_conversion.fpp",
92+
"src/simulation/m_global_parameters.fpp"
93+
]
94+
}

.fortlsrc

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"source_dirs": [
3+
"src/",
4+
"src/common/",
5+
"src/simulation/",
6+
"src/pre_process/",
7+
"src/post_process/"
8+
],
9+
"excl_paths": [
10+
"benchmarks/",
11+
"examples/",
12+
"tests/",
13+
"misc/",
14+
"src/pre_process/include/2dHardcodedIC.fpp",
15+
"src/pre_process/include/3dHardcodedIC.fpp",
16+
"src/pre_process/include/ExtrusionHardcodedIC.fpp",
17+
"**/m_nvtx*",
18+
"**/syscheck.fpp"
19+
],
20+
"include_dirs": [
21+
"src/common/include/",
22+
"src/simulation/include/",
23+
"src/pre_process/include/",
24+
"src/post_process/include/"
25+
],
26+
"pp_suffixes": [".fpp"],
27+
"pp_defs": {
28+
"MFC": 1,
29+
"MFC_DOUBLE_PRECISION": 1
30+
},
31+
"lowercase_intrinsics": true,
32+
"debug_log": true,
33+
"disable_diagnostics": false,
34+
"use_signature_help": true,
35+
"variable_hover": true,
36+
"hover_signature": true,
37+
"enable_code_actions": true,
38+
"mod_dirs": [
39+
"build/pre_process/",
40+
"build/simulation/",
41+
"build/post_process/",
42+
"build/common/"
43+
],
44+
"ext_mod_dirs": [
45+
"/usr/include/",
46+
"/usr/local/include/",
47+
"/opt/homebrew/include/"
48+
],
49+
"implicit_external_mods": [
50+
"mpi",
51+
"m_thermochem",
52+
"m_variables_conversion",
53+
"hipfort",
54+
"hipfort_check",
55+
"hipfort_hipfft",
56+
"cutensorex",
57+
"silo_f9x",
58+
"m_model"
59+
],
60+
"disable_diagnostics_for_external_modules": true,
61+
"max_line_length": -1,
62+
"max_comment_line_length": -1,
63+
"symbol_skip_mem": [
64+
"mpi_*"
65+
],
66+
"disable_var_diagnostics": false,
67+
"disable_fypp": false,
68+
"fypp_strict": false,
69+
"error_suppression_list": [
70+
"include-not-found",
71+
"mod-not-found",
72+
"module-not-found",
73+
"declared-twice",
74+
"no-matching-declaration",
75+
"invalid-parent",
76+
"parsing-error",
77+
"fypp-error",
78+
"preprocessor-error",
79+
"implicit-type"
80+
],
81+
"incremental_sync": false,
82+
"debug_parser": false,
83+
"skip_parse_errors": true,
84+
"disable_parser": [
85+
"src/post_process/m_data_output.fpp",
86+
"src/pre_process/include/ExtrusionHardcodedIC.fpp",
87+
"src/pre_process/m_checker.fpp",
88+
"src/pre_process/include/2dHardcodedIC.fpp",
89+
"src/pre_process/include/3dHardcodedIC.fpp",
90+
"src/simulation/m_qbmm.fpp",
91+
"src/common/m_variables_conversion.fpp",
92+
"src/simulation/m_global_parameters.fpp",
93+
"**/m_nvtx*",
94+
"**/syscheck.fpp"
95+
]
96+
}

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"recommendations": [
2+
"recommendations": [],
3+
"unwantedRecommendations": [
34
"fortran-lang.linter-gfortran"
45
]
56
}

.vscode/settings.json

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"editor.detectIndentation": false,
33
"editor.insertSpaces": true,
4-
"editor.tabSize": 4,
4+
"editor.tabSize": 2,
55
"editor.rulers": [ 80, 120 ],
66
"files.exclude": {
77
"**/.git": true,
88
"**/.DS_Store": true,
99
"**/build": true,
1010
"**/*.o": true,
1111
"**/*.mod": true,
12+
"**/misc/**": true
1213
},
1314

1415
"cmake.configureOnOpen": false,
@@ -17,15 +18,78 @@
1718

1819
"files.associations": {
1920
"*.f90": "FortranFreeForm",
20-
"*.fpp": "FortranFreeForm",
21+
"*.fpp": "FortranFreeForm"
2122
},
2223

23-
"fortran.preferredCase": "lowercase",
24-
"fortran.linter.includePaths": [
25-
"${workspacefolder}/src/${fileDirname}",
26-
"${workspacefolder}/src/${fileDirname}/include",
27-
"${workspacefolder}/src/common",
28-
"${workspacefolder}/src/common/include"
29-
],
30-
"fortran.linter.extraArgs": ["--free-form"],
24+
// Disable the extension entirely at workspace level
25+
"extensions.ignoreRecommendations": true,
26+
"extensions.autoCheckUpdates": false,
27+
28+
"fortran.preferredCase": "lowercase",
29+
30+
// Disable built-in linter completely but enable fortls
31+
"fortran.disabled": false,
32+
"fortran.linter.enabled": false,
33+
"fortran.linter.gfortran.enabled": false,
34+
"fortran.linter.compiler": "",
35+
"fortran.linter.diagnostics": false,
36+
"fortran.linter.gfortran.diagnostics": false,
37+
"fortran.linter.modOutput": "",
38+
"fortran.linter.includePaths": [],
39+
"fortran.linter.extraArgs": [],
40+
"fortran.provideDiagnostics": false,
41+
"fortran.provideCompletion": false,
42+
"fortran.provideHover": false,
43+
"fortran.provideSymbols": false,
44+
"fortran.validation.enabled": false,
45+
"fortran.validation.diagnostics": false,
46+
"fortran.symbols": false,
47+
"fortran.hover": false,
48+
49+
// Enable ONLY fortls language server
50+
"fortran.enableLanguageServer": true,
51+
"fortran.languageServer": "fortls",
52+
"fortran.fortls.disabled": false,
53+
"fortran.fortls.path": "fortls",
54+
55+
// Try to disable any built-in language features
56+
"editor.semanticHighlighting.enabled": false,
57+
"editor.suggest.showWords": false,
58+
"editor.suggest.showSnippets": false,
59+
60+
"[fortran]": {
61+
"editor.tabSize": 2,
62+
"editor.semanticHighlighting.enabled": false
63+
},
64+
"[fortran-free]": {
65+
"editor.tabSize": 2,
66+
"editor.semanticHighlighting.enabled": false
67+
},
68+
"[FortranFreeForm]": {
69+
"editor.tabSize": 2,
70+
"editor.semanticHighlighting.enabled": false
71+
},
72+
73+
// File exclusions - multiple layers of exclusion
74+
"files.watcherExclude": {
75+
"**/misc/**": true,
76+
"**/benchmarks/**": true,
77+
"**/examples/**": true,
78+
"**/tests/**": true,
79+
"**/build/**": true,
80+
"**/m_nvtx*": true,
81+
"**/syscheck.fpp": true
82+
},
83+
84+
"search.exclude": {
85+
"**/misc/**": true,
86+
"**/benchmarks/**": true,
87+
"**/examples/**": true,
88+
"**/tests/**": true,
89+
"**/build/**": true
90+
},
91+
92+
// Keep problems panel available
93+
"problems.showOn": "toggle",
94+
"problems.defaultViewMode": "list"
3195
}

0 commit comments

Comments
 (0)