-
-
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
Neovim integration #607
Neovim integration #607
Conversation
I have rebased master with this branch and built a couple of projects serveral times without any issue. Does it happen building any codebase? |
@gonzaloserrano yeah it should just work like the previous |
Yep it does, what i was asking is what kind of code are you trying to build, since i'm not able to reproduce the crash. Maybe you can post here a repo or something to build that made it crash? |
@gonzaloserrano change something (like remove the Another case might be: Call I still couldn't find the a case which I can use to reproduce the crash. |
@fatih simply amazing! |
@fatih The new improvements are great. However, if you have an application that is waiting for stdin the vim-go sets arbitrary input values automatically. If you try to run PS. I am not sure that I had to open new issue |
@Svett thanks for the input. Yes please do not open issue, just write it here until this is ready to go. As I know neovim opens a real terminal, so stdin shouldn't be affected by anything else. I'm going to look at it, thanks! |
@fatih my fault this happens with the latest version. I didn't realise that this changes are not merged yet. It works fine with the changes from these pull request. |
@Svett awesome :) I've just tried and it works perfectly: http://cl.ly/1d1j1I2s031l |
@fatih this looks exciting, thanks for working on it, are you planning on running :GoTest async as well? |
@wavded yes! One by one ;) I'm working on my spare times and this needs to be rock solid for both Vim and Neovim (it shouldn't break anything on Vim for example). For now it would be very helpful for me if people could test and report back any kind of errors to this issue. |
Sweet, am pulling from this branch now and will report any issues. |
@wavded I've fixed your problem. Please pull and try again. |
How is your go output from the terminal? Pushing a fix now. |
I wonder if its junk in my output. I get this on a run of
I went back to the master branch and I get the same extra stuff in the quicklist. |
An update. Setting |
That's normal, we don't support testify. In the future we might support custom error format, but not now. |
@fatih, when running :GoTest and a failure occurs the location list shows (which is expected) but when the tests pass again, the location list still shows. :GoTest (sync version, on master) removes that location list. Still possible? |
Let me check it. |
@wavded fixed! |
I'm going to merge this today. This also includes several other fixes for the main branch. I'm going to work on other improvements (such as async :GoFmt ...) afterwards. This is getting bigger and bigger, and I don't like big PR's :) |
Yay :) |
Thanks @fatih ! |
🎉 👍 Very nice!! |
This is so awesome 🎉. I just hacked the statusline update into Airline for anyone else that's interested (fair warning I'm super bad at vim and very well could be breaking something 😁 ) Note also that I don't use syntastic and this will remove it from the default warning section: function! VimGoAirline(...)
if &filetype == 'go'
let w:airline_section_warning = airline#section#create(['whitespace', '%{go#jobcontrol#Statusline()}'])
endif
endfunction
call airline#add_statusline_func('VimGoAirline') |
Can someone recommend a good alternative for neocomplete to use with neo-vim? Thx!. |
This PR is going to add a proper initial Neovim integration (to make use of Neovim's advanced features). Nothing needs to be installed or to be done. The features will be active only if you use vim-go inside Neovim.
Currently implemented features:
go
command. This will be used for all upcoming subcommands of thego
tool.:GoBuild
is now called asynchronously (it doesn't block the UI anymore).go#jobcontrol#Statusline()
can be used to plug into the statusline. This will show the status of the job running asynchronously:GoRun
opens a new vertical terminal and runs the command there. The terminal mode can be changed withg:go_term_mode
, which is by defaultvsplit
. Current options arevsplit, split or tab
:GoRun
terminal in different modes:<Plug>(go-run-vertical)
,<Plug>(go-run-split)
and<Plug>(go-run-tab)
: An example usage:g:go_term_height
andg:go_term_width
. By default a vertical or horizontal is just split by vim automatically. However with these settings we can for example have a terminal with a smaller height when we split it horizontally.:GoTest
,:GoTestFunc
and:GoTestCompile
opens and runs in a new terminal. The view mode(split,vertical, tab) is defined withg:go_term_mode
.go run
,go test
...) we parse now the errors and list them inside in a qf window.g:go_term_enabled
setting is added to change the behavior of:GoTest
.If set to1
, it opens the test commands inside a terminal, if not it runs them in background just like:GoBuild
and displays the result in the statusline:GoBuild
) is successful, all statusline's will be empty (means SUCCESS), if you it fails all file's statusline will showFAILED
.Please test all features both with Vim and Neovim if you can. Right now documentation, messages and co are just placeholders and will be suited and corrected once it's release ready. Please ask any question. Any feedback is welcome.