fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.9k stars 1.45k forks source link

Vim randomly stops when go_highlight_function_calls is on #3640

Closed adirizka7 closed 4 months ago

adirizka7 commented 4 months ago

What did you do? (required: The issue will be closed when not provided)

My vim would randomly stops and I had to kill the process when opening certain files with go_highlight_function_calls enabled. If it doesn't stop, vim also becomes extremely laggy.

What did you expect to happen?

Vim should not stop and should not be laggy when go_highlight_function_calls is enabled.

What happened instead?

Vim randomly stops and becomes laggy.

Configuration (MUST fill this out):

let g:go_def_mode='gopls' let g:go_highlight_chan_whitespace_error = 1 let g:go_highlight_functions = 1 let g:go_highlight_function_calls = 1 let g:go_highlight_types = 1 let g:go_highlight_fields = 1 let g:go_highlight_build_constraints = 1 let g:go_highlight_string_spellcheck = 1 let g:go_highlight_format_strings = 1 let g:go_highlight_variable_declarations = 1 let g:go_highlight_variable_assignments = 1 let g:go_fmt_command = "goimports"

vim-go version:

v1.28

vimrc you used to reproduce:

vimrc ```vim ```

Vim version (first three lines from :version):

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 20 2023 18:58:31) macOS version - arm64 Included patches: 1-2136

Go version (go version):

go version go1.21.6 darwin/arm64

Go environment

go env Output:


gopls version

gopls version Output:

golang.org/x/tools/gopls v0.14.2
    golang.org/x/tools/gopls@v0.14.2 h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=

bhcleek commented 4 months ago

What does set re? output?

adirizka7 commented 4 months ago

What does set re? output?

The output is regexpengine=1

bhcleek commented 4 months ago

Try changing it to 0 or 2. I use 0, but sometimes it has to be forced to use the new engine by setting it to 2.

adirizka7 commented 4 months ago

Works like a charm! Thanks!