Add definition and documentation keybindings
This commit is contained in:
parent
f6f90c9791
commit
fb4f5efb01
1 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
;;; lang/nim/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! nim-mode
|
||||
:init
|
||||
(add-hook! 'nim-mode-hook
|
||||
(defun +nim-init-nimsuggest-mode-h ()
|
||||
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
||||
|
@ -19,9 +20,16 @@ windows."
|
|||
:filter-return #'nimsuggest--get-temp-file-name
|
||||
(replace-regexp-in-string "[꞉* |<>\"?*]" "" path)))
|
||||
|
||||
:config
|
||||
(set-lookup-handlers! '(nim-mode nimsuggest-mode)
|
||||
:definition #'+nimsuggest-find-definition
|
||||
:documentation #'nimsuggest-show-doc)
|
||||
|
||||
(map! :localleader
|
||||
:map nim-mode-map
|
||||
"b" #'nim-compile))
|
||||
"b" #'nim-compile
|
||||
"h" #'nimsuggest-show-doc
|
||||
"d" #'nimsuggest-find-definition))
|
||||
|
||||
|
||||
(use-package! flycheck-nim
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue