atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
389 stars 78 forks source link

AutoLanguageClient#getInitializeParams should send up client capabilities #146

Closed rictic closed 6 years ago

rictic commented 6 years ago

Currently getInitializeParams sends up an empty client capabilities object, but out of the box the AutoLanguageClient seems to have a lot of optional client capabilities. My best guess of what we should send up, from poking around a bit would be:

      capabilities: {
        workspace: {
          applyEdits: true,
          didChangeWatchedFiles: true,
        },
        textDocument: {
          synchronization: {
            didSave: true,
            willSave: true,
          }
        }
      }

There's a comment suggesting that this method be overridden and capabilities extended, which makes sense for users that are extending the client's capabilities, but it also seems like we can populate a default object with capabilities that AutoLanguageClient provides out of the box.

daviwil commented 6 years ago

I'm working on that here, will be merged today:

https://github.com/atom/atom-languageclient/pull/144/files#diff-f030f362befd31979274bccf13f0b89cR84

daviwil commented 6 years ago

This has been merged! Let me know if you find anything missing.