{"action":"created","issue":{"url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/117","repository_url":"https://api.github.com/repos/prabirshrestha/vim-lsp","labels_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/117/comments","events_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/117/events","html_url":"https://github.com/prabirshrestha/vim-lsp/pull/117","id":306162026,"number":117,"title":"Silence error from Dart language server","user":{"login":"adaszko","id":165678,"avatar_url":"https://avatars0.githubusercontent.com/u/165678?v=4","gravatar_id":"","url":"https://api.github.com/users/adaszko","html_url":"https://github.com/adaszko","followers_url":"https://api.github.com/users/adaszko/followers","following_url":"https://api.github.com/users/adaszko/following{/other_user}","gists_url":"https://api.github.com/users/adaszko/gists{/gist_id}","starred_url":"https://api.github.com/users/adaszko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaszko/subscriptions","organizations_url":"https://api.github.com/users/adaszko/orgs","repos_url":"https://api.github.com/users/adaszko/repos","events_url":"https://api.github.com/users/adaszko/events{/privacy}","received_events_url":"https://api.github.com/users/adaszko/received_events","type":"User","site_admin":false},"labels":[{"id":690693048,"url":"https://api.github.com/repos/prabirshrestha/vim-lsp/labels/waiting%20for%20reply","name":"waiting for reply","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-17T14:46:51Z","updated_at":"2018-03-18T03:33:46Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/prabirshrestha/vim-lsp/pulls/117","html_url":"https://github.com/prabirshrestha/vim-lsp/pull/117","diff_url":"https://github.com/prabirshrestha/vim-lsp/pull/117.diff","patch_url":"https://github.com/prabirshrestha/vim-lsp/pull/117.patch"},"body":"Hi!\r\n\r\nI'm using vim-lsp with [dart_language_server](https://github.com/natebosch/dart_language_server).  On every save of a file, I'm getting a VimL exception:\r\n\r\n```\r\nError detected while processing function <SNR>98_on_text_document_did_save[4]..<SNR>98_ensure_flush[1]..lsp#utils#step#start[1]..<SNR>120_next[9]..<lambda>19[1]..<SNR>98_ensure_start[15]..<SNR>120_callback[1]..<SNR>120_next[9]..<lambda>20[1]..<SNR>98_ensure_init[6]..<SNR>120_callback[1]..<SNR>120_next[9]..<lambda>21[1]..<SNR>98_ensure_open[16]..<SNR>120_callback[1]..<SNR>120_next[9]..<lambda>22[1]..<SNR>98_ensure_changed[33]..<SNR>120_callback[1]..<SNR>120_next[9]..<lambda>23[1]..<lambda>18[1]..<SNR>98_call_did_save[8]..lsp#capabilities#get_text_document_save_registration_options:\r\nline    6:\r\nE715: Dictionary required\r\n```\r\n\r\nDump of `l:capabilities`:\r\n\r\n```\r\n{'executeCommandProvider': v:null, 'hoverProvider': v:true, 'workspaceSymbolProvider': v:false, 'referencesProvider': v:true, 'signatureHelpProvider': v:null, 'codeActionProvider': v:true, 'textDocumentSync': {'save': v:false, 'willSaveWaitUntil': v:false, 'willSave': v:false, 'change': 2, 'openClose': v:true}, 'codeLensProvider': v:false, 'documentHighlightsProvider': v:false, 'documentLinkProvider': v:null, 'documentOnTypeFormattingProvider': v:false, 'definitionProvider': v:true, 'documentRangeFormattingProvider': v:false, 'documentFormattingProvider': v:false, 'documentSymbolProvider': v:false, 'renameProvider': v:true, 'completionProvider': {'resolveProvider': v:false, 'triggerCharacters': ['.']}}\r\n```\r\n\r\nas you can see, the `save` property of `textDocumentSync` is `v:false` and vim-lsp expects a dictionary.  I'm a bit confused because [language-server-protocol specs](https://github.com/Microsoft/language-server-protocol/blob/b70345dcb66bbd9c1acb2a644d5a0ed4af21898d/versions/protocol-2-x.md) give yet another version: `textDocumentSync` is defined as TypeScript nullable `number` there (i.e. not a dictionary).  So which version is correct?\r\n\r\nEDIT: There's an [extended specification of the protocol](https://microsoft.github.io/language-server-protocol/specification) that defines `testDocumentSync` as `textDocumentSync?: TextDocumentSyncOptions | number;`.  So it looks like the dart language server is out of date."},"comment":{"url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/comments/373970329","html_url":"https://github.com/prabirshrestha/vim-lsp/pull/117#issuecomment-373970329","issue_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/117","id":373970329,"user":{"login":"natebosch","id":7528195,"avatar_url":"https://avatars3.githubusercontent.com/u/7528195?v=4","gravatar_id":"","url":"https://api.github.com/users/natebosch","html_url":"https://github.com/natebosch","followers_url":"https://api.github.com/users/natebosch/followers","following_url":"https://api.github.com/users/natebosch/following{/other_user}","gists_url":"https://api.github.com/users/natebosch/gists{/gist_id}","starred_url":"https://api.github.com/users/natebosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natebosch/subscriptions","organizations_url":"https://api.github.com/users/natebosch/orgs","repos_url":"https://api.github.com/users/natebosch/repos","events_url":"https://api.github.com/users/natebosch/events{/privacy}","received_events_url":"https://api.github.com/users/natebosch/received_events","type":"User","site_admin":false},"created_at":"2018-03-18T03:33:46Z","updated_at":"2018-03-18T03:33:46Z","author_association":"NONE","body":"> Is this a bug in dart lang server?\r\n\r\nYes I think it is, thanks for the heads up.\r\n\r\n@adaszko - I'll try to get a fix out soon. Recent versions of `dart_language_server` are only compatible with the 2.0.0-dev versions of the SDK. If you are using a 1.24 SDK please comment on https://github.com/natebosch/dart_language_server/issues/27 and let me know so I can check on the feasibility of dropping a release that will work for you."}}
{"actor":{"display_login":"natebosch"}}