Skip to content

Commit

Permalink
docs: Fix vscode instructions (MODFLOW-USGS#962)
Browse files Browse the repository at this point in the history
* docs: Fix vscode instructions

Fixes MODFLOW-USGS#959

* docs: Improve instructions

* Update .vscode/README.md

Co-authored-by: langevin-usgs <langevin@usgs.gov>

Co-authored-by: langevin-usgs <langevin@usgs.gov>
  • Loading branch information
Hofer-Julian and langevin-usgs committed Jul 15, 2022
1 parent d39887c commit f381154
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 36 deletions.
29 changes: 9 additions & 20 deletions .vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ Install the following VSCode extensions:

- Modern Fortran:
https://marketplace.visualstudio.com/items?itemName=krvajalm.linter-gfortran
- FORTRAN IntelliSense: https://marketplace.visualstudio.com/items?itemName=hansec.fortran-ls
- C/C++: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
- Fortran Breakpoint Support:
https://marketplace.visualstudio.com/items?itemName=ekibun.fortranbreaker

Now, configure the VSCode files for the modflow6 directory. Open the `modflow6`
directory in VSCode. Copy `.vscode/settings_template.json` to (untracked) `.vscode/settings.json` and make sure that in the copy, the following setting points toward your Python executable.
Now, configure the VSCode files for the modflow6 directory.
Open the `modflow6` directory in VSCode.
Make sure that the setting "python.defaultInterpreterPath" points toward your Python executable.

```json
{
Expand All @@ -48,7 +45,7 @@ In order to compile run:
1. Install the fortran language server via:

```bash
pip install -U fortran-language-server
pip install -U fortls
```

2. Find out where the executable is
Expand All @@ -57,22 +54,14 @@ pip install -U fortran-language-server
- cmd: `where fortls`
- PowerShell: `Get-Command fortls`

3. Add this to `.vscode/settings.json`. In case this file does not exist yet, create a new one. Also remember to adapt `fortran-ls.executablePath` to the path you get in the step before.
3. Add the setting "fortran.fortls.path" to `.vscode/settings.json` and set its value to the result of step 2.
In case this file does not exist yet, create a new one.


```json
"fortran-ls.executablePath": "/path/to/fortls",
"fortran-ls.hoverSignature": true,
"fortran-ls.lowercaseIntrinsics": true,
"fortran-ls.notifyInit": true,
"fortran-ls.variableHover": true,
"fortran.linterEnabled": false,
"fortran.provideHover": false,
"fortran.provideCompletion": false,
"fortran.provideSymbols": false,
"[FortranFreeForm]": {
"editor.acceptSuggestionOnEnter": "off",
},
{
"fortran.fortls.path": "/path/to/fortls"
}
```


Expand Down
16 changes: 0 additions & 16 deletions .vscode/settings_template.json

This file was deleted.

0 comments on commit f381154

Please sign in to comment.