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

cmd/govim: add support for runtime configuration of WorkSpace folders #172

Closed
myitcv opened this issue Apr 23, 2019 · 5 comments
Closed
Labels
enhancement New feature or request
Milestone

Comments

@myitcv
Copy link
Member

myitcv commented Apr 23, 2019

Currently, users are required to open Vim with a working directory that is within a module context (or GOPATH in GOPATH-mode) to be able to do anything.

This, however, is overly and unnecessarily restrictive. Some users use plugins that allow them to operate Vim more like VSCode. i.e. open once (with a working directory of, say, $HOME), and then open projects from there via file explorers and the like. Those projects will likely be modules (or subdirectories of GOPATH).

For this to work however, we need to support runtime configuration of WorkSpace folders from Vim via govim. WorkSpace folders tell gopls where things are rooted (typically modules). "Opening a workspace folder" represents establishing a new root. gopls then attempts to "do the right thing" by routing file operations to the most appropriate view (gopls concept that enables multiple WorkSpaces folders).

Depends on golang/go#31635

@myitcv myitcv added enhancement New feature or request onhold Probably pending some 3rd party issue labels Apr 23, 2019
@myitcv myitcv removed the onhold Probably pending some 3rd party issue label May 22, 2019
@myitcv
Copy link
Member Author

myitcv commented May 22, 2019

@myitcv myitcv added this to the Unplanned milestone Jul 5, 2019
@myitcv
Copy link
Member Author

myitcv commented Aug 13, 2019

See also golang/go#33347 (comment)

@myitcv
Copy link
Member Author

myitcv commented Aug 13, 2019

Related to #428

@myitcv
Copy link
Member Author

myitcv commented Nov 18, 2019

Per conversation with @idawes on Slack, this also needs to encompass some form of persistence for these preferences/setup. Suggested formats were a CUE config file that contained definitions for the workspaces beneath it (along with details like build tag preferences etc).

@myitcv
Copy link
Member Author

myitcv commented Sep 16, 2020

We should also only trigger this when the server registers an interest via the RegisterCapability call to the client.

myitcv added a commit that referenced this issue Sep 16, 2020
Until we resolve #172, #949 and #950, simply log any known calls to
RegisterCapability and UnregisterCapability. Panic if there are any
calls for methods we don't know about (so we then know to start
supporting them).
myitcv added a commit that referenced this issue Sep 16, 2020
Until we resolve #172, #949 and #950, simply log any known calls to
RegisterCapability and UnregisterCapability. Panic if there are any
calls for methods we don't know about (so we then know to start
supporting them).
@myitcv myitcv closed this as completed in 8ea5249 Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant