mac lsp-go (gopls 异常). mac Spotlight 打开的emacs . 打开go环境异常.shell 就没有问题

在mac上 使用聚焦搜索 emacs.app 打开应用. 打开go mod目录下的go文件. 提示: LSP :: The following servers support current file but do not have automatic installation configuration: gopls You may find the installation instructions at Languages - LSP Mode - LSP support for Emacs. (If you have already installed the server check lsp-log).

lsp-go功能未正常开启.

从zsh 中运行 emacs. 打开go mod目录下的go文件. 功能正常.如下

图片

请问这个是因为什么原因导致的?

系统:

macOS Catalina 版本 10.15.7 (19H2)

emacs 版本

➜ ~ emacs --version /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777 GNU Emacs 27.1 Copyright (C) 2020 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.

  (executable-find "gopls")

执行下看看,有没有值,感觉是 path 不对,可以参考下面的包

1 个赞

就是这个问题. 谢谢.

您好,我windows 环境也报了这个 LSP :: The following servers support current file but do not have automatic installation configuration: gopls You may find the installation instructions at https://emacs-lsp.github.io/lsp-mode/page/languages. (If you have already installed the server check lsp-log ).,请问(executable-find “gopls”) 这个怎么执行?

请问您是如何解决的呢?