sublimelsp / LSP-css

CSS, SCSS, LESS support for Sublime's LSP plugin
MIT License
37 stars 0 forks source link

Odd server params from workspace/configuration request #11

Closed rwols closed 4 years ago

rwols commented 4 years ago

I'm getting this:

:: <-- lsp-css workspace/configuration(0): {'items': [{'section': {'lsp-css': 'css'}, 'scopeUri': 'file:///home/raoul/.config/sublime-text-3/Packages/LSP/popups.css'}]}
:: ~~> lsp-css 0: {'code': -32603, 'message': "'dict' object has no attribute 'split'"}

Traceback from console:

Error handling request
Traceback (most recent call last):
  File "/home/raoul/.config/sublime-text-3/Packages/LSP/plugin/core/rpc.py", line 327, in receive_payload
    handler(result, req_id)
  File "/home/raoul/.config/sublime-text-3/Packages/LSP/plugin/core/sessions.py", line 377, in _handle_request_workspace_configuration
    items.append(self.config.settings.get(requested_item.get('section') or None))
  File "/home/raoul/.config/sublime-text-3/Packages/LSP/plugin/core/collections.py", line 35, in get
    keys = path.split('.')
AttributeError: 'dict' object has no attribute 'split'

'section' should be a string according to the spec, so I don't know where vscode-css-language-server is getting this from:

export interface ConfigurationParams {
    items: ConfigurationItem[];
}

export interface ConfigurationItem {
    /**
     * The scope to get the configuration section for.
     */
    scopeUri?: DocumentUri;

    /**
     * The configuration section asked for.
     */
    section?: string;
}
rchl commented 4 years ago
            const configRequestParam = { items: [{ scopeUri: textDocument.uri, section: textDocument.languageId }] };

It seems like it's using textDocument.languageId so did we sent this wrong earlier? I can't see the problem here. Check your languages configuration.

rwols commented 4 years ago

It was a bug in my session-views branch.