Skip to content

Commit c5967a8

Browse files
committed
fixed: lsp-haskell-execute-code-action-add-signature
[added: lsp-haskell-execute-code-action-add-signature by ncaq · Pull Request #129 · emacs-lsp/lsp-haskell](emacs-lsp/lsp-haskell#129)
1 parent bb9fce1 commit c5967a8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

init.el

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,12 +1104,15 @@ python, ruby, rustはスネークケースを含むのでruby(pythonはrubyのal
11041104
:defun lsp-code-actions-at-point
11051105
:init
11061106
(defun lsp-haskell-execute-code-action-add-signature ()
1107-
"Execute code action of add signature."
1107+
"Execute code action of add signature.
1108+
Add the type signature that GHC infers to the function located below the point."
11081109
(interactive)
1109-
(let ((action (seq-find (lambda (e) (string-prefix-p "add signature" (gethash "title" e))) (lsp-code-actions-at-point))))
1110-
(if (hash-table-p action)
1110+
(let ((action (seq-find
1111+
(lambda (e) (string-prefix-p "add signature" (lsp:code-action-title e)))
1112+
(lsp-code-actions-at-point))))
1113+
(if action
11111114
(lsp-execute-code-action action)
1112-
(message "I Can't find add signature action for this point"))))
1115+
(message "I can't find add signature action for this point"))))
11131116
:bind (:haskell-mode-map
11141117
("C-c C-o" . lsp-haskell-execute-code-action-add-signature)))
11151118
(leaf haskell-customize

0 commit comments

Comments
 (0)