Skip to content

Commit 489efab

Browse files
committed
Update readme
1 parent f3bc1e3 commit 489efab

File tree

7 files changed

+831
-63
lines changed

7 files changed

+831
-63
lines changed

README.md

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,16 @@ This is the README for your extension "fortran-linter". After writing up a brief
44

55
## Features
66

7-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
7+
Provides linting capabilities to Fortran language in Visual Studio Code
88

9-
For example if there is an image subfolder under your extension project workspace:
10-
11-
\!\[feature X\]\(images/feature-x.png\)
12-
13-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
9+
Features:
10+
* Syntax highlighting
11+
* Code Snippets
12+
* gfrontran linting
1413

1514
## Requirements
1615

1716
gfortran on your path, or wherever you configure it to be.
1817

19-
## Extension Settings
20-
21-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22-
23-
For example:
24-
25-
This extension contributes the following settings:
26-
27-
* `myExtension.enable`: enable/disable this extension
28-
* `myExtension.thing`: set to `blah` to do something
29-
30-
## Known Issues
31-
32-
Calling out known issues can help limit users opening duplicate issues against your extension.
33-
34-
## Release Notes
35-
36-
Users appreciate release notes as you update your extension.
37-
38-
### 1.0.0
39-
40-
Initial release of ...
41-
42-
### 1.0.1
43-
44-
Fixed issue #.
45-
46-
### 1.1.0
47-
48-
Added features X, Y, and Z.
49-
50-
-----------------------------------------------------------------------------------------------------------
51-
52-
## Working with Markdown
53-
54-
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55-
56-
* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux)
57-
* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux)
58-
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets
59-
60-
### For more information
61-
62-
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63-
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
6418

6519
**Enjoy!**

language-configuration.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"comments": {
3+
"lineComment": "!"
4+
},
5+
"brackets": [
6+
["[", "]"],
7+
["(", ")"],
8+
["(/", "/)"]
9+
],
10+
"autoClosingPairs": [
11+
{ "open": "[", "close": "]" },
12+
{ "open": "(", "close": ")" },
13+
{ "open": "(/", "close": "/)" }
14+
],
15+
"surroundingPairs": [
16+
["[", "]"],
17+
["(", ")"],
18+
["'", "'"],
19+
["\"", "\""]
20+
]
21+
}

package.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,33 @@
77
"engines": {
88
"vscode": "^1.12.0"
99
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/krvajalmiguelangel/vscode-fortran-support.git"
13+
},
1014
"categories": [
11-
"Other"
12-
],
15+
"Languages",
16+
"Snippets"
17+
],
1318
"activationEvents": [
14-
"onLanguage:Fortran"
19+
"onLanguage:fortran90"
1520
],
1621
"main": "./out/src/extension",
1722
"contributes": {
1823
"languages": [{
19-
"id": "Fortran",
20-
"aliases": ["Fortran", "fortran"],
21-
"extensions": [".f90"]
22-
}]
24+
"id": "fortran90",
25+
"aliases": ["Fortran90", "fortran90"],
26+
"extensions": [".f90",".F90",".f95",".F95"],
27+
"configuration": "./language-configuration.json"
28+
29+
}],
30+
"grammars": [
31+
{
32+
"language": "fortran90",
33+
"scopeName": "source.fortran.modern",
34+
"path": "./syntaxes/fortran90.tmLanguage"
35+
}
36+
]
2337
},
2438
"scripts": {
2539
"vscode:prepublish": "tsc -p ./",

src/extension.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// src/extension.ts
22
import * as vscode from 'vscode';
33

4-
import FortranLintingProvider from './features/linterProvider';
4+
import FortranLintingProvider from './features/linter-provider';
55

66
export function activate(context: vscode.ExtensionContext) {
7-
console.log("called")
87
let linter = new FortranLintingProvider();
98
linter.activate(context.subscriptions);
10-
vscode.languages.registerCodeActionsProvider('fortran', linter);
9+
vscode.languages.registerCodeActionsProvider('fortran90', linter);
1110
}

src/features/linterProvider.ts renamed to src/features/linter-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class FortranLintingProvider {
1919
private doModernFortranLint(textDocument: vscode.TextDocument) {
2020
let errorRegex:RegExp = /^([^:]*):([0-9]+):([0-9]+):\n\s(.*)\n.*\n(Error|Warning):\s(.*)$/gm;
2121
console.log(textDocument.languageId);
22-
if (textDocument.languageId !== 'Fortran') {
22+
if (textDocument.languageId !== 'fortran90') {
2323
return;
2424
}
2525
let decoded = '';
@@ -37,7 +37,7 @@ export default class FortranLintingProvider {
3737
});
3838
childProcess.stdout.on('end', () => {
3939
let decodedOriginal = decoded;
40-
console.log(decoded);
40+
4141
let myArray;
4242
while ((myArray = errorRegex.exec(decoded)) !== null) {
4343
let elements: string[] = myArray.slice(1);

0 commit comments

Comments
 (0)