-
-
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
Error in identifier/syntax prevents autocommands to be executed #3631
Comments
I'm only able to duplicate a problem with the folding when The folding is as expected when As far as I can tell, this isn't really a vim-go bug, especially given how the order file opening impacts the results. |
@bhcleek Thank you for investigating the issue, however I beg to differ this issue is of stock Vim and not of vim-go plugin. I've experimented with removing |
I hear you, @dunric. What's throwing me is that the I see |
Interestingly, it appears that editing |
Given that expandtab seems to be being applied correctly in all cases and that vim-go does not do anything specific with foldmethod, I'm still inclined to believe that this is some kind of Vim bug. Clearly, if it is a Vim bug, it's triggered by conditions that vim-go creates. I'll continue to see if I can narrow it down, but currently I'm stumped. |
I finally have a replication path that I can use to start tracking down the root cause. |
Disabling diagnostics highlighting (i.e. |
What did you do? (required: The issue will be closed when not provided)
go mod init
main.go
file with following-like contents:other.go
in the same project's root directory:main.go
in gVim. Autocommands defined in .vimrc get executted.other.go
with:edit
command. Autocommands are not executed.defined in
.vimrc
What did you expect to happen?
Autocommands for
FileType go
will be triggered, despite some syntactic errors, just based on file's extension.go
.What happened instead?
Autocommands were not run, when
other.go
was opened as the second file.Curiously, when
other.go
is opened as the first one, FileType based autocommands are executed, despite the same contents with syntactic errors.Autocommands are also executed when
other.go
contents is fixed and valid, even when opened as the second one. Seems it may be related togopls
response which subsequently will prevent autocommands to be triggered.Configuration (MUST fill this out):
vim-go version:
current, latest commit 5bed70d
vimrc
you used to reproduce:vimrc
Vim version (first three lines from
:version
):VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 15 2023 17:06:05)
Go version (
go version
):go version go1.21.5 linux/amd64
Go environment
go env
Output:gopls version
gopls version
Output:vim-go configuration:
vim-go configuration
filetype detection configuration:
filetype detection
The text was updated successfully, but these errors were encountered: