Git Product home page Git Product logo

coc-go's Introduction

coc-go

Go language server extension using gopls for coc.nvim.

Install

In your vim/neovim, run this command:

:CocInstall coc-go

Features

See gopls

Commands

Additional to commands provided by gopls, this extensions provides these commands:

Key Description
go.gopls.tidy Run gopls.tidy LSP command
go.impl.cursor Generate interface stubs
go.install.gomodifytags Install / update gomodifytags
go.install.goplay Install / update goplay
go.install.gopls Install / update gopls
go.install.gotests Install / update gotests
go.install.impl Install / update impl
go.install.tools Install / update all tools
go.playground Run on go playground
go.tags.add Add tags to struct fields
go.tags.add.line Add tags to struct field in current line
go.tags.add.prompt Add tags to struct fields (prompt)
go.tags.clear Remove all tags from struct fields
go.tags.clear.line Remove all tags from struct fields in current line
go.tags.remove Remove tags from struct fields
go.tags.remove.line Remove tags from struct field in current line
go.tags.remove.prompt Remove tags from struct fields (prompt)
go.test.generate.exported Generate unit tests for exported functions in file
go.test.generate.file Generate unit tests for file
go.test.generate.function Generate unit tests for current function
go.test.toggle Toggle test file
go.version Print extension version

Examples

  • Add or Remove specific tags

    CocCommand go.tags.add yaml
    CocCommand go.tags.add yaml json xml
    CocCommand go.tags.remove xml
    
  • Add missing imports on save

    autocmd BufWritePre *.go :silent call CocAction('runCommand', 'editor.action.organizeImport')
  • Map Keys to command

    autocmd FileType go nmap gtj :CocCommand go.tags.add json<cr>
    autocmd FileType go nmap gty :CocCommand go.tags.add yaml<cr>
    autocmd FileType go nmap gtx :CocCommand go.tags.clear<cr>

Snippets

Snippets are imported from golang/vscode-go and require coc-snippets to be installed.

Configuration options

Key Description Default
go.checkForUpdates Check for gopls updates on start. install
go.disable Disable gopls features {}
‣ completion Disable completion feature (Change requires :CocRestart) false
‣ diagnostics Disable handle diagnostics (Change requires :CocRestart) false
‣ features Disabled features (Change requires :CocRestart) []
‣ snippetCompletion Disable snippet completion (Change requires :CocRestart) false
‣ workspaceFolders Disable workspaceFolders feature (Change requires :CocRestart) false
go.enable Enable Go extension true
go.goplsArgs Arguments passed to gopls (Change requires :CocRestart)
go.goplsEnv ENV passed to gopls (Change requires :CocRestart)
go.goplsOptions See gopls documentation
‣ allowImplicitNetworkAccess This setting is experimental and may be deleted. allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module downloads rather than requiring user action. false
‣ allowModfileModifications This setting is experimental and may be deleted. allowModfileModifications disables -mod=readonly, allowing imports from out-of-scope modules. false
‣ analyses analyses specify analyses that the user would like to enable or disable.
‣ analysisProgressReporting analysisProgressReporting controls whether gopls sends progress notifications when construction of its index of analysis facts is taking a long time. true
‣ annotations This setting is experimental and may be deleted. annotations specifies the various kinds of optimization diagnostics that should be reported by the gc_details command.
‣ buildFlags buildFlags is the set of flags passed on to the build system when invoked.
‣ codelenses codelenses overrides the enabled/disabled state of code lenses.
‣ completeFunctionCalls completeFunctionCalls enables function call completion. true
‣ completionBudget This setting is for debugging purposes only. completionBudget is the soft latency goal for completion requests. 100ms
‣ diagnosticsDelay This is an advanced setting and should not be configured by most gopls users. diagnosticsDelay controls the amount of time that gopls waits after the most recent file modification before computing deep diagnostics. 1s
‣ diagnosticsTrigger This setting is experimental and may be deleted. diagnosticsTrigger controls when to run diagnostics. Edit
‣ directoryFilters directoryFilters can be used to exclude unwanted directories from the workspace.
‣ env env adds environment variables to external commands run by gopls, most notably go list.
‣ expandWorkspaceToModule This setting is experimental and may be deleted. expandWorkspaceToModule determines which packages are considered "workspace packages" when the workspace is using modules. true
‣ experimentalPostfixCompletions This setting is experimental and may be deleted. experimentalPostfixCompletions enables artificial method snippets such as "someSlice.sort!". true
‣ gofumpt gofumpt indicates if we should run gofumpt formatting. false
‣ hints This setting is experimental and may be deleted. hints specify inlay hints that users want to see.
‣ hoverKind hoverKind controls the information that appears in the hover text. FullDocumentation
‣ importShortcut importShortcut specifies whether import statements should link to documentation or go to definitions. Both
‣ linkTarget linkTarget controls where documentation links go. pkg.go.dev
‣ linksInHover linksInHover toggles the presence of links to documentation in hover. true
‣ local local is the equivalent of the goimports -local flag, which puts imports beginning with this string after third-party packages.
‣ matcher This is an advanced setting and should not be configured by most gopls users. matcher sets the algorithm that is used when calculating completion candidates. Fuzzy
‣ memoryMode This setting is experimental and may be deleted. obsolete, no effect
‣ noSemanticNumber This setting is experimental and may be deleted. noSemanticNumber turns off the sending of the semantic token 'number' false
‣ noSemanticString This setting is experimental and may be deleted. noSemanticString turns off the sending of the semantic token 'string' false
‣ semanticTokens This setting is experimental and may be deleted. semanticTokens controls whether the LSP server will send semantic tokens to the client. false
‣ standaloneTags standaloneTags specifies a set of build constraints that identify individual Go source files that make up the entire main package of an executable.
‣ staticcheck This setting is experimental and may be deleted. staticcheck enables additional analyses from staticcheck.io. false
‣ symbolMatcher This is an advanced setting and should not be configured by most gopls users. symbolMatcher sets the algorithm that is used when finding workspace symbols. FastFuzzy
‣ symbolScope symbolScope controls which packages are searched for workspace/symbol requests. all
‣ symbolStyle This is an advanced setting and should not be configured by most gopls users. symbolStyle controls how symbols are qualified in symbol responses. Dynamic
‣ templateExtensions templateExtensions gives the extensions of file names that are treateed as template files.
‣ usePlaceholders placeholders enables placeholders for function parameters or struct fields in completion responses. false
‣ verboseOutput This setting is for debugging purposes only. verboseOutput enables additional debug logging. false
‣ vulncheck This setting is experimental and may be deleted. vulncheck enables vulnerability scanning. Off
go.goplsPath Path to gopls bin (Change requires :CocRestart)
go.goplsUseDaemon Run gopls as daemon true
go.tags
‣ options Comma separated tag=options pairs to be used by go.tags.add command json=omitempty
‣ skipUnexported If true, skip unexported fields false
‣ tags Comma separated tags to be used by go.tags.add command json
‣ transform Transformation rule used by go.tags.add command to add tags snakecase
go.tests
‣ generateFlags Additional command line flags to pass to gotests for generating tests. []
go.trace.server Trace level of gopls off

Trigger completion in coc-settings.json to get complete list.

Example Configuration

{
  "go.goplsOptions": {
    "completeUnimported": true
  }
}

Development

  1. Run npm run build or npm run build:watch
  2. Link extension: npm run link / npm run unlink

Tools

FAQ

How does coc-go compare to vim-go?

With coc-go I do not aim to recreate the features of vim-go. For now, the main goal is to provide a convenient way to install gopls and use it with coc.nvim.

If you need more than the features provided by gopls, you are probably better of with vim-go or govim.

How to use coc-go with wasm?

Add this to you (local) coc-settings.json (run :CocLocalConfig).

{
  "go.goplsEnv": {
    "GOOS": "js",
    "GOARCH": "wasm",
  }
}

Running gopls as a daemon

coc-go runs gopls as shared daemon by passing -remote=auto to gopls. To disable this behavior set go.goplsUseDaemon to false.

See Running gopls as a daemon for more information.

License

MIT © Josa Gesell.

coc-go's People

Contributors

adamatom avatar charlesvdv avatar dependabot-support avatar dependabot[bot] avatar fannheyward avatar gabrieldavid98 avatar github-actions[bot] avatar gnuletik avatar jackieli-tes avatar jbactad avatar josa42 avatar larrylv avatar mathieupost avatar midchildan avatar oncomouse avatar setkeh avatar thinceller avatar unblee avatar voldikss avatar wsw0108 avatar xiehuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

coc-go's Issues

Failed to install

I can't install this plugin. Here's the error message:

[coc.nvim] Failed to install 'gopls'
[coc.nvim] Error: exited with 1
[coc.nvim] Failed to install 'gomodifytags'
[coc.nvim] Failed to install 'gotests'

error installing `gotest` & `gopls` on Go versions < 1.13

First off, thanks for making this extension!

I'm running into an issue installing gotest & gopls for Go v1.12. After installing the extension via :CocInstall coc-go and opening a Go file I see Installing gotests..., Installing gopls... loaders and then the following error:

[coc.nvim] Error: exited with 1
Error: Command failed: env GOBIN=/Users/nathan/.config/coc/extensions/coc-go-data/bin GOPATH=/Users/nathan/.config/coc/extensions/coc-go-data/tools GO111MODULE=on go get github.com/cweill/gotests/...@latest
go: finding github.com/cweill/gotests/... latest
go get github.com/cweill/gotests/...@latest: no matching versions for query "latest"
go: finding github.com/cweill/gotests/... latest
go get github.com/cweill/gotests/...@latest: no matching versions for query "latest"
Press ENTER or type command to continue

Seems like the gotests repo does not support go modules yet which breaks the @latest tag (based on my very limited understanding of Go's package system).

Here is a similar issue in VSCode's corresponding extension and here is their fix.

This PR adding the @latest tag seems potentially relevant as well.

Workaround

I was able to get around this issue by installing a more recent Go version (specifically v1.13). After doing so, gotests & gopls installed successfully on opening a Go file.

coc-go doesn't share daemon process with vim-go

the coc-settings.json is

{
  "go.goplsArgs": ["-remote", "auto", "-logfile", "/tmp/gopls.log"],
  "go.goplsPath": "/go/bin/gopls",
  "go.goplsOptions": {
    "completeUnimported": true,
    "usePlaceholders": true,
  },
}

but with is settings, coc-go doesn't share daemon process with vim-go. see bellow:

PID 25(vim) create PID 37 (vim-go gopls client), PID 37 create PID 73 ([vim-go] gopls server [the first daemon process])
PID 26(coc) create PID 60 (coc-go gopls client), PID 60 creaet PID 93 that is the problem, PID 60 create a new gopls server [the second daemon process], instead of share the PID 73

recently i updated coc-go. before update the coc-go behavior is normal. see #76 Top output.

Mem: 1447060K used, 4646252K free, 824K shrd, 35144K buff, 455068K cached
CPU:   0% usr   1% sys   0% nic  98% idle   0% io   0% irq   0% sirq
Load average: 0.26 0.31 0.21 2/485 901
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
   93    60 ide      S     975m  16%   1   0% /go/bin/gopls serve -listen unix;/tmp/vObPKPj/gopls-0285b6-daemon.shared -listen.timeout 1m0s
   26    25 ide      S     291m   5%   3   0% node --no-warnings /home/ide/.vim/plugged/coc.nvim/build/index.js
   37    25 ide      S     705m  12%   3   0% /go/bin/gopls -remote=auto
   60    26 ide      S     705m  12%   2   0% /go/bin/gopls -remote auto -logfile /tmp/gopls.log
   73    37 ide      S     909m  15%   1   0% /go/bin/gopls serve -listen unix;/tmp/gopls-0285b6-daemon.shared -listen.timeout 1m0s
   25    12 ide      S    11672   0%   3   0% vim
   12     0 ide      S     2420   0%   0   0% bash
  901     6 ide      R     1580   0%   0   0% top

Wrong default path to gopls

I don't know if this is particular to me but the default bin dir that this extension installs to is ~/.config/coc/extensions/coc-go-data/bin, while by default the extension is looking at ~/.config/coc/go/bin.

client coc abnormal exit with: 7

Since I've updated to the latest version of coc-go whenever I open a go file I get a red bar saying client coc abnormal exit with: 7.

The output of CoCInfo

## versions

vim version: VIM - Vi IMproved 8.2 8021150
node version: v14.5.0
coc.nvim version: 0.0.78-449dcad0b2
coc.nvim directory: ~/.vim/bundle/coc.nvim
term: dumb
platform: darwin

## Output channel: explorer


## Output channel: git

Looking for git in: git
> git rev-parse --show-toplevel
resolved root: ~/workingCopies/src/github.com/luisdavim/dotfiles

## Output channel: prettier


## Output channel: snippets

[Info 20:10:24] Using ultisnips directories: UltiSnips gosnippets/UltiSnips ~/.config/coc/ultisnips
[Info 20:10:24] Using ultisnips python command: pyx

## Output channel: highlight

[Info  - 20:10:24] Highlight server running in node v14.5.0

slow completion with a huge int

this is really awkward, only happens in go files so I think the problem is with coc-go but I'm not sure

neovim profile:

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
   35              7.631803  coc#util#get_complete_option()
    1              3.775308  <SNR>77_get_syn_name()
  168              0.399935  provider#python3#Call()
  166              0.384328  UltiSnips#TrackChange()
   47              0.162960  <SNR>91_SynAt()
  551   0.065846   0.062674  WebDevIconsGetFileTypeSymbol()
  535   0.167857   0.044961  airline#extensions#branch#head()
  535   0.054190   0.044554  airline#extensions#whitespace#check()
  535   0.106869   0.043092  airline#check_mode()
  535   0.037835   0.032390  <SNR>151_update_untracked()
 4742              0.029826  airline#util#winwidth()
 1070              0.027899  airline#extensions#coc#get()
 3745              0.027892  airline#util#append()
 2140   0.038742   0.024786  airline#util#shorten()
  535   0.045344   0.021928  airline#extensions#hunks#get_hunks()
 4815   0.027279   0.020855  airline#util#wrap()
  535   0.021458   0.018819  <SNR>151_update_hg_branch()
  535   0.080338   0.018183  <SNR>151_update_branch()
  535   0.040697   0.016868  <SNR>151_update_git_branch()
  441   0.033825   0.015699  airline#highlighter#get_highlight()

sample go file for issue:

package main

import "fmt"

func main() {
	fmt.Println(3727382783237273287) <starts to get slow>
}

Simply keep typing integers until it gets really, really slow.

Loaded but no commands or help

When I run CocList extensions, it shows as activated, but it doesn't give any popups, help whatsoever. Any clue what I might be doing wrong?
This is my config:

{
	"go": {
		"enable": true,
		"goplsPath": "gopls",
		"goplsOptions": {
			"completeUnimported": true
		}
	}
}

Using it on NixOS. Maybe someone has experience. Never used coc before, and only have coc-nvim, coc-go, coc-json installed, using no config for Neovim, 100% plain.

Rejection 'workspaceFolders'

Issue:

[coc.nvim] Server languageserver.go failed to start: Launching server "languageserver.go" using command gopls failed.
[coc.nvim]: UnhandledRejection: TypeError: Cannot read property 'workspaceFolders' of undefined
[coc.nvim]: Uncaught exception: Error: process.exit() is not allowed in extension sandbox
[coc.nvim]: /home/anesovic/.config/coc/extensions/node_modules/coc-sql/lib/index.js:153556 client coc abnormal exit with: 7

I've tried suggested workarounds. Ie.
PlugUpdate & CocUpdate
Also, my current coc-settings.json:

{
    "coc.preferences.formatOnSaveFiletypes": [
        "go",
        "markdown",
        "javascript"
    ],
    "languageserver": {
        "go": {
            "command": "gopls",
            "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
            "filetypes": ["go"],
            "initializationOptions": {
                "usePlaceholders": true
            },
            "disabled": {
                "workspaceFolders": false
            }
        }
    }
}

Could someone recommend anything else I could try?

Provide go.install.tools

Hi, this extension provides a few commands to install/update individual tools it depends on, it would be nice to have a command that would install or update all of them in one go.

Add missing imports on save not working

Hi there,
After installing coc-go and gopls, auto-importing didn't work on my nvim.

I added this line below to my nvim init.vim which wasn't working:

autocmd BufWritePre *.go :CocCommand editor.action.organizeImport 

But I've found a solution in gopls docs for coc.nvim which is working well.
Added line below to my nvim init.vim:

autocmd BufWritePre *.go :call CocAction('runCommand', 'editor.action.organizeImport')

Autocompletion and help "windows" overlap…

I install vim-go as well as coc-go and I am getting this weird behaviour:

screenshot

The "windows" overlap which make it rather difficult to see what is going on.

What am I doing wrong?

UnhandledRejection: ENOENT: no such file or directory

just try coc-go after installing by :CocInstall coc-go
it seem like the #29 didn't fix the problem completely

  • os: macOS Mojave
  • error stack trace messages:
Error: ENOENT: no such file or directory, mkdir '/Users/quan.luu/.config/coc/extensions/coc-go-data/bin'
    at Object.fs.mkdirSync (fs.js:885:18)
    at Promise (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:19:26)
    at new Promise (<anonymous>)
    at Object.configDir (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:17:12)
    at goBinPath (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:32:47)
    at goBinExists (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:47:23)
    at Object.installGoBin (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:13:25)
    at registerTest (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/extension.js:55:24)
    at Object.activate (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/extension.js:19:5)
    at Object.activate (/Users/quan.luu/.config/nvim/plugged/coc.nvim/build/index.js:36191:57)
[coc.nvim] error: UnhandledRejection: ENOENT: no such file or directory, mkdir '/Users/quan.luu/.config/coc/extensions/coc-go-data/bin'
Error: ENOENT: no such file or directory, mkdir '/Users/quan.luu/.config/coc/extensions/coc-go-data/bin'
    at Object.fs.mkdirSync (fs.js:885:18)
    at Promise (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:19:26)
    at new Promise (<anonymous>)
    at Object.configDir (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:17:12)
    at goBinPath (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:32:47)
    at goBinExists (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:47:23)
    at Object.installGoBin (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:13:25)
    at registerTags (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/extension.js:61:24)
    at Object.activate (/Users/quan.luu/.config/coc/extensions/node_modules/coc-go/lib/extension.js:20:5)
    at Object.activate (/Users/quan.luu/.config/nvim/plugged/coc.nvim/build/index.js:36191:57)```

Does not install on Windows

[coc.nvim] Error: exited with 1
Error: Command failed: set GOBIN=C:\Users\dakyskye\AppData\Local\coc\extensions\coc-go-data\bin & set GOPATH=C:\Users\dakyskye\AppData\Local\coc\extensions\coc-go-data\tools & set GO111MODULE=on & go get golang.org/x/tools/gopls@latest
go: unknown environment setting GO111MODULE=on
go: unknown environment setting GO111MODULE=on

Error on applyEdits: Create document file: ..... timeout after 1s

Hi, with coc.nvim & coc-go I'm experiencing this:

Peek 2020-07-15 20-27

I called coc-rename, it throwed an error of timeout of 1 second

Any idea on how to fix it?

Environment

  • Linux Mint v20
  • neovim 5
  • coc.nvim latest
  • coc-go latest

coc-settings.json
image

Go version
go version go1.14.4 linux/amd64

Gopls version
golang.org/x/tools/gopls 0.4.1
golang.org/x/tools/[email protected] h1:0e3BPxGV4B3cd0zdMuccwW72SgmHp92lAjOyxX/ScAw=

You are neither in a module nor in your GOPATH error

I've already opened that issue on golang section:
golang/go#38720
in two words - it's not a gopls's fauls.

I reinstalled everything anew, use clean and small vimrc and got this error anyway.
Is there a way to disable this error (even using some harsh methods like disabling all errors from LS)?

Autocompletion, Linting Issue

This may be a GOPATH issue, because I am using the same vimrc on two different machines (one work machine, one personal) and coc-go isn't working on one of them. I don't see any documentation to troubleshoot this within vim though. I can see no completions found using workspace.showOutput. Can someone tell me what to check? Also, once I get this working, is there a setting where I can disable autocomplete and only use the lint function?

vim

VIM - Vi IMproved 8.1

Services

* go [running] go

Sources

* go [LS] 99 go

Version

[coc.nvim] Version: coc-go 0.8.0; gopls 0.4.1

go env

$ go env
GOBIN=""
GOPATH="<omitted for security>/go"

<output omitted for brevity>

Occur 'executing job failed: No such file or directory' error when open a Go file in Vim

I am newer for coc.nvim and I got the latest version coc.nvim and install coc-go using :CocInstall coc-go

But I got executing job failed: No such file or directory error message after installed success.

When I use :CocInfo got the output below:

[Info  - 11:36:08 AM] go/packages.Load
	packages = 1

## Output channel: go

[Error  - 11:36:08 AM] Starting client failed: 
TypeError: Cannot read property 'reader' of undefined
    at /Users/HackerZ/.vim/plugged/coc.nvim/build/index.js:78637:48

I think something happened when coc-go attempt to install gopls or gomodifytags into ~/.config/coc/extensions/coc-go-data/bin.

Look forward to your reply, thanks.

Disable workspace folders

Hi 👋 thanks for this great extension.

Currently I work in quite a large monorepo and gopls doesn't seem to be able to handle this golang/go#37670 for example documents that. I've found that disabling the workspace seems to improve this ie. using

  "languageserver": {
    "golang": {
      "command": "gopls",
      "rootPatterns": ["go.mod"],
      "disableWorkspaceFolders": true, <----- this option
      "filetypes": ["go"]
    }
  }

Is there any way to pass this flag to coc-go I quite like the added functionality it provides like snippets, tag and test generation etc. but till gopls solve the issue with large monorepos I can't run gopls without that option.

Error on initial go tools installation on windows

Hi everyone

i ran into error when coc-go executes its initial go tools installation in the folder ~\AppData\Local\coc\extensions\coc-go-data. I was checking code out and i found the line:

const cmd = `env GOBIN=${gobin} GOPATH=${gopath} GO111MODULE=on go ${args}`

executes env command that windows does not provide. I have solved this issue by implementing a
env equivalent functionality on windows. I will open a pull request with the solution.

Versions

vim version: NVIM v0.4.3
node version: v12.8.0
coc.nvim version: 0.0.77-817efd5108
term: vtpcon - PowerShell 7
platform: win32

Log:
[coc.nvim]Error: exited with 1 Error: Command failed: env GOBIN=~\AppData\Local\coc\extensions\coc-go-data\bin GOPATH=~\AppData\Local\coc\extensions\coc-go-data\tools GO111MODULE=on go get github.com/cweill/gotests/...@latest

Screenshots

image

coc-go and gopls

I am attempting to use gopls with coc-go. I do have followed all documentation so far.

in testing with some files I see this in CocInfo

54 [Info - 12:22:07 PM] 2019/12/31 12:22:07 using the -modfile flag is disabled
55 directory = /Users/luis/code/github/luis/terraform-provider-google
56 [Info - 12:22:08 PM] 2019/12/31 12:22:08 go/packages.Load
57 query = ./...
58 packages = 6
59 2019/12/31 12:22:10 no diagnostics: context canceled
60 URI = file:///Users/luis/code/github/luis/terraform-provider-google/version/version.go
61 2019/12/31 12:22:10 no diagnostics: context canceled
62 URI = file:///Users/luis/code/github/luis/terraform-provider-google/google/access_context_manager_operation.go
63 2019/12/31 12:22:10 no diagnostics: context canceled
64 URI = file:///Users/luis/Library/Caches/go-build/b6/b66be15d9a09b2f7b4a4cf5d9c5ccc7151abd3a7b1939d39e0d04cecec0d86fd-d
65 2019/12/31 12:22:10 no diagnostics: context canceled
66 URI = file:///Users/luis/code/github/luis/terraform-provider-google/google/access_context_manager_operation.go
67 [Error - 12:22:10 PM] 2019/12/31 12:22:10 no diagnostics: context canceled
68 URI = file:///Users/luis/code/github/luis/terraform-provider-google/version/version.go
69 [Error - 12:22:10 PM] 2019/12/31 12:22:10 no diagnostics: context canceled
70 URI = file:///Users/luis/Library/Caches/go-build/b6/b66be15d9a09b2f7b4a4cf5d9c5ccc7151abd3a7b1939d39e0d04cecec0d86fd-d
71 [Error - 12:22:10 PM] 2019/12/31 12:22:10 no diagnostics: context canceled
72 URI = file:///Users/luis/code/github/luis/terraform-provider-google/google/access_context_manager_operation.go
73 [Error - 12:22:10 PM] 2019/12/31 12:22:10 no diagnostics: context canceled
74 URI = file:///Users/luis/code/github/luis/terraform-provider-google/google/access_context_manager_operation.go
75 2019/12/31 12:22:12 : context canceled
76 [Error - 12:22:12 PM] 2019/12/31 12:22:12 : context canceled

When I am in my file I cannot seem to trigger any gopls based completions.

I have installed with CocInstall coc-go

there are no errors In terms of extension installation. I'd love to get this documented so someone else doesn't run into this. Is there anything I could provide that would help?

error loading workspace folders after relative cd

Result from CocInfo

## versions

vim version: VIM - Vi IMproved 8.2 8020491
node version: v13.13.0
coc.nvim version: 0.0.78-3f305ac739
term: dumb
platform: freebsd

## Output channel: go

[Info  - 1:42:02 AM] 2020/05/14 01:42:02 Build info
----------
golang.org/x/tools/gopls 0.4.0
    golang.org/x/tools/[email protected] h1:G4+YP9kaV4dJb79J5MobyApxX493Qa6VoiTceUmxqik=
    github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/[email protected] h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
    golang.org/x/[email protected] h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
    golang.org/x/[email protected] h1:DUwLyMDMUauGMd9kSLIlhhYJNELm06HuxeBdkFkeax4=
    golang.org/x/[email protected] h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/[email protected] h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=
    mvdan.cc/xurls/[email protected] h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info
-------
go version go1.13.5 freebsd/amd64

Describe the bug

when opening vim with no command-line arguments, using :cd to change to a directory without a leading /, and opening a Go file, I get an error like the following:

[coc.nvim] Error loading workspace folders (expected 1, got 0)
failed to load view for file:///.gopkg/src/github.com/jeff-blank/wg: err: chdir /.gopkg/src/github.com/jeff-blank/wg: no such file or directory: stderr:

the problem does not occur when opening a go file in the current directory or with an absolute or relative path to the go file, only when issuing a :cd to a relative path.

Reproduce the bug

  • Create file mini.vim with:

    set nocompatible
    set runtimepath^=/path/to/coc.nvim
    filetype plugin indent on
    syntax on
    set hidden
  • Start vim with command: vim -u mini.vim

  • enter cd <directory>, where directory exists and is a relative path (does not begin with /).

  • enter :e file.go. this issue occurs whether the file exists or not.

You are neither in a module nor in your GOPATH

I use coc-go and vim-go ,

in vim-go

let g:go_autodetect_gopath = 1

it auto set gopath, so it always happen "You are neither in a module nor in your GOPATH " but run the file no need do anything

I saw error #77 , add a go.mod works

but can you add this feture auto use default gopath and the go_autodetect_gopath ?

Delay before initializing compared to "languageserver" definition

I've noticed compared to running the usual coc.nvim gopls configuration:

"languageserver": {
    "golang": {
      "command": "gopls",
      "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
      "filetypes": ["go"],
      "initializationOptions": {
        "usePlaceholders": true
      }
    }
  }

This takes quite a long time 10-20s to initialize and populate the completion popup, it will only show the universal completions [B] [buffer] [A] [around] [F] [file] by keywords (NOTE: I use the "suggest.autoTrigger": "none" with the tab mappings btw.

Additional question regarding this plugin
I'd also appreciate if you could clarify this extension. I'm new to both coc.nvim, languageservers, I've transitioned to coc.nvim just recently.

  1. As I understand it and from reading all the issues here, it is a wrapper/extension around the gopls language server - and hence the "languageserver" option isn't necessary anymore (Please confirm?)

  2. Should more or less work out of the box after :CocInstall coc-go without further configuration needed.

  3. Would you recommend something else alongside it? I'm mainly interested in completion, imports, snippets for my languages and this seems to simplify the whole stack quite a bit which is just awesome 🎉 🌟

Thanks for your effort btw, I greatly appreciate it, add it here when you feel like it 👍 https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions#implemented-coc-extensions

Gives error cannot read property 'workspaceFolders' of undefined

Hi, I'm getting the following error:

2020-07-10T11:34:08.217 ERROR (pid:509699) [server] - unhandledRejection  Promise {
  <rejected> TypeError: Cannot read property 'workspaceFolders' of undefined
      at registerGopls (/home/farzad/.config/coc/extensions/node_modules/coc-go/lib/extension.js:44:49)
} TypeError: Cannot read property 'workspaceFolders' of undefined
    at registerGopls (/home/farzad/.config/coc/extensions/node_modules/coc-go/lib/extension.js:44:49)

I think it's because of change recently added that tries to read config.disable.workspaceFolders here (I think)

Command for opening suggested documentation

gopls suggests documentation for pkg.go.dev, however sometimes links are wrapped to newlines which makes them hard to open in the browser

wrapped

I'd like to skip clicking the link at all and just run a CocCommand (which I can bind to a key) to run xdg-open on the link and show it in my browser

### Top output

For impatient reader

visit golangIDE, and pull the image. it contains everything you need to develop golang with vim.

%docker pull ericwq057/golangide:v0.2.3-alpine

Setup shared gopls "daemon" process ~ automatic way

@rydesun @ygworldr
thanks for your post, there does exist another way to setup a shared gopls "daemon" process. according to the Running gopls as a daemon and my verificaiton. this method does not require to start a standalone gopls process separately. gopls already support this kind of scenario. see the following.

Action: config coc-setting.json for coc-go, nothing to do with vim-go

{
  "go.goplsArgs": ["-remote=auto", "-logfile", "/tmp/gopls.log"],
  "go.goplsPath": "/home/ide/go/bin/gopls",
}
  • the 1st thing is the go.goplsPath part. you need to use the absolute path to specify the gopls, otherwise it might use different gopls version, like coc/extensions/coc-go-data/bin/gopls. please change it to your gopls install path.
  • the 2nd thing is the go.goplsArgs part. you need to provide the -remote=auto args, because that is what gopls required. i add the -logfile args to help us identify gopls process. see bellow.
  • do NOT perform any special gopls configuration for vim-go, just leave it. in vim-go gopls will use remote=auto by default. that is enough for our purpose.

@josa42 maybe you can consider providing some features to find the gopls path and provide -remote=auto automatically in coc-go.

Caution: don't config languageserver in coc-setting.json and install coc-go at the same time

if you config languageserver in coc-setting.json, and instal coc-go, just as i did before. you will get into trouble. just install coc-go is enough. if you do both thing, you will start two(maybe more) gopls process by coc. that will occupied double memory than you expect.

Top output

Mem: 3683700K used, 4473996K free, 820K shrd, 306808K buff, 2000004K cached
CPU:   0% usr   1% sys   0% nic  98% idle   0% io   0% irq   0% sirq
Load average: 0.46 0.36 0.27 8/490 920
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  616   588 ide      S    1309m  16%   2   0% /home/ide/go/bin/gopls serve -listen unix;/tmp/gopls-0285b6-daemon.shared -listen.timeout 1m0s
  588   580 ide      S     705m   9%   2   0% /home/ide/go/bin/gopls -remote=auto
  625   581 ide      S     704m   9%   0   0% /home/ide/go/bin/gopls -remote=auto -logfile /tmp/gopls.log
  581   580 ide      S     264m   3%   2   0% node --no-warnings /home/ide/.vim/pack/coc/start/coc.nvim-0.0.78/build/index.js
  197    26 root     R     1584   0%   1   0% top
  580     6 ide      S     8976   0%   3   0% vim clientconn.go
    6     0 ide      S     2424   0%   0   0% bash
   26     0 root     S     2412   0%   0   0% bash
    1     0 ide      S     2408   0%   2   0% /bin/bash
  • shared gopls "daemon" process: PID=616, occupied 1.3G VSZ mem.
  • a gopls sidecar process (start by coc-go ): PID=625, occupied 704m VSZ mem. we can identified it by -logfile /tmp/gopls.log args.
  • a gopls sidecar process (start by vim-go): PID=588, occupied 705m VSZ mem.

Analysis

from the above information, we can conclude that:

  • vim-go first start gopls with the default args "-remote=auto". PID=588 the sidecar process
  • PID=588 start the shared gopls "daemon" process. PID=616
  • coc-go start gopls with the custom args " -remote=auto -logfile /tmp/gopls.log". PID=625 the sidecar process

that above process is exactly what gopls describe in its document.

@rydesun thanks for your second post!

VSZ ? 704M explanation

Don't be confused with the 704m displayed by top command. Actually each sidecar process only occupied 20M mem. In my case the daemon process occupied 2.1G mem. two sidecar process occupied 40M mem.

VSZ: How much virtual memory the process is using.
RES: How much physical RAM the process is using, measured in kilobytes.

you can use htop command to see the detail, see using htop and install htop for detail

Originally posted by @ericwq in #76 (comment)

Add information on interaction with vim-go

vim-go is an extremely popular vim/nvim plugin. Maybe it would be nice to elaborate on the interaction between vim-go and coc-go?

I use vim-go and coc, it would be nice to have this info on Readme.md

Build Tag support

I've been happily using this plugin for quite a while, but I have not been able to get it to work with build tags. Based on this issue I've been added the following options to my coc config:

{
  "go.goplsOptions": {
    "buildFlags": ["-tags=integration"],
    "env": {
      "GOFLAGS": "-tags=integration"
    }
  },
}

Note that everything works fine when I either export GOFLAGS="-tags=integration" and then run neovim, but, unfortunately, that breaks some vim-go functionality, such as running tests so its not a permanent solution.

Here's the output of CocInfo (with a few things redacted)

## versions

vim version: NVIM v0.5.0-nightly-754-g1ff5b60cb
node version: v13.5.0
coc.nvim version: 0.0.74-db5ffd2ff0
term: iTerm.app
platform: darwin

## Messages
vim-go: initialized gopls
"~/.config/nvim/coc-settings.json" 45L, 1051C written
6 lines yanked into "+
## Output channel: prettier


## Output channel: go

[Info  - 11:29:59 AM] 26.620059ms for GOROOT= GOPATH=/Users/rking/go GO111MODULE= PWD=/Users/rking/Work/tremor/api.git go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "builtin", stderr: <<>>

[Info  - 11:29:59 AM] 44.302184ms for GOROOT= GOPATH=/Users/rking/go GO111MODULE= PWD=/Users/rking/Work/tremor/api.git go "list" "-m" "-json" "all", stderr: <<>>

[Info  - 11:29:59 AM] Build info
----------
golang.org/x/tools/cmd/gopls v0.1.3-cmd.gopls
    golang.org/x/[email protected] h1:nQv5Lx4ucsmk8T4jkEQKJu7YLkYXy/PLoZgTpnIrkuI=
    golang.org/x/[email protected] h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/[email protected] h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=

Go info
-------
go version go1.13.5 darwin/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/rking/go/bin"
GOCACHE="/Users/rking/Library/Caches/go-build"
GOENV="/Users/rking/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY="REDACTEDt"
GONOSUMDB="REDACTED"
GOOS="darwin"
GOPATH="/Users/rking/go"
GOPRIVATE="REDACTED"
GOPROXY="https://goproxy.io,direct"
GOROOT="/usr/local/Cellar/go/1.13.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/rking/Work/tremor/api.git/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4t/tzg1d66j1_5cj7l2nrmtzyrr0000gp/T/go-build603999447=/tmp/go-build -gno-record-gcc-switches -fno-common"

[Info  - 11:29:59 AM] 38.82334ms for GOROOT= GOPATH=/Users/rking/go GO111MODULE= PWD=/Users/rking/Work/tremor/api.git go "list" "-m" "-json" "all", stderr: <<>>

[Info  - 11:30:00 AM] 189.108772ms for GOROOT= GOPATH=/Users/rking/go GO111MODULE= PWD=/Users/rking/Work/my/proj.git go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/rking/Work/my/proj.git/internal/mypkg", stderr: <<>>

[Error  - 11:30:00 AM] unable to check package: go/packages.Load: no packages found for /Users/rking/Work/tremor/api.git/internal/workflow/integration_test.go
	file = file:///Users/rking/Work/my/proj.git/internal/mypkg/integration_test.go
[Info  - 11:30:00 AM] 37.625577ms for GOROOT= GOPATH=/Users/rking/go GO111MODULE= PWD=/Users/rking/Work/my/proj.git go "list" "-m" "-json" "all", stderr: <<>>

[Info  - 11:30:00 AM] 193.395945ms for GOROOT= GOPATH=/Users/rking/go GO111MODULE= PWD=/Users/rking/Work/tremor/api.git go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/rking/Work/my/proj.git/internal/mypkg", stderr: <<>>

[Error  - 11:30:00 AM] unable to check package: go/packages.Load: no packages found for /Users/rking/Work/my/proj.git/internal/mypkg/integration_test.go
	file = file:///Users/rking/Work/my/proj.git/internal/mypkg/integration_test.go

Organize import action not working

Hi, I'm having issues with the editor.action.organizeImport action. I tried both by call (as documented in README) :call CocAction('runCommand', 'editor.action.organizeImport') and with :CocCommand editor.action.organizeImport, but it always fails with an error: [coc.nvim] Organize import action not found.. Has something changed since the documentation has been written or am I doing something wrong?

Two gopls listen daemons are running

Hello, I am trying the latest master with coc.nvim and vim-go. My ps aux | gopls shows two listening daemons

user         15831   0.0  1.2  5211264 197320   ??  Ss   11:19AM   0:02.69 /Users/user/dev/go/bin/gopls serve -listen unix;/tmp/gopls-0164bc-daemon.user -listen.timeout 1m0s
user         15812   0.0  0.1  5063760  17056   ??  S    11:19AM   0:00.11 /Users/user/dev/go/bin/gopls -remote=auto -logfile /tmp/gopls.log
user         15809   0.0  1.1  5187584 185964   ??  Ss   11:19AM   0:02.69 /Users/user/dev/go/bin/gopls serve -listen unix;/var/folders/vt/d011vy4s26540hptndzy5bd5g9m047/T/gopls-0164bc-daemon.user -listen.timeout 1m0s
user         15799   0.0  0.1  5007452  16884   ??  Ss   11:19AM   0:00.07 /Users/user/dev/go/bin/gopls -remote=auto -logfile /tmp/gopls.log

My ~/.config/nvim/coc-settings.json looks like

{
   "codeLens.enable": true,
  "go.goplsArgs": ["-remote=auto", "-logfile", "/tmp/gopls.log"],
  "go.goplsPath": "/Users/user/dev/go/bin/gopls",
   "suggest.noselect": false
 }

My vim-go settings has these gopls settings

let g:go_gopls_options = ['-remote=auto','-logfile','/tmp/gopls.log']

Weird error messages

Hello.
I'm having problems with the go linter, or error detection or however you want to call it.
It complaints about characters that do not exist, and asks for things that make no sense (like a ;on a structure list of fields).

Result from CocInfo

versions

vim version: NVIM v0.4.3
node version: v8.15.0
coc.nvim version: 0.0.75-d5e12d81b2
term: iTerm.app
platform: darwin

Some of the logs from the LSP:

[Error  - 13:28:51] 2020/03/20 13:28:51 unable to compute error positions: no file for  in package gitlab.com/pentoapp/pento/pkg/graphql/uk/resolver
	package = gitlab.com/pentoapp/pento/pkg/graphql/uk/resolver
2020/03/20 13:28:51 unable to compute error positions: no file for  in package gitlab.com/pentoapp/pento/pkg/graphql/uk/resolver
	package = gitlab.com/pentoapp/pento/pkg/graphql/uk/resolver
[Error  - 13:28:51] 2020/03/20 13:28:51 unable to compute error positions: no file for  in package gitlab.com/pentoapp/pento/pkg/graphql/uk/resolver
	package = gitlab.com/pentoapp/pento/pkg/graphql/uk/resolver
2020/03/20 13:28:53 : updateOverlays: saving file:///Users/danielo/mega/trabajo/GIT/pento/Pento/pkg/graphql/uk/resolver/employeeMutations.go at version 69, currently at 52
[Error  - 13:28:53] 2020/03/20 13:28:53 : updateOverlays: saving file:///Users/danielo/mega/trabajo/GIT/pento/Pento/pkg/graphql/uk/resolver/employeeMutations.go at version 69, currently at 52
[Info  - 13:29:07] 2020/03/20 13:29:07 background imports cache refresh starting
[Info  - 13:29:07] 2020/03/20 13:29:07 background refresh finished after 864.883914ms
	Error = <nil>
2020/03/20 13:29:17 : updateOverlays: saving file:///Users/danielo/mega/trabajo/GIT/pento/Pento/pkg/graphql/uk/resolver/employeeMutations.go at version 70, currently at 53
[Error  - 13:29:17] 2020/03/20 13:29:17 : updateOverlays: saving file:///Users/danielo/mega/trabajo/GIT/pento/Pento/pkg/graphql/uk/resolver/employeeMutations.go at version 70, currently at 53

Screenshots

image

coc-go and vim-go sharing a gopls server woes.

I have been following this guide to get the gopls shared between coc-go and vim-go. Another user, in a different issue could not get it to work.

However, I think it should be possible! Here is my configuration.

In ~/.config/nvim/init.vim:

let g:go_gopls_enabled = 1
let g:go_gopls_options = ['-remote=auto']
let g:go_def_mode='gopls'
let g:go_info_mode='gopls'
let g:go_referrers_mode = 'gopls'

and .vim/coc-settings.json:

{
    "diagnostic.errorSign": "✖",
    "diagnostic.warningSign": "⚠",
    "diagnostic.infoSign": "ℹ",
    "diagnostic.hintSign": "➤",
    "diagnostic.checkCurrentLine": true,
    "suggest.floatEnable": false,
    "languageserver": {
        "golang": {
            "command": "gopls",
            "args": ["-remote=auto"],
            "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
            "filetypes": ["go"]
        }
    },
    "go.goplsOptions": {
        "go.goplsOptions": ["-remote=auto"]
  }
}

What am I not understanding and therefore doing wrong?

Trouble with the $HOME/.config/coc/extensions/coc-go-data/bin directory

I added the coc-go extension by calling :CocInstall coc-go. After opening a .go file, I am greeted with the following error:

  1 vim version: NVIM v0.4.2
  2 node version: v8.10.0
  3 coc.nvim version: 0.0.74-9796d96780
  4 term: screen-256color
  5 platform: linux
  6
  7 ## Messages
  8 [coc.nvim] error: UnhandledRejection: ENOENT: no such file or directory, mkdir '/home/stefan/.config/coc/extensions/coc-go-data/bin'
  9 Error: ENOENT: no such file or directory, mkdir '/home/stefan/.config/coc/extensions/coc-go-data/bin'
 10     at Object.fs.mkdirSync (fs.js:885:18)
 11     at Promise (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:19:26)
 12     at new Promise (<anonymous>)
 13     at Object.<anonymous> (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:18:16)
 14     at Generator.next (<anonymous>)
 15     at /home/stefan/.config/coc/extensions/node_modules/coc-go/node_modules/tslib/tslib.js:110:75
 16     at new Promise (<anonymous>)
 17     at Object.__awaiter (/home/stefan/.config/coc/extensions/node_modules/coc-go/node_modules/tslib/tslib.js:106:16)
 18     at Object.configDir (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:12:20)
 19     at Object.<anonymous> (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:35:51)

I manually ran a mkdir -p $HOME/.config/coc/extensions/coc-go-data/bin but that did not do the trick. The directory was properly created, but now things are failing because the directory already exists ...

  1
  2 vim version: NVIM v0.4.2
  3 node version: v8.10.0
  4 coc.nvim version: 0.0.74-9796d96780
  5 term: screen-256color
  6 platform: linux
  7
  8 ## Messages
  9 [coc.nvim] error: UnhandledRejection: EEXIST: file already exists, mkdir '/home/stefan/.config/coc/extensions/coc-go-data/bin'
 10 Error: EEXIST: file already exists, mkdir '/home/stefan/.config/coc/extensions/coc-go-data/bin'
 11     at Object.fs.mkdirSync (fs.js:885:18)
 12     at Promise (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:19:26)
 13     at new Promise (<anonymous>)
 14     at Object.<anonymous> (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:18:16)
 15     at Generator.next (<anonymous>)
 16     at /home/stefan/.config/coc/extensions/node_modules/coc-go/node_modules/tslib/tslib.js:110:75
 17     at new Promise (<anonymous>)
 18     at Object.__awaiter (/home/stefan/.config/coc/extensions/node_modules/coc-go/node_modules/tslib/tslib.js:106:16)
 19     at Object.configDir (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/config.js:12:20)
 20     at Object.<anonymous> (/home/stefan/.config/coc/extensions/node_modules/coc-go/lib/utils/tools.js:35:51)

I'm not sure how to get past this. Is this a bug or is there something odd with my install?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.