Merge pull request #3795 from mcbloch/develop
Add nim definition and documentation keybindings
This commit is contained in:
commit
8d2ca9a93f
1 changed files with 11 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
;;; lang/nim/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! nim-mode
|
||||
(use-package! nim-mode
|
||||
:defer t
|
||||
:init
|
||||
(add-hook! 'nim-mode-hook
|
||||
(defun +nim-init-nimsuggest-mode-h ()
|
||||
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
||||
|
@ -19,9 +21,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