-
-
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
Cannot navigate to next error #247
Comments
Are you sure it's not working? Which command are you using? I'll use it all the time without any single problem. This is what I have in my map <C-n> :cn<CR>
map <C-m> :cp<CR> So you can use |
Yes, I run the command |
Could you please paste the executed command and an example code? I would like to debug it in more detail. |
Here is a sample code that I just open up in a new buffer: package main
func main() {
var foo Bar
} the line |
@pengux what command are you executing ? (this is the third time I'm asking you :)) It works perfectlly for me. If there is only one single error, you need to call |
@fatih Sorry, I thought you meant the |
|
Ok just to be sure we are on the same page:
If that's the case then we need to look at |
@fatih That's correct. Using |
Alright, now at least I know where to look now :) Thanks for the report. Probably the quickfix window is not being correctly produced via let g:go_fmt_fail_silently = 1 to your |
Great! No, I rather see the errors and moving to it manually though :-) |
I was curious and tried to debug the problem in fmt.go, and I don't think it is because of GoImports/GoFmt. Because if I change the error to be something like an syntax error, such as: package main
import "fmt"
func main() {
var Foo Bar By leaving out the closing bracket, GoImports reports the error correctly, the quickfix window is opened and I can navigate to the error. So it must be some kind of compiler checking that don't populate the quickfix window correctly. What is run on save automatically with vim-go? |
Found the cause and it's because of Syntastic syntax checking, so closing this... |
@pengux What was the actual issue with syntastic? How did you correct it? |
@elithrar I don't remember exactly, but I have these two lines in my .vimrc so maybe you can try it let g:syntastic_always_populate_loc_list = 1 |
Something else is going on... I don't have syntastic and have this same issue. Open to trying things to debug it. |
@pengux Thanks for your comment. It solved my problem. |
@vorstack-jeff did you get it working? I dont have syntastic and i have the issue aswell. UPDATE. I am not that used to using the lists in vim. It turns out that there are two types of lists location lists and quickfix lists. cnext will not find the next error if your use a location list. Instead you will need to run lnext. |
my .vimrc:
It works, so maybe you can try it:
I hope that helps 😄 |
@modood Worked for me. Thank you. |
Hi @fatih Let me know if I should open a new issue for this but.. I have exactly the same problem. PS. I don't use let g:go_def_mode='gopls'
let g:go_info_mode='gopls' |
Turned out that these errors have been identified by YouCompleteMe. Fixed now :) |
Errors in Go files seems to be different and cannot be navigated to by using :cn or :lne. Is there any other way to cycle through all errors in a buffer?
The text was updated successfully, but these errors were encountered: