Merge pull request #3795 from mcbloch/develop

Add nim definition and documentation keybindings
This commit is contained in:
Henrik Lissner 2020-08-20 21:39:00 -04:00 committed by GitHub
commit 8d2ca9a93f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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