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

lsp: cannot open .#abc.xyz file #11225

Closed
zhexuany opened this issue Aug 28, 2018 · 6 comments
Closed

lsp: cannot open .#abc.xyz file #11225

zhexuany opened this issue Aug 28, 2018 · 6 comments

Comments

@zhexuany
Copy link
Contributor

zhexuany commented Aug 28, 2018

If you are posting about a bug please close this issue and open a new one
using [SPC h I] or [M-m h I] (I = capital i) from within Spacemacs. If the
bug makes Spacemacs unusable, you can find the bug report template here
You can delete this message to start typing.

Description :octocat:

When use lsp with go mode, lsp often reports error messgae like the following:

Error from the Language Server: open ~/.#trace.go: no such file or directory (Unknown error) [10 times]
Error from the Language Server: no declaration found for _ (Unknown error)

Reproduction guide 🪲

  • Start Emacs
  • Open a go file and start to edit it, of course you need to make go mode enabled.

Observed behaviour: 👀 💔

  • Report Error message I provied above

Expected behaviour: ❤️ 😄

  • Work normally.

System Info 💻

  • OS: darwin
  • Emacs: 26.1
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. c122eb6)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: ivy
  • Layers:
(rust markdown lsp javascript osx ivy
      (c-c++ :variables c-c++-enable-clang-support t)
      auto-completion better-defaults emacs-lisp prodigy semantic python gtags ranger
      (vinegar :variables vinegar-reuse-dired-buffer t)
      (git :variables git-magit-status-fullscreen t magit-push-always-verify nil magit-save-repository-buffers 'dontask magit-revert-buffers 'silent magit-refs-show-commit-count 'all magit-revision-show-gravatars nil)
      github
      (version-control :variables version-control-diff-tool 'diff-hl)
      neotree
      (shell :variables shell-default-height 30 shell-default-position 'bottom)
      (syntax-checking :variables syntax-checking-enable-by-default nil)
      (spell-checking :variables spell-checking-enable-by-default nil)
      (ibuffer :variables ibuffer-group-buffers-by 'projects)
      version-control
      (go :variables go-use-gometalinter t go-backend 'lsp))
  • System configuration features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS

Backtrace 🐾

<<BACKTRACE IF RELEVANT>>
@vbauerster
Copy link

vbauerster commented Aug 29, 2018

After updating to latest go version 1.11, lsp autocompletion doesn't work at all, instead of autocompletion following error appears:
Screen_Shot_2018-08-29_at_12.54.08.png
PS: I've recompiled every go tool with latest go, before reporting.

@Compro-Prasad
Copy link
Contributor

Compro-Prasad commented Sep 2, 2018

@ljupchokotev @NerdsvilleCEO @fiveNinePlusR @Miciah .

@ljupchokotev
Copy link
Contributor

The gocode library which is used for autocompletion doesn't work with Go 1.11. There are issues about it on the gocode repository, more information can be found there.

@zhexuany
Copy link
Contributor Author

https://www.emacswiki.org/emacs/LockFiles this is the solution.

@zhexuany
Copy link
Contributor Author

@ljupchokotev I believe that is error caused by lsp-server rather than a gocode error. I am able to resolve this error by disable creating lock file.

@vbauerster
Copy link

Related emacs-lsp/lsp-mode#412

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

No branches or pull requests

4 participants