Skip to content

Commit 705a918

Browse files
authored
Feature/general improvements (#244)
* Updated CHANGELOG for v2.2.2 * Incremented package version to 2.2.2 * Minor aesthetic improvements to CHANGELOG * Adds OpenACC unit test * Updated tasks and launch files - The file structures have been updated to abide with the latest config syntax - Updated build commands in package.json - Deleted tasks.json.old * Fixes Remove unused packages #243 Regenerated npm and yarn .json files * Updated README badges * Updated workflows to run on Ubuntu latest * Fix overzealous OpenMP regex. The OpenMP regex did not allow for the OpenACC syntax scope to trigger. This has now been fixed and both should be displayed correctly. The only outstanding problem is that the unittest (.snap) does not trigger the right scopes, which means open acc/openmp are not tested thoroughly. I look into it * Updating changelog.md * New minor release * Housekeeping Changes all fortls instances with global variable and makes pip install user based with upgrade. * Added info to package.json * Fixes in-house documentaiton hover Fixes #250 * Now the deocumentation displays correctly Having preceding characters to ``` caused a problem in the hover result * Formatting .json doc files with prettier * Updated README.md * Adds VS marketplace automated release Fixes Setting up VSCE releases from GitHub releases #237 * Further improvements to the hover documentation * further fixes for internal documentation * Adds autoclosing for strings * Updates Fortran extensino and adds .pFUnit support Fixes #185. * Updates CHANGELOG.md * Fixes preprocessor syntax highlighting The line continuation operator is a bit too aggressive so instead of adding lookaheads for every case where we don't need to apply it we have excluded the preprocessor directives from the lint cont. The original .cson highlighting does the same, see: https://github.com/dparkins/language-fortran/blob/master/grammars/fortran%20-%20free%20form.cson for injections see: https://gist.github.com/Aerijo/b8c82d647db783187804e86fa0a604a1 Fixes Preprocessor statements in line continuations break syntax highlighting #248 Fixes Erroneous syntax highlighting for preprocessor conditionals in derived types #249 * Preprocessor assignment i.e. = is not a thing The regex was doing a negative look ahead and lookbehind for = but using = is illegal code and will not compile. e.g. #define VAR = 1 Also I went ahead and changed the patterns #define can match to be both string literals and numerical values #define VAR 1 is legal. * Preprocessor operator fixes - Adds support for all Fortran supported logical preprocessor operators - Adds support for arithmetic operators - Adds support for C++ preprocessor integers - Changes the syntax highlighting of preprocessor commands to use the `meta` scope which should result in consistent coloring between C++ and Fortran. A few things are not supported like macro function argument highlighting but I do not believe it is important for now * Fixes Erroneous syntax highlighting, when argument is called "function" or "procedure" #207 I have used non-fixed width ngative lookbehinds which should not be permitted in traditional Oniguruma regex. VSCode's implementation of the regex engine does not seem to care hence the solution * Adds unittest for #207 and updates CHANGELOG * Adds syntax highlighting support for fypp also extends the support for pfunit. Not sure if .pf and .fpp are considered to be fixed-form by default I don't think that is the case but fypp and pfunit use them so we default them to free-form * Add MIT license badge back to README * Adds names specific to individual scopes This is meant to make debugging syntax highlighting bugs easier to trace The unittests are also updated to contain the new scope names. * Fixes Erroneous syntax highlighting of if construct with tags #204 Labels were only captured at the start and end of a statement. Now we are also capturing them in between for if conditionals. The edits in the end in "named-control-constructs" are meant to correctly handle whitespaces which before they were placed as part of the group returned to the invalid.error.xxx A unittest has been added testing the conditionals with/out labels. * Updated CHANGELOG.md * Fixes STOP named_string #172 `stop` can now handle labels * Comments are correctly highlighted for type,... Fixes Erroneous syntax highlighting with type,abstract :: var #262 A unittest has been added and the CHANGELOG has been updated. * Add syntax test for fixed form fortran * Switches to @types/vscode & @vscode/test-electron Also updates the tests to use strictEqual Adds production, test and dev tscofig compilation Fixes Migrate from vscode module #263 * Updated changelog * Updated yarn.lock * Increments version to 2.4.0 Release a tag after token is uploaded * Updated tasks.json and launch.json External extensions are enabled since we need the C++ extension for VSCode to launch without throwing an error. The tasks.json has been updated to call directly scripts from package. * Updated names of scopes to contain fortran * Fixes normal labeled construct end statements * Adds error highlighting for else labeled * Upgraded package.json grammar update
1 parent 0b60211 commit 705a918

File tree

325 files changed

+7214
-8763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+7214
-8763
lines changed

Diff for: .github/workflows/main.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
name: Build and Test syntax
12
on: [push]
23
jobs:
34
grammar:
4-
runs-on: ubuntu-20.04
5+
runs-on: ubuntu-latest
56
strategy:
67
matrix:
78
node-version: [12.x]

Diff for: .github/workflows/publish.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
tags:
4+
- '*'
5+
6+
name: Deploy Extension
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- run: npm ci
16+
# - name: Publish to Open VSX Registry
17+
# uses: HaaLeo/publish-vscode-extension@v0
18+
# with:
19+
# pat: ${{ secrets.OPEN_VSX_TOKEN }}
20+
- name: Publish to Visual Studio Marketplace
21+
uses: HaaLeo/publish-vscode-extension@v0
22+
with:
23+
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
24+
registryUrl: https://marketplace.visualstudio.com

Diff for: .vscode/launch.json

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,34 @@
1-
// A launch configuration that compiles the extension and then opens it inside a new window
21
{
3-
"version": "0.1.0",
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+
"version": "0.2.0",
46
"configurations": [
57
{
68
"name": "Launch Extension",
79
"type": "extensionHost",
810
"request": "launch",
9-
"runtimeExecutable": "${execPath}",
1011
"args": [
1112
"--extensionDevelopmentPath=${workspaceFolder}"
1213
],
13-
"stopOnEntry": false,
14-
"sourceMaps": true,
1514
"outFiles": [
1615
"${workspaceFolder}/out/src/**/*.js"
1716
],
18-
"preLaunchTask": "npm"
17+
"preLaunchTask": "npm: watch-dev",
1918
},
2019
{
2120
"name": "Launch Tests",
2221
"type": "extensionHost",
2322
"request": "launch",
2423
"runtimeExecutable": "${execPath}",
25-
"env": {
26-
"CODE_TESTS_WORKSPACE": "./"
27-
},
2824
"args": [
29-
"test/resources/sample.f90",
30-
"--disable-extensions",
3125
"--extensionDevelopmentPath=${workspaceFolder}",
3226
"--extensionTestsPath=${workspaceFolder}/out/test"
3327
],
34-
"stopOnEntry": false,
35-
"sourceMaps": true,
3628
"outFiles": [
3729
"${workspaceFolder}/out/test/**/*.js"
38-
]
39-
}
30+
],
31+
"preLaunchTask": "npm: pretest setup",
32+
},
4033
]
4134
}

Diff for: .vscode/tasks.json

+39-31
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,48 @@
1-
// Available variables which can be used inside of strings.
2-
// ${workspaceRoot}: the root folder of the team
3-
// ${file}: the current opened file
4-
// ${fileBasename}: the current opened file's basename
5-
// ${fileDirname}: the current opened file's dirname
6-
// ${fileExtname}: the current opened file's extension
7-
// ${cwd}: the current working directory of the spawned process
8-
9-
// A task runner that calls a custom npm script that compiles the extension.
101
{
112
"version": "2.0.0",
12-
13-
// we want to run npm
14-
"command": "npm",
15-
16-
// we run the custom script "compile" as defined in package.json
17-
"args": ["run", "compile", "--loglevel", "silent"],
18-
19-
// The tsc compiler is started in watching mode
20-
"isBackground": true,
21-
22-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
23-
"problemMatcher": "$tsc-watch",
243
"tasks": [
254
{
26-
"label": "npm",
27-
"type": "shell",
28-
"command": "npm",
29-
"args": [
30-
"run",
31-
"compile",
32-
"--loglevel",
33-
"silent"
34-
],
5+
"label": "npm: watch-dev",
6+
"type": "npm",
7+
"script": "watch-dev",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
3512
"isBackground": true,
3613
"problemMatcher": "$tsc-watch",
37-
"group": "build"
14+
"detail": "tsc -watch -p tsconfig.json"
15+
},
16+
{
17+
"label": "npm: compile-dev",
18+
"type": "npm",
19+
"script": "compile-dev",
20+
"group": "build",
21+
"problemMatcher": "$tsc",
22+
"detail": "tsc -p tsconfig.json"
23+
},
24+
{
25+
"label": "npm: pretest",
26+
"type": "npm",
27+
"script": "pretest",
28+
"group": "test",
29+
"problemMatcher": "$tsc",
30+
"detail": "tsc -p tsconfig.test.json"
31+
},
32+
{
33+
"label": "npm: pretest setup",
34+
"type": "shell",
35+
"dependsOn": [
36+
"npm: compile-dev",
37+
"npm: pretest"
38+
],
39+
"dependsOrder": "sequence",
40+
"group": {
41+
"kind": "test",
42+
"isDefault": true
43+
},
44+
"detail": "setup for test launch"
45+
3846
}
3947
]
4048
}

Diff for: .vscode/tasks.json.old

-30
This file was deleted.

Diff for: CHANGELOG.md

+76-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,43 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [2.4.0]
11+
12+
### Changed
13+
14+
- Changes the syntax highlighting of preprocessor macros to match that of C++
15+
- Changes npm `vscode` module to `@types/vscode` and `@vscode/test-electron`
16+
([#263](https://github.com/krvajal/vscode-fortran-support/issues/263))
17+
18+
### Fixed
19+
20+
- Fixes OpenACC syntax highlighting not triggering
21+
- Fixes internal hover documentation display
22+
([#205](https://github.com/krvajal/vscode-fortran-support/issues/205))
23+
- Fixes preprocessor syntax highlighting with line continuations
24+
([#248](https://github.com/krvajal/vscode-fortran-support/issues/248))
25+
- Fixes preprocessor syntax highlighting with derived type and conditionals
26+
([#249](https://github.com/krvajal/vscode-fortran-support/issues/249))
27+
- Fixes the general preprocessor syntax highlighting and adds testing
28+
- Fixes using function/subroutine as parameter in functions/subroutines
29+
([#207](https://github.com/krvajal/vscode-fortran-support/issues/207))
30+
- Fixes labelled conditionals erroneous highlighting
31+
([#204](https://github.com/krvajal/vscode-fortran-support/issues/204))
32+
- Fixes labelled conditionals erroneous highlighting when followed by whitespace
33+
([#205](https://github.com/krvajal/vscode-fortran-support/issues/205))
34+
- Fixes labelled `stop` conditions
35+
([#172](https://github.com/krvajal/vscode-fortran-support/issues/172))
36+
- Fixes incorrect comment capture for type, abstract|extends types
37+
([#262](https://github.com/krvajal/vscode-fortran-support/issues/262))
38+
1039
### Added
1140

1241
- Adds support for .f18 and .F18 file extensions
1342
([#252](https://github.com/krvajal/vscode-fortran-support/pull/252))
43+
- Adds workflow for automatic publishing to VS Marketplace
44+
([#237](https://github.com/krvajal/vscode-fortran-support/issues/237))
45+
- Adds basic support for pFUnit (.pf) highlighting
46+
([#185](https://github.com/krvajal/vscode-fortran-support/issues/185))
1447

1548
## [2.3.0]
1649

@@ -28,7 +61,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2861
### Added
2962

3063
- Added syntax highlight support for OpenACC
31-
([224](https://github.com/krvajal/vscode-fortran-support/pull/224))
64+
([#224](https://github.com/krvajal/vscode-fortran-support/pull/224))
65+
66+
## [2.2.2] - 2020-12-11
67+
68+
### Fixed
69+
70+
- Fixed fixed-form tab character at start syntax highlighting
71+
([#191](https://github.com/krvajal/vscode-fortran-support/pull/191))
72+
- Fixed `class` paranthesis erroneous syntax highlighting
73+
([#196](https://github.com/krvajal/vscode-fortran-support/issues/196))
74+
- Fixed multiline block interface syntax highlighting
75+
([#202](https://github.com/krvajal/vscode-fortran-support/issues/202))
76+
77+
### Changed
78+
79+
- Updated `package.json`
80+
([#192](https://github.com/krvajal/vscode-fortran-support/pull/192))
81+
- Rewrote solution for `select` in variable name
82+
([#203](https://github.com/krvajal/vscode-fortran-support/pull/203))
3283

3384
## [2.2.1] - 2020-04-11
3485

@@ -92,7 +143,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
92143
### Changed
93144

94145
- Changed default configuration of LanguageServer to `false`
95-
- Update vscode minimal engine
146+
- Update vscode minimal engine
96147

97148
## [2.0.0] - 2018-10-14
98149

@@ -212,10 +263,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
212263
### Added
213264

214265
- Show docs for intrinsic functions on hover
215-
### Changed
266+
267+
### Changed
268+
216269
- Updated icon for the extension
217270
- Fix bug on linter not working
218271

219-
## [Unreleased]
272+
## [0.1.0]
220273

221274
- Initial release
275+
276+
[unreleased]: https://github.com/krvajal/vscode-fortran-support/compare/v2.4.0...HEAD
277+
[2.4.0]: https://github.com/krvajal/vscode-fortran-support/compare/v2.3.0...v2.4.0
278+
[2.3.0]: https://github.com/krvajal/vscode-fortran-support/compare/v2.2.2...v2.3.0
279+
[2.2.2]: https://github.com/krvajal/vscode-fortran-support/compare/2.2.1...v2.2.1
280+
[2.2.1]: https://github.com/krvajal/vscode-fortran-support/compare/2.2.0...v2.2.1
281+
[2.2.0]: https://github.com/krvajal/vscode-fortran-support/compare/2.1.0...v2.2.0
282+
[2.1.0]: https://github.com/krvajal/vscode-fortran-support/compare/2.0.2...2.1.0
283+
[2.0.2]: https://github.com/krvajal/vscode-fortran-support/compare/2.0.0...2.0.2
284+
[2.0.0]: https://github.com/krvajal/vscode-fortran-support/compare/v1.3.0...v2.0.0
285+
[1.3.0]: https://github.com/krvajal/vscode-fortran-support/compare/v1.2.0...v1.3.0
286+
[1.2.0]: https://github.com/krvajal/vscode-fortran-support/compare/v1.1.0...v1.2.0
287+
[1.1.0]: https://github.com/krvajal/vscode-fortran-support/compare/v1.0.0...v1.1.0
288+
[1.0.0]: https://github.com/krvajal/vscode-fortran-support/compare/v0.6.3...v1.0.0
289+
[0.6.3]: https://github.com/krvajal/vscode-fortran-support/compare/v0.6.1...v0.6.3
290+
[0.6.1]: https://github.com/krvajal/vscode-fortran-support/compare/v0.6.0...v0.6.1
291+
[0.6.0]: https://github.com/krvajal/vscode-fortran-support/compare/v0.4.5...v0.6.0
292+
[0.4.5]: https://github.com/krvajal/vscode-fortran-support/compare/v0.4.4...v0.4.5
293+
[0.4.4]: https://github.com/krvajal/vscode-fortran-support/compare/tag/v0.4.4

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Modern Fortran language support for VSCode
22

3-
[![Build Status](https://travis-ci.org/krvajal/vscode-fortran-support.svg?branch=master)](https://travis-ci.org/krvajal/vscode-fortran-support)
4-
[![codecov](https://codecov.io/gh/krvajal/vscode-fortran-support/branch/master/graph/badge.svg)](https://codecov.io/gh/krvajal/vscode-fortran-support)
5-
[![MIT License](https://img.shields.io/npm/l/stack-overflow-copy-paste.svg?style=flat-square)](http://opensource.org/licenses/MIT)
3+
[![GitHub Actions](https://github.com/krvajal/vscode-fortran-support/actions/workflows/main.yaml/badge.svg)](https://github.com/krvajal/vscode-fortran-support/actions)
4+
[![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/krvajalm.linter-gfortran.svg)](https://marketplace.visualstudio.com/items?itemName=krvajalm.linter-gfortran)
65
[![Installs](https://vsmarketplacebadge.apphb.com/installs/krvajalm.linter-gfortran.svg)](https://marketplace.visualstudio.com/items?itemName=krvajalm.linter-gfortran)
7-
[![GitHub release](https://img.shields.io/github/release/krvajal/vscode-fortran-support.svg)](https://GitHub.com/krvajal/vscode-fortran-support/releases/)
6+
[![VS Marketplace](https://vsmarketplacebadge.apphb.com/version-short/krvajalm.linter-gfortran.svg)](https://marketplace.visualstudio.com/items?itemName=krvajalm.linter-gfortran)
7+
[![MIT License](https://img.shields.io/npm/l/stack-overflow-copy-paste.svg?)](http://opensource.org/licenses/MIT)
88

99
> This extension provides support for the Fortran programming language. It includes syntax highlighting, debugging, code snippets and a linting based on `gfortran`. You can download the Visual Studio Code editor from [here](https://code.visualstudio.com/download).
1010

Diff for: language-configuration.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,23 @@
2828
{
2929
"open": "(/",
3030
"close": "/"
31-
}
31+
},
32+
{
33+
"open": "'",
34+
"close": "'",
35+
"notIn": [
36+
"string",
37+
"comment"
38+
]
39+
},
40+
{
41+
"open": "\"",
42+
"close": "\"",
43+
"notIn": [
44+
"string",
45+
"comment"
46+
]
47+
},
3248
],
3349
"surroundingPairs": [
3450
[

0 commit comments

Comments
 (0)