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 gopls local per workspace #3053

Merged
merged 3 commits into from Oct 17, 2020

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Oct 17, 2020

Closes #3023

Determine the workspace at the top of each configuration item
constructing the configuration result.

Deep copy each individual config so each configuration's value is
distinct from all others.
@bhcleek bhcleek merged commit 2c804bb into fatih:master Oct 17, 2020
@bhcleek bhcleek deleted the lsp/module-local-import branch October 17, 2020 22:05
bhcleek added a commit that referenced this pull request Oct 17, 2020
@Shane-XB-Qian
Copy link

not sure if you noticed there was a regression flaw:
for example: there some a.go b.go c.go gofiles, now vi c.go, why now it would loop to read each of them when startup?
though only 'c.go' left at the end, and looks 'a.go', 'b.go' was 'bd' or 'bw' at the end.
but that's annoyed, unless disabled the 'gopls' when vim startup (let 'g:go_gopls_enabled=0'). but how to enable it then/later?

@Shane-XB-Qian
Copy link

@bhcleek actually i am not very sure it caused by this pr, but looks more or less ..

@bhcleek
Copy link
Collaborator Author

bhcleek commented Oct 18, 2020

The behavior you're seeing is because of this change
image
in https://github.com/fatih/vim-go/pull/3052/files#diff-44b441a3a765b097802fe5a14def2b19f77ebc7c9727405849248396a128676dR251.

What makes you refer this as a regression? Are you seeing some kind of problem or are you just seeing something unfamiliar?

but how to enable it then/later?

Can you clarify what you mean by this?

@Shane-XB-Qian
Copy link

i did not dig those code detail, but why it needed loop to read all gofiles under current dir to a / cur vim window ?

but how to enable it then/later?

Can you clarify what you mean by this?

if no solution/workaround from you, perhaps i needed to disable gopls at startup by let 'g:go_gopls_enabled=0', but if so, so far i do not know how to start it later when vimenter done.

@Shane-XB-Qian
Copy link

and let g:go_diagnostics_level=0 and/or let g:go_diagnostics_enabled=0 did not help this, still annoyed loop to read into vim window. :(

@bhcleek
Copy link
Collaborator Author

bhcleek commented Oct 18, 2020

Give #3056 a try; I think you'll get the behavior you want.

@Shane-XB-Qian
Copy link

yes, i tried, i works after that pr.
but needed to set g:go_diagnostics_level=0 too, ('g:go_diagnostics_level' replaced 'g:go_diagnostics_enabled')
looks current default value is 2, perhaps should/better be default with 0 ?

@Shane-XB-Qian
Copy link

since g:go_diagnostics_enabled default was 0, if so, user did not need to change something, otherwise, looks meaningless to debug 'surprise' by them ... :)

@bhcleek
Copy link
Collaborator Author

bhcleek commented Oct 18, 2020

Ah yes, I did not mean to change the default. PR coming up.

@bhcleek
Copy link
Collaborator Author

bhcleek commented Oct 18, 2020

@Shane-XB-Qian let's move conversation to #3057

@Shane-XB-Qian
Copy link

thanks. wish #3056 #3057 merged 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.

How to get buffer-local g:go_gopls_local effect
2 participants