Skip to content

Commit bb9fce1

Browse files
committed
added: lsp-haskell-execute-code-action-add-signature
1 parent c7c7305 commit bb9fce1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

init.el

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,18 @@ python, ruby, rustはスネークケースを含むのでruby(pythonはrubyのal
11001100
;; フォーマッターをfourmoluにします。fourmoluのデフォルト値も気に入らないがカスタマイズ出来るだけマシ。
11011101
(lsp-haskell-formatting-provider . "fourmolu")
11021102
;; 補完時にスニペット展開(型が出てくるやつ)を行わないようにします。
1103-
(lsp-haskell-completion-snippets-on . nil))
1103+
(lsp-haskell-completion-snippets-on . nil)
1104+
:defun lsp-code-actions-at-point
1105+
:init
1106+
(defun lsp-haskell-execute-code-action-add-signature ()
1107+
"Execute code action of add signature."
1108+
(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)
1111+
(lsp-execute-code-action action)
1112+
(message "I Can't find add signature action for this point"))))
1113+
:bind (:haskell-mode-map
1114+
("C-c C-o" . lsp-haskell-execute-code-action-add-signature)))
11041115
(leaf haskell-customize
11051116
:init
11061117
(eval-and-compile

0 commit comments

Comments
 (0)