From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Emacs integrate with lsp-mode and lsp-wl integration. Date: Thu, 27 May 2021 13:03:06 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9095"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 27 07:04:11 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lm8Bn-00028o-2Q for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 27 May 2021 07:04:11 +0200 Original-Received: from localhost ([::1]:56582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm8Bm-0002gK-4y for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 27 May 2021 01:04:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm8B1-0002g1-0K for help-gnu-emacs@gnu.org; Thu, 27 May 2021 01:03:23 -0400 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:38555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm8Az-0000JJ-0O for help-gnu-emacs@gnu.org; Thu, 27 May 2021 01:03:22 -0400 Original-Received: by mail-lj1-x22f.google.com with SMTP id a4so4634480ljd.5 for ; Wed, 26 May 2021 22:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=IHeh43V+PUjDJwupEoSFHFjCi5WbK5w7WArGzj9nvxA=; b=GWBWdhxTa8ykqYIS9xvdHVI6r2H7XeRj3ETZPaFxf12UzujDKPtDJpW08Fmoz76Muu Q6G9XXCF+z47yHGKMLMXPn8fNp3WJGyiyEimaMBBaGbtXNr6Ft2Zy3h5xjVlCxLREpWw K7R1n45+nxWaLYjLHB/bCf6mQlB7vGqH0+ld4FI/QvaUmbw+W6FPsXPJ8leJfCIOXdF7 6Els11Wd//9DWWi/GFjy9SB4/TnLM/7NAnAiQ7Bun8VwXBjxWkCiX+WNY7oelh46CBw8 IhhJ3o17QDUdl+gEjIbs+Gb9Cvof6Vj3ooYtbyMSE0h8h3/HRgCCuGCKuVDjM02CbqhW TaEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IHeh43V+PUjDJwupEoSFHFjCi5WbK5w7WArGzj9nvxA=; b=qqtA8TJrYCU7AUK/ka+aa0ey6cZ9YuL4+C5aqQsiZAQnHmePAC/+4KlsQKIHYoYHtd AeRIwAM+Gfb/OUrDZS+giVL2EaWvjXdisVC6Aba8+zffmdnHX8OwgcLgDUVIcnbVSh1r RlaKR2UWODe1QyouMqlD9oWZ3pdwdHQVrbsWm9SEJofZUqscxr99prE+9ugpK5xUuAm/ 1+/WizlCEGfDg9JUmxl38eLNkJEa5ht6GTdECXdIrOMTGOtjlrSSfw831GDyd1FWWA+8 pum5EyG1rBsb0PUx5Ej3HPWsttHuu4gQvcmKK4LROAppmrk0FdVtFa4x/U0vsJu7378t Xx0g== X-Gm-Message-State: AOAM533+4HLeCUf//6bGxcyvtGcXKwJzgfPzykEv8ZKqwIueIUnE3m8Z 5exREV1zaqy08BZSSyNawU79GVTwQTUNk24fvMirdHBugZnGhfl7PPA= X-Google-Smtp-Source: ABdhPJwVABBvXktsuFNYfAf9BoefQ4j5LgJ2v+1huWcWDBr9XX2xqJ24QZevgWOc9ec4sL0SyQU9E6yN4hW9votgNL4= X-Received: by 2002:a05:651c:50c:: with SMTP id o12mr1135761ljp.287.1622091798286; Wed, 26 May 2021 22:03:18 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=hongyi.zhao@gmail.com; helo=mail-lj1-x22f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130251 Archived-At: On Ubuntu 20.04, I try to use the lsp-wl package (https://github.com/kenkangxgwe/lsp-wl) with Emacs as presented on . 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 : $ 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 as presented in the above-mentioned record. Any hints/comments for solving this problem will be highly appreciated. Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China