help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacs integrate with lsp-mode and lsp-wl integration.


From: Hongyi Zhao
Subject: Emacs integrate with lsp-mode and lsp-wl integration.
Date: Thu, 27 May 2021 13:03:06 +0800

On Ubuntu 20.04, I try to use the lsp-wl package
(https://github.com/kenkangxgwe/lsp-wl) with Emacs as presented on
<https://asciinema.org/a/yh7Pb5ymIdA7dAEWUW9yj2eIt>.

The corresponding settings in ~/.emacs.d/init.el are listed below:

(require 'lsp-mode)
(add-to-list 'lsp-language-id-configuration '(wolfram-mode . "Mathematica"))

(lsp-register-client
 (make-lsp-client :language-id 'wolfram
                  :new-connection (lsp-tcp-server-command
                                   (lambda (port)
                                     `("wolfram" ;; or "wolframscript"
                                       "-script" ;; or "-file"

"~/Public/repo/github.com/kenkangxgwe/lsp-wl.git/init.wls"
                                       ,(concat
                                         "--socket="
                                         (number-to-string port)
                                         ))))
                  :major-modes '(wolfram-mode)
                  :server-id 'lsp-wl
                  ))

But relevant packages, i.e., lsp-mode
(https://github.com/emacs-lsp/lsp-mode), wolfram-mode
(https://github.com/kawabata/wolfram-mode), projectile
(https://github.com/bbatsov/projectile), and dap-mode
(https://emacs-lsp.github.io/dap-mode) are all installed via melpa.

The corresponding settings are shown below:

(projectile-mode +1)
;; Recommended keymap prefix on macOS
;(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
;; Recommended keymap prefix on Windows/Linux
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)

(dap-mode 1)
;; The modes below are optional
(dap-ui-mode 1)
;; enables mouse hover support
(dap-tooltip-mode 1)
;; use tooltips for mouse hover
;; if it is not enabled `dap-mode' will use the minibuffer.
(tooltip-mode 1)
;; displays floating panel with debug buttons
;; requies emacs 26+
(dap-ui-controls-mode 1)


Then I try to open the following file with Emacs as done by the record
<https://asciinema.org/a/yh7Pb5ymIdA7dAEWUW9yj2eIt>:

$ emacs /home/werner/Public/repo/github.com/kenkangxgwe/lsp-wl.git/init.wls

Then, in Emcas, I run the following commands:

M-x wolfram-mode RET
M-x lsp RET

I see the following info in Messages buffer:

LSP :: init.wls not in project or it is blacklisted.

And I still can't access the corresponding capabilities supplied by
the plugin <https://github.com/kenkangxgwe/lsp-wl> as presented in the
above-mentioned record.

Any hints/comments for solving this problem will be highly appreciated.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



reply via email to

[Prev in Thread] Current Thread [Next in Thread]