sublimelsp / LSP-intelephense

PHP support for Sublime's LSP plugin provided through intelephense.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Registering request handler for workspace/didChangeWorkspaceFolders failed

JoyceBabu opened this issue · comments

I can see the following warning message logged in the LSP Log Panel. The plugin is working fine for me, in spite of the warning.

lsp-intelephense: Registering request handler for workspace/didChangeWorkspaceFolders failed.
lsp-intelephense: (node:96879) UnhandledPromiseRejectionWarning: Error: client/registerCapability
lsp-intelephense: at /Users/joyce/Library/Application Support/Sublime Text 3/Cache/LSP-intelephense/intelephense/node_modules/intelephense/lib/intelephense.js:59:146893
lsp-intelephense: at /Users/joyce/Library/Application Support/Sublime Text 3/Cache/LSP-intelephense/intelephense/node_modules/intelephense/lib/intelephense.js:59:147187
lsp-intelephense: at Immediate.<anonymous> (/Users/joyce/Library/Application Support/Sublime Text 3/Cache/LSP-intelephense/intelephense/node_modules/intelephense/lib/intelephense.js:59:147548)
lsp-intelephense: at processImmediate (internal/timers.js:456:21)
lsp-intelephense: (node:96879) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
lsp-intelephense: (node:96879) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I found a similar issue on sublimelsp/LSP-eslint#13

My configuration is

{
	"enabled": true,
	"languages": [
		{
			"languageId": "php",
			"scopes": ["source.php"],
			"syntaxes": [
				"Packages/PHP/PHP.sublime-syntax",
			],
		},
	],
	"initializationOptions":
	{
		"clearCache": true,
		"globalStoragePath": "/private/tmp/intelephense",
		"storagePath": "/private/tmp/intelephense",
		"licenceKey": "/Users/joyce/intelephense/license.txt"
	},
	"settings":
	{
		"intelephense":
		{
			"debug":
			{
				"enable": true
			},
			"environment":
			{
				"documentRoot": "/private/var/www/vhosts/prokerala.com/public_html",
				"phpVersion": "7.4.4"
			},
			"diagnostics":
			{
				"undefinedConstants": true,
				"undefinedFunctions": true,
				"undefinedSymbols": true
			},
			"files":
			{
				"associations": [
					"*.php"
				],
				"exclude": [
					"**/.git/**",
					"**/.svn/**",
					"**/.hg/**",
					"**/CVS/**",
					"**/.DS_Store/**",
					"**/node_modules/**",
					"**/bower_components/**",
					"**/vendor/**/{Tests,tests}/**",
					"**/composer/**/{Tests,tests}/**",
					"**/update-db/**",
					"**/.data/**",
					"/framework/**",
					"**/vendor/**/{Example,example,Examples,examples}/**",
					"**/composer/**/{Example,example,Examples,examples}/**",
					"**/composer/composer/**"
				]
			},
			"trace":
			{
				"server": "verbose"
			}
		}
	}
}

This is something that we need to figure how to solve elegantly. See: sublimelsp/LSP#911

This is fixed for ST3 I believe (and for ST4 as well).