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

lsp: support build tags #2429

Merged
merged 5 commits into from
Jul 29, 2019
Merged

lsp: support build tags #2429

merged 5 commits into from
Jul 29, 2019

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Jul 29, 2019

godef: make directory name match the package name

Make the directory name match the package name in godef tests.

lsp: fix response handling
  • pass the request id to newResponse
  • return the result message from newResponse
lsp: refactor managing workspace directories
  • rename go#lsp#message#workspaceFolders to make it clear that it
    returns a request result message
  • rename go#lsp#AddWorkspace to make it clear that it adds a directory
    and isn't necessarily related to any other context that may compose of
    workspace (of which there is none yet).
  • rename go#lsp#message#AddWorkspaces to make it reflect the fact that
    it changes workspace folders and add a new parameter to specify the
    directories to be removed.
lsp: add support for configuration client capability
  • Tell gopls that vim-go supports the workspace.configuration client
    capability.
  • Respond to workspace/configuration requests with buildFlags and
    hoverKind. buildFlags is set to the build flags currently configured
    in vim-go build flags (e.g. g:go_build_flags). hoverKind is set to
    NoDocumentation so that hover responses won't return documentation.
lsp: reset workspaces when build flags are changed

Reset workspaces when build flags are changed via :GoBuildFlags. This
won't yet do anything. Once
https://go-review.googlesource.com/c/tools/+/187819 is merged, though,
build flags that gopls uses will be able to be changed using
:GoBuildFlags without requiring the Vim session to be restarted.

Make the directory name match the package name in godef tests.
* pass the request id to newResponse
* return the result message from newResponse
* rename go#lsp#message#workspaceFolders to make it clear that it
  returns a request result message
* rename go#lsp#AddWorkspace to make it clear that it adds a directory
  and isn't necessarily related to any other context that may compose of
  workspace (of which there is none yet).
* rename go#lsp#message#AddWorkspaces to make it reflect the fact that
  it changes workspace folders and add a new parameter to specify the
  directories to be removed.
* Tell gopls that vim-go supports the workspace.configuration client
  capability.
* Respond to workspace/configuration requests with buildFlags and
  hoverKind. buildFlags is set to the build flags currently configured
  in vim-go build flags (e.g. g:go_build_flags). hoverKind is set to
  NoDocumentation so that hover responses won't return documentation.
Reset workspaces when build flags are changed via `:GoBuildFlags`. This
won't yet do anything. Once
https://go-review.googlesource.com/c/tools/+/187819 is merged, though,
build flags that gopls uses will be able to be changed using
`:GoBuildFlags` without requiring the Vim session to be restarted.
@bhcleek bhcleek merged commit 3a373cf into fatih:master Jul 29, 2019
@bhcleek bhcleek deleted the lsp/build-tags branch July 29, 2019 16:52
bhcleek added a commit that referenced this pull request Jul 29, 2019
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.

None yet

1 participant