[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode e6d8761 343/385: local jump-to-definition
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode e6d8761 343/385: local jump-to-definition should error |
Date: |
Wed, 6 Oct 2021 00:00:01 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit e6d8761a8c99a5cab1b1eef5b422dcc40208b6d0
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
local jump-to-definition should error
---
haskell-tng-extra-projectile.el | 4 +++-
haskell-tng-hsinspect.el | 14 ++++++++------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/haskell-tng-extra-projectile.el b/haskell-tng-extra-projectile.el
index 1beac1c..b427e35 100644
--- a/haskell-tng-extra-projectile.el
+++ b/haskell-tng-extra-projectile.el
@@ -11,12 +11,14 @@
;; TODO fix the haskell-stack detection to also include cabal
;; TODO populate the projectile compile/run/test commands
-;; TODO haskell-tng-jump-to-definition-fallback
(make-variable-buffer-local 'projectile-tags-command)
(add-hook
'haskell-tng-mode-hook
(lambda ()
+ ;; Excluding dist-newstyle means excluding git source deps and generated
+ ;; files, but also gives a bit of a speed boost since it will ignore
+ ;; directories containing object files.
(setq-local projectile-tags-command "fast-tags -Re --exclude=dist-newstyle
.")))
(provide 'haskell-tng-extra-projectile)
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index 9dcc74e..7cada29 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -18,7 +18,6 @@
(require 'subr-x)
(require 'tar-mode)
(require 'url)
-(require 'xref)
;; Popups are not supported in stock Emacs so an extension is necessary:
;; https://emacs.stackexchange.com/questions/53373
@@ -58,8 +57,8 @@ definition of the symbol in the build tool's source archive."
(index (haskell-tng--hsinspect-index alt))
;; TODO imports and index can be calculated in parallel
(sym (haskell-tng--hsinspect-symbol-at-point))
- (found (haskell-tng--hsinspect-qualify imports sym)))
- (pcase-let* ((`(,imported . ,name) (haskell-tng--string-split-last found
"."))
+ (qualified (haskell-tng--hsinspect-qualify imports sym)))
+ (pcase-let* ((`(,imported . ,name) (haskell-tng--string-split-last
qualified "."))
(`(,srcid . ,module) (haskell-tng--hsinspect-follow index nil
imported name))
(`(,pkg . _) (haskell-tng--hsinspect-index-get-module index
srcid module) )
(inplace (alist-get 'inplace pkg))
@@ -69,9 +68,12 @@ definition of the symbol in the build tool's source archive."
(mapconcat 'identity (split-string module (rx "."))
"/" )
".hs")))
(if inplace
- ;; TODO support local / git packages by consulting `plan.json'
- ;; TODO or should we error until it is supported properly?
- (xref-find-definitions name)
+ ;; TODO support local / git packages by consulting `plan.json'. Note
+ ;; this will only work properly if hsinspect includes all the
+ ;; unexported modules for inplace packages. It's starting to
+ ;; sound like a very complex feature... and perhaps not worth
+ ;; implementing given that TAGS would just great.
+ (error "%s is defined in a local package" qualified)
(when (not (file-exists-p tarball))
;; We can't expect stack to reveal source locations because it
;; obfuscates all downloads. Cabal has "cabal get" but it is broken.
- [nongnu] elpa/haskell-tng-mode 3ea52c1 341/385: special case jumping to inplace packages, (continued)
- [nongnu] elpa/haskell-tng-mode 3ea52c1 341/385: special case jumping to inplace packages, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4217d98 378/385: fixup! third party tools use project specific PATH, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f7f0e0f 383/385: moar extras, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2017d07 384/385: widen hsinspect range, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 083e80a 110/385: assert on alternative indentation order, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ec1ac46 361/385: document a bug, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4b598b2 377/385: third party tools use project specific PATH, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aaf7c55 370/385: support for hsinspect-lsp, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b3e6c9a 113/385: compilation mode regression tests vs haskell-mode, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 99a7f10 337/385: cleanup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e6d8761 343/385: local jump-to-definition should error,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode c31afdb 272/385: missing CPP case, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 85c4dd5 233/385: fix bugfix in goto-import, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5c157fb 255/385: rigid ormolu support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 64ec84d 260/385: if/then/else indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1d53572 243/385: bugfixes, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d1e599a 285/385: switch formatting backend based on project config, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fd06b8f 264/385: move haskell-tng-newline into the -extra package, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8ff79e7 247/385: allow parallelism, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4e2cf00 284/385: simplify the installation of hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1107e63 274/385: bump hsinspect, ELPA Syncer, 2021/10/06