Skip to content

Commit

Permalink
v0.0.3 : Fix documentation rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonAndre committed Oct 3, 2017
1 parent 881e55e commit 1402aa6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,19 @@ Add these entries to your VSCode config (Open the menu at File > Preferences > S
}
```

**After adding these entries, close and re-open Visual Studio Code in order for Phan to pick up the new settings.**

## Examples

### Error Detection

![Phan error detection demo](images/error_detection.png)
![Phan error detection demo](https://raw.githubusercontent.com/TysonAndre/vscode-php-phan/master/images/error_detection.png)

Phan's capabilities are summarized in [Phan's README](https://github.com/phan/phan#features)

### Error Detection (Tolerating Syntax Errors)

![Phan error tolerant detection demo](images/tolerant_parsing.png)
![Phan error tolerant detection demo](https://raw.githubusercontent.com/TysonAndre/vscode-php-phan/master/images/tolerant_parsing.png)

Optional, enabled by the setting `phan.useFallbackParser`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"private": true,
"preview": false,
"version": "0.0.2-dev",
"version": "0.0.3",
"engines": {
"vscode": "^1.16.0",
"os" : [ "darwin", "linux" ]
Expand Down
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
const phanScriptPath = conf.get<string>('phanScriptPath') || defaultPhanScriptPath;
// TODO: Support analyzing more than one project.
// TODO: Figure out how to stop the language server when a different project is opened.
const analyzedProjectDirectory = conf.get<string>('analyzedProjectDirectory');
const analyzedProjectDirectory = conf.get<string>('analyzedProjectDirectory') || '';
const enableDebugLog = conf.get<boolean>('enableDebugLog');
const useFallbackParser = conf.get<boolean>('useFallbackParser');
const additionalCLIFlags = conf.get<string[]>('additionalCLIFlags') || [];
Expand Down Expand Up @@ -236,6 +236,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
// php phan --language-server-verbose [args]
args.unshift('--quick');
}

// The server is implemented in PHP
// FIXME create a real language server module
// FIXME install in vendor?
Expand Down
44 changes: 22 additions & 22 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "out",
"lib": [
"es6"
],
"noImplicitAny": true,
"sourceMap": true,
"rootDir": "src",
"strictNullChecks": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false
},
"exclude": [
"node_modules",
"out"
]
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "out",
"lib": [
"es6"
],
"noImplicitAny": true,
"sourceMap": true,
"rootDir": "src",
"strictNullChecks": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false
},
"exclude": [
"node_modules",
"out"
]
}

0 comments on commit 1402aa6

Please sign in to comment.