[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 0113f37 273/385: hsinspect should work on
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 0113f37 273/385: hsinspect should work on symbols with FQNs |
Date: |
Tue, 5 Oct 2021 23:59:46 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 0113f37ec9b9c626270079d5130d9f51d4bedb4e
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
hsinspect should work on symbols with FQNs
---
haskell-tng-hsinspect.el | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index b2602e2..a0452b2 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -20,7 +20,7 @@
"Consult the imports in scope and display the fully qualified
name of the symbol at point in the minibuffer."
(interactive) ;; TODO prefix should copy to kill ring
- (if-let* ((sym (symbol-name (symbol-at-point)))
+ (if-let* ((sym (haskell-tng--hsinspect-symbol-at-point))
(found (seq-find
(lambda (names) (member sym (seq-map #'cdr names)))
(haskell-tng--hsinspect-imports))))
@@ -31,6 +31,22 @@ name of the symbol at point in the minibuffer."
(error "hsinspect is not available")
(message "<not imported>"))))
+(defun haskell-tng--hsinspect-symbol-at-point ()
+ "A `symbol-at-point' that includes FQN parts."
+ (buffer-substring-no-properties
+ (save-excursion
+ (while ;; WORKAROUND non-greedy matches
+ (re-search-backward
+ (rx symbol-start (+ (| word (syntax symbol) ".")) point)
+ (line-beginning-position)
+ t))
+ (match-beginning 0))
+ (save-excursion
+ (re-search-forward
+ (rx point (+ (| word (syntax symbol) ".")) symbol-end)
+ (line-end-position) t)
+ (match-end 0))))
+
(defun haskell-tng--hsinspect-ghcflags ()
;; https://github.com/haskell/cabal/issues/6203
"Obtain the ghc flags for the current buffer"
- [nongnu] elpa/haskell-tng-mode 7ae3f46 244/385: more workarounds for hsinspect setup, (continued)
- [nongnu] elpa/haskell-tng-mode 7ae3f46 244/385: more workarounds for hsinspect setup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 494aef4 302/385: cache the results of hsinspect imports, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 598b372 288/385: typo, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e0fd8f4 303/385: abstract the hsinspect caching logic, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4dc6f76 313/385: fix hsinspect discoverability, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode eb4591f 287/385: document popup dependency, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 48729c8 308/385: more cache cleanups, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6299e6d 317/385: amazeballs idea, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aa9cdbb 226/385: hacky file-specific language extensions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a4f06f5 237/385: an idea, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0113f37 273/385: hsinspect should work on symbols with FQNs,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 06e4e76 245/385: support running scripts on nix, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3179294 267/385: rename ormolu command, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 388df13 282/385: refactor calls to hsinspect to allow for more callers, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 067e8a7 280/385: bugfix fontification of erroneous matches inside strings, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 224e955 307/385: add screencasts to the README, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b59ce04 356/385: improve testing, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ee1fb28 345/385: small cleanup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1310276 346/385: planning, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 09018bc 352/385: support hsinspect beta releases, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e73bc19 335/385: jump-to-definition, ELPA Syncer, 2021/10/06