Skip to content

Commit

Permalink
style: use prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Nov 11, 2018
1 parent edd8806 commit 0c2985e
Show file tree
Hide file tree
Showing 16 changed files with 257 additions and 193 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE.md
@@ -1,4 +1,3 @@

<!--
THERE IS A 99% CHANCE YOU ARE FILING THIS ISSUE IN THE WRONG REPOSITORY.
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
@@ -0,0 +1,4 @@
package.json
package-lock.json
vendor/
out/
22 changes: 22 additions & 0 deletions .prettierrc
@@ -0,0 +1,22 @@
{
"tabWidth": 4,
"printWidth": 120,
"proseWrap": "preserve",
"semi": false,
"trailingComma": "es5",
"singleQuote": true,
"overrides": [
{
"files": "{*.js?(on),*.y?(a)ml,.*.js?(on),.*.y?(a)ml,*.md,.prettierrc,.stylelintrc,.babelrc}",
"options": {
"tabWidth": 2
}
},
{
"files": "composer.{json,lock}",
"options": {
"tabWidth": 4
}
}
]
}
9 changes: 2 additions & 7 deletions .vscode/launch.json
Expand Up @@ -7,9 +7,7 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}"
],
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out"
Expand All @@ -19,10 +17,7 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test"
],
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test"],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out/test"
Expand Down
16 changes: 8 additions & 8 deletions .vscode/settings.json
@@ -1,10 +1,10 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
}
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
}
8 changes: 2 additions & 6 deletions .vscode/tasks.json
Expand Up @@ -6,16 +6,12 @@
{
"type": "npm",
"script": "build",
"problemMatcher": [
"$tsc"
]
"problemMatcher": ["$tsc"]
},
{
"type": "npm",
"script": "watch",
"problemMatcher": [
"$tsc-watch"
]
"problemMatcher": ["$tsc-watch"]
}
]
}
1 change: 0 additions & 1 deletion CHANGELOG.md
@@ -1,2 +1 @@

# See [GitHub releases](https://github.com/felixfbecker/vscode-php-intellisense/releases)
17 changes: 15 additions & 2 deletions README.md
Expand Up @@ -15,50 +15,63 @@ I recommend to disable VS Code's built-in PHP IntelliSense by setting `php.sugge
## Features

### Completion

![Completion search demo](images/completion.gif)

### Signature Help

![Signature help demo](images/signatureHelp.gif)

### Workspace symbol search

![Workspace symbol search demo](images/workspaceSymbol.gif)

### Find all References

![Find References demo](images/references.png)

### Go to Definition

![Go To Definition demo](images/definition.gif)

### Hover

![Hover class demo](images/hoverClass.png)

![Hover parameter demo](images/hoverParam.png)

### Find all symbols

![Find all symbols demo](images/documentSymbol.gif)

### Column-accurate error reporting

![Error reporting demo](images/publishDiagnostics.png)

### Code style linting

Please use a dedicated extension like [PHP CodeSniffer](https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs).

### Format code

Please use a dedicated extension like [PHP CS Fixer](https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer).

## Todo
- Rename
- Signature help

- Rename
- Signature help

## Contributing

Clone whole repository and in root directory execute:

```bash
composer install
npm install
npm run build
code .
```

The last command will open the folder in VS Code. Hit `F5` to launch an Extension Development Host with the extension.
For working on the language server, the easiest way is to replace the language server installation from composer in `vendor/felixfbecker/language-server` with a symlink to your local clone.

Expand Down
54 changes: 26 additions & 28 deletions dependencies.yml
@@ -1,35 +1,33 @@
collectors:

- type: js-npm
path: /
actors:
# pull requests for new major versions
- type: js-npm
versions: "Y.0.0"
settings:
# these updates should generally not have an effect on users
commit_message_prefix: "chore: "

# receive pull requests to update composer.lock for any update to the language server or dependencies of it
# after merging, depending on whether it was a patch or feature update,
# semantic-release will bundle a new patch or feature version of the extension
- type: php-composer
path: /
settings:
collect_transitive: true
actors:
path: /
actors:
# pull requests for new major versions
- type: js-npm
versions: 'Y.0.0'
settings:
# these updates should generally not have an effect on users
commit_message_prefix: 'chore: '

# receive pull requests to update composer.lock for any update to the language server or dependencies of it
# after merging, depending on whether it was a patch or feature update,
# semantic-release will bundle a new patch or feature version of the extension
- type: php-composer
versions: "L.L.Y"
path: /
settings:
commit_message_prefix: "fix: "
collect_transitive: true
actors:
- type: php-composer
versions: 'L.L.Y'
settings:
commit_message_prefix: 'fix: '

- type: php-composer
versions: "L.Y.0"
settings:
commit_message_prefix: "feat: "
- type: php-composer
versions: 'L.Y.0'
settings:
commit_message_prefix: 'feat: '

- type: php-composer
versions: "Y.0.0"
settings:
commit_message_prefix: "chore: "
- type: php-composer
versions: 'Y.0.0'
settings:
commit_message_prefix: 'chore: '
6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -47,7 +47,9 @@
"build": "tsc -p .",
"watch": "tsc -w -p .",
"postinstall": "node ./node_modules/vscode/bin/install",
"lint": "tslint -c tslint.json \"src/**/*.ts\"",
"lint": "npm run prettier && npm run tslint",
"tslint": "tslint -p tsconfig.json -c tslint.json \"src/**/*.ts\"",
"prettier": "prettier '**/{*.{js?(on),ts,yml},.*.js?(on),.*.yml,.prettierrc,*.md}' --write --list-different",
"semantic-release": "semantic-release"
},
"devDependencies": {
Expand All @@ -59,9 +61,11 @@
"@types/node": "8.10.29",
"@types/semver": "5.5.0",
"husky": "1.1.3",
"prettier": "1.15.2",
"semantic-release": "15.10.8",
"semantic-release-vsce": "2.1.2",
"tslint": "5.11.0",
"tslint-config-prettier": "^1.15.0",
"typescript": "3.1.6",
"vscode": "1.1.21"
},
Expand Down
6 changes: 2 additions & 4 deletions renovate.json
Expand Up @@ -4,12 +4,10 @@
"rangeStrategy": "pin",
"semanticCommits": true,
"npm": {
"semanticCommitType": "chore",
"packageRules": [
{
"packagePatterns": [
"*"
],
"packagePatterns": ["*"],
"semanticCommitType": "chore",
"minor": {
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch"
Expand Down

0 comments on commit 0c2985e

Please sign in to comment.