Skip to content
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

Code folding is broken with go_highlight_types #1282

Closed
jeromer opened this issue May 9, 2017 · 2 comments · Fixed by #1338
Closed

Code folding is broken with go_highlight_types #1282

jeromer opened this issue May 9, 2017 · 2 comments · Fixed by #1338

Comments

@jeromer
Copy link

jeromer commented May 9, 2017

Behavior

Code folding is broken when go_highlight_types is enabled.

Steps to reproduce:

Take the following code:

package main

import "fmt"

type someStruct struct {
	A string
	B string
}

func main() {
	test()
}

func test() {
	s := someStruct{A: "a", B: "b"}
	fmt.Println(s)
}

And the following vim configuration

set nocompatible

filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()

Bundle 'fatih/vim-go'

set directory=/tmp/

syntax enable

set fdm=syntax

let g:go_fmt_command = "goimports"
let g:go_autodetect_gopath = 1
let g:go_list_type = "quickfix"
let g:go_def_mapping_enabled = 0

"let g:go_highlight_types = 1

Everything looks OK.

a

Now uncomment let g:go_highlight_types = 1 quit vim and reopen the .go file. The test function is incorrectly folded.

b

Configuration

Add here your current configuration and additional information that might be
useful, such as:

  • vimrc you used to reproduce : see above
  • vim version: 7.4.712
  • vim-go version: v1.12
  • go version: go1.8 linux/amd64
@arp242
Copy link
Contributor

arp242 commented Jun 30, 2017

I think I fixed it in #1338 @jeromer. Could you test this? I don't use either feature in my daily usage.

@jeromer
Copy link
Author

jeromer commented Jun 30, 2017

Confirmed, your commit fixed that bug.

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants