-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Run godef from buffer path #2150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing!
autoload/go/tool.vim
Outdated
@@ -175,7 +175,7 @@ function! go#tool#ExecuteInDir(cmd) abort | |||
let dir = getcwd() | |||
try | |||
execute cd . fnameescape(expand("%:p:h")) | |||
let [l:out, l:err] = go#util#Exec(a:cmd) | |||
let [l:out, l:err] = go#util#Exec(a:cmd, a:000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since a:000
is a list that may or may not be populated we have to make a dynamic call to go#util#Exec
with something like (untested): let [l:out, l:err] = call call('go#util#Exec', [a:cmd] + a:000)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I saw that in stack overflow: https://stackoverflow.com/questions/11703297/how-can-i-pass-varargs-to-another-function-in-vimscript but didn't quite wrap my head around it. I'll send another commit with this change.
@bhcleek had to use the latest commit in order to get the tests to pass. Maybe the double call is not legal when gathering the output ? |
yeah, since the return values are assigned to variables, you don't need the |
Thank you for contributing again 🙇 |
No problem I rely on vim-go
…On Fri, Feb 22, 2019 at 6:11 PM Billie Cleek ***@***.***> wrote:
Thank you for contributing again 🙇
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2150 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFYaluACC4d0z0q88wUBX_M5pH0BL-uEks5vQHktgaJpZM4bKhid>
.
|
This PR stemmed from this issue:
#2149
We now execute
godef
in the current directory of the buffer.