Skip to content

Commit 80d6d9c

Browse files
committed
Allow configuration to be passed to Phpactor
1 parent 6052766 commit 80d6d9c

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Commands
3333
- `phpactor.services.list`: List Phpactor's currently running services.
3434
- `phpactor.config.dump`: Dump Phpactor's configuratoin to the log window.
3535

36+
Configuration
37+
-------------
38+
39+
You can add any Phpactor
40+
[configuration](https://phpactor.readthedocs.io/en/develop/reference/configuration.html)
41+
using the `phpactor.config` key in `:CocConfig`.
42+
3643
Documentation
3744
-------------
3845

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
"type": "boolean",
3434
"default": true,
3535
"description": "enable phpactor language server"
36+
},
37+
"phpactor.config": {
38+
"type": "any",
39+
"default": {},
40+
"description": "standard phpactor configuration"
3641
}
3742
}
3843
}

src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ function createClient(config: any): LanguageClient {
5151
{ language: LanguageID, scheme: 'file' },
5252
{ language: LanguageID, scheme: 'untitled' }
5353
],
54-
initializationOptions: {
55-
},
54+
initializationOptions: config.config
5655
};
5756

5857
languageClient = new LanguageClient(

0 commit comments

Comments
 (0)