emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/haskell-tng-mode aaf7c55 370/385: support for hsinspect-ls


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode aaf7c55 370/385: support for hsinspect-lsp
Date: Wed, 6 Oct 2021 00:00:06 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit aaf7c5560d8590fa240748bda0ae7539d8a0804f
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    support for hsinspect-lsp
---
 Cask                               |  1 +
 haskell-tng-extra-lsp-hsinspect.el | 33 +++++++++++++++++++++++++++++++++
 haskell-tng-extra-stack.el         |  3 ++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/Cask b/Cask
index 80cad22..f42d10e 100644
--- a/Cask
+++ b/Cask
@@ -29,6 +29,7 @@
  ;;(depends-on "elsa") ;; cask exec elsa FILE
  (depends-on "faceup") ;; no stable release
  (depends-on "ert-runner" "0.7.0")
+ (depends-on "lsp-mode" "6.3.1")
  (depends-on "shut-up" "0.3.2")
  (depends-on "projectile" "2.1.0")
  (depends-on "smartparens" "1.11.0")
diff --git a/haskell-tng-extra-lsp-hsinspect.el 
b/haskell-tng-extra-lsp-hsinspect.el
new file mode 100644
index 0000000..78bbead
--- /dev/null
+++ b/haskell-tng-extra-lsp-hsinspect.el
@@ -0,0 +1,33 @@
+;;; haskell-tng-extra-lsp-hsinspect.el --- support for hsinspect-lsp -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2020 Tseen She
+;; License: GPL 3 or any later version
+
+;;; Commentary:
+;;
+;;  This is only for developing and testing the `hsinspect-lsp' binary:
+;;  `haskell-tng-hsinspect' is a far superior way for users to interact with
+;;  `hsinspect'.
+;;
+;;; Code:
+
+(require 'lsp-mode)
+(require 'subr-x)
+
+(defcustom haskell-tng-lsp-hsinspect '("hsinspect-lsp")
+  "The command and args to launch the hsinspect language server."
+  :group 'haskell-tng
+  :type 'listp)
+
+(lsp-register-client
+ (make-lsp-client :new-connection (lsp-stdio-connection
+                                   (lambda () (string-join 
haskell-tng-lsp-hsinspect " ")))
+                  :major-modes '(haskell-tng-mode)
+                  :server-id 'hsinspect-lsp))
+
+(add-to-list
+ 'lsp-language-id-configuration
+ '(haskell-tng-mode . "haskell"))
+
+(provide 'haskell-tng-extra-lsp-hsinspect)
+;;; haskell-tng-extra-lsp-hsinspect.el ends here
diff --git a/haskell-tng-extra-stack.el b/haskell-tng-extra-stack.el
index 84dc218..50a4adb 100644
--- a/haskell-tng-extra-stack.el
+++ b/haskell-tng-extra-stack.el
@@ -18,7 +18,8 @@
  ;; https://stackoverflow.com/questions/58923819
  haskell-tng--hsinspect-which-hsinspect "stack build --silent hsinspect && 
stack exec --silent which -- hsinspect"
  haskell-tng--compile-history '("stack build --fast --no-interleaved-output 
--ghc-options=\"-j\" --no-run-tests"
-                                "stack build --fast --no-interleaved-output 
--ghc-options=\"-j\""))
+                                "stack build --fast --no-interleaved-output 
--ghc-options=\"-j\"")
+ haskell-tng-lsp-hsinspect '("hsinspect-lsp" "--stack"))
 
 (setq-default
  haskell-tng--compile-alt "stack clean"



reply via email to

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