Questions tagged [filetype-go]

Questions about the go file type.

Filter by
Sorted by
Tagged with
1 vote
0 answers
662 views

neovim - unable to setup gopls integration

I have configured my neovim editor using this link (https://github.com/LunarVim/Neovim-from-scratch). I have run LspInstallInfo and installed gopls successfully here. However, when I open type of ...
Mopparthy Ravindranath's user avatar
0 votes
0 answers
223 views

How do I get vim to highlight invalid fields, methods in my golang file

When I am using IntelliJ, if particular method is not present in the library version of my package, I see errors like these. The red color code is error. Interface is not present in the in my current ...
Senthil Kumaran's user avatar
1 vote
1 answer
2k views

Neovim LSP with Go

I am trying to set up my Neovim (nightly - latest) with Go (the programming language). However, it doesn't seem to be working, most likely because I'm missing something. I'm not sure what though. ...
J86's user avatar
  • 205
0 votes
1 answer
94 views

Highlight word under cursor for Go channel

I use this code to highlight: autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\')) But it fail for <-done in Go: :verbose set isk returns ...
Vitaly Zdanevich's user avatar
1 vote
1 answer
269 views

linting in Golang is painfully slow, maybe plugin conflicts?

I am pretty new to plugin configuration and plugin management when it comes to various languages. My two primary languages that I program in are Go and JavaScript. I use ALE for JavaScript(which works ...
Ctfrancia's user avatar
  • 133
0 votes
0 answers
158 views

ALE ale_go_govet_options not working with Shadow command

I've installed: go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow When run on an example script I get the expected output: $ shadow test_shadowing.go test_shadowing.go:10:3: ...
Integralist's user avatar
2 votes
1 answer
588 views

Disable All Default Mappings in vim-go

Is there a way to disable all mappings for vim-go? So I can only have the mappings that I explicitly set myself?
lsimmons's user avatar
  • 175
1 vote
1 answer
60 views

What setting causes my autoindent to add indent on a new line?

I have this go code snippet that I am working on in vim with vim-go enabled. | is where my cursor is at. // PlayerServer is a HTTP interface for player information type PlayerServer struct { ...
woodstok's user avatar
  • 195
1 vote
0 answers
88 views

remap keybinding for vim gocode autocomplete feature? (remap keybinding in insert mode) [duplicate]

So I installed vim-go and gocode and Blackrush/vim-gocode.git (the latter because I use pathogen). So far so good! I am fine, I can type <C-x><C-o> in insert mode and I get completion ...
transient_loop's user avatar
4 votes
1 answer
911 views

quickfix window and location list open at the same time causes weird resize

I have two different plugins doing different things while writing Go. Sometimes the plugin that runs the testing (vim-go) will write to the quickfix window, while the plugin that does linting (ALE) ...
Joff's user avatar
  • 165
1 vote
2 answers
720 views

Highlight exported Go functions

Golang uses naming convention to separate functions visibility: exported (public) starts with a capital letter, non-exported (private) with a lower letter. I would like to highlight exported functions,...
grundic's user avatar
  • 123