Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: lsp manager #11

Merged
merged 26 commits into from
Jul 19, 2017
Merged

WIP: lsp manager #11

merged 26 commits into from
Jul 19, 2017

Conversation

prabirshrestha
Copy link
Owner

@prabirshrestha prabirshrestha commented Jul 10, 2017

Do not merge. This is WIP. This supersedes #10

Apis aren't locked (lot to clean up here) but here is what it currently supports.

  • support serial async control flow via lsp#utils#step#start([....])
  • support parallel async control flow via lsp#utils#step#parallel([...])
  • ability to register a lsp#register_server
au User lsp_setup call lsp#register_server({
     \ 'name': 'go-langserver',
     \ 'cmd': {server_info->['go-langserver']},
     \ 'whitelist': ['go'],
     \ })
  • auto call textDocument/didOpen
  • auto call textDocument/didSave
  • auto call textDocument/didChange. Currently only calls when leaving insert mode or when saving the file.
  • lsp#get_whitelisted_servers() to retrieve active servers for the buffer
  • send custom request via lsp#send_request. params and on_notification are optional. automatically flushes the buffer for the server
call lsp#send_request('server_name', {
    \ 'method': 'initialize',
    \ 'params:' {....},
    \ 'on_notification': {server_name, response->lsp#log(server_name, response)},
    \ })
  • send custom notifications via lsp#send_notification. params is optional. automatically flushes the buffer for the server.
call lsp#send_notification('server_name', {
    \ 'method': 'initialize',
    \ 'params:' {....},
    \ })

The goal is for the core to be ui independent and then allow ui to be built on top of the core. For example getting document/workspace symbols can be implemented in loclist, quickfix, ctrlp, unite, denite, fzf. Most likely I will only be shipping only quickfix and loclist by default, rest would be as a separate vim plugin.

  • :LspGetWorkspaceSymbols
  • :LspGetDocumentSymbols

....Lot more todos... will be pushing this to dev branch soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant