Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes
Accepted

Highlight exported Go functions

To borrow @Christian Brabandt's answer in the comments (and break it down further): match Title /func \zs[A-Z][a-z0-9_]*/ The regex is the same as before, but the \zs marker effectively tells Vim, "...
D. Ben Knoble's user avatar
  • 26.4k
3 votes
Accepted

Neovim LSP with Go

It turns out, the buffer doesn't get attached unless I have a .git folder in the project root directory, or a go.mod file. I didn't have those, I just had a main.go.
J86's user avatar
  • 235
3 votes

Highlight exported Go functions

David Ben Knoble has already given you a good, working solution. However, seeing as this is syntax that you're highlighting, I feel like it's cleaner to perform the task with a :syntax command. This ...
Rich's user avatar
  • 32.1k
3 votes
Accepted

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

As diagnosed through comments, you were probably using some generic indentation (such as Vim's cindent, which is likely to expect semi-colons to end statements.) In order to enable language-specific ...
filbranden's user avatar
  • 29k
2 votes

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

Unfortunately there is no easy way to fix this at the moment, the OP has opened a vim-go issue and we agree that this is something vim-go can do better. Now we just need someone to spend time fixing ...
Martin Tournoij's user avatar
2 votes
Accepted

Disable All Default Mappings in vim-go

Yes, there are settings for that, see :help go-settings for a list of all settings. In particular, the ones you're probably interested in are: let g:go_def_mapping_enabled = 0 Maybe also: let g:...
filbranden's user avatar
  • 29k
1 vote
Accepted

Highlight word under cursor for Go channel

Ooops, I found that in my vimrc I have "set iskeyword+=\- I have this for autocompletion of CSS classes like aaa-bbb-ccc.
Vitaly Zdanevich's user avatar
1 vote

linting in Golang is painfully slow, maybe plugin conflicts?

So my issue was pretty easily fixed. It was my fault. I didn't see the error message when opening up the file that required me to install the binaries with :GoInstallBinaries after about 1 minute of ...
Ctfrancia's user avatar
  • 133

Only top scored, non community-wiki answers of a minimum length are eligible