我目前正在查看github配置文件,以找到一个lsp-mode和Erlang一起正常工作的示例。现在我遇到了一个在开始时出错的坏配置:
Server erlang-ls:176779 status:starting exited with status exit. Do you want to restart it? (y or n) y
LSP :: Restarting LSP in buffer example.erl
LSP :: Sending to process failed with the following error: Process erlang-ls not running
LSP :: Connected to [erlang-ls:176780 status:starting].
LSP :: erlang-ls has exited (exited abnormally with code 127)
以下是我目前的配置:
(use-package lsp-mode
:ensure t
:hook ((erlang-mode . lsp)
;; if you want which-key integration
(lsp-mode . lsp-enable-which-key-integration))
:commands lsp
:config
(setq lsp-erlang-server-path "/home/yk42bb/from_source/erlang_ls/_build/default/bin/erlang_ls")
(add-to-list 'exec-path "/home/yk42bb/from_source/erlang_ls/_build/default/bin"))
(use-package lsp-ui
:ensure t
:config
(define-key lsp-ui-mode-map [remap xref-find-definitions] #'lsp-ui-peek-find-definitions)
(define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references))
(use-package erlang
:ensure t
:mode "\\.erl\\'"
:config (erlang-mode))
(use-package company-erlang
:ensure t)
1条答案
按热度按时间nwlls2ji1#
原来,错误在于exec-path-from-shell以一种错误的方式加载了我的zsh配置,因为我没有用
[[ $TERM != "dumb" && ... ]]
注解掉powerlevel 9 k/powerlevel 10 k提示符。