diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/custom/my-eldoc.el | 18 | ||||
-rw-r--r-- | emacs/custom/my-flymake.el | 22 | ||||
-rw-r--r-- | emacs/custom/my-prog.el | 11 | ||||
-rw-r--r-- | emacs/init.el | 9 |
4 files changed, 45 insertions, 15 deletions
diff --git a/emacs/custom/my-eldoc.el b/emacs/custom/my-eldoc.el new file mode 100644 index 0000000..ff3dc0c --- /dev/null +++ b/emacs/custom/my-eldoc.el @@ -0,0 +1,18 @@ +;;; my-eldoc.el --- eldoc configuration -*- lexical-binding: t -*- +;; Author: Franck Cuny <franck@fcuny.net> + +;;; Commentary: + +;;; Code: + +(setq eldoc-idle-delay 1 + eldoc-documentation-strategy #'eldoc-documentation-default + eldoc-echo-area-prefer-doc-buffer 'maybe + eldoc-echo-area-use-multiline-p nil) + +(when (boundp eldoc-echo-area-display-truncation-message) + (setq eldoc-echo-area-display-truncation-message nil)) + +(provide 'my-eldoc) + +;;; my-eldoc.el ends here diff --git a/emacs/custom/my-flymake.el b/emacs/custom/my-flymake.el new file mode 100644 index 0000000..74ae98d --- /dev/null +++ b/emacs/custom/my-flymake.el @@ -0,0 +1,22 @@ +;;; my-flymake.el --- configure flymake -*- lexical-binding: t -*- +;; Author: Franck Cuny <franck@fcuny.net> + +;;; Commentary: + +;;; Code: + +(require 'flymake) + +(setq flymake-start-on-save-buffer t) +(setq elisp-flymake-byte-compile-load-path load-path) + +(define-key flymake-mode-map (kbd "C-c ! n") 'flymake-goto-next-error) +(define-key flymake-mode-map (kbd "C-c ! p") 'flymake-goto-prev-error) +(define-key flymake-mode-map (kbd "C-c ! d") 'flymake-show-diagnostics-buffer) + +(dolist (hook '(prog-mode-hook conf-mode-hook)) + (add-hook hook 'flymake-mode)) + +(provide 'my-flymake) + +;;; my-flymake.el ends here diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el index d11eebd..c20293e 100644 --- a/emacs/custom/my-prog.el +++ b/emacs/custom/my-prog.el @@ -19,17 +19,6 @@ ;; Jump to first error (customize-set-variable 'compilation-scroll-output 'first-error) -(require 'flymake) -(setq flymake-start-on-save-buffer t) -(setq elisp-flymake-byte-compile-load-path load-path) - -(define-key flymake-mode-map (kbd "C-c ! n") 'flymake-goto-next-error) -(define-key flymake-mode-map (kbd "C-c ! p") 'flymake-goto-prev-error) -(define-key flymake-mode-map (kbd "C-c ! d") 'flymake-show-diagnostics-buffer) - -(dolist (hook '(prog-mode-hook conf-mode-hook)) - (add-hook hook 'flymake-mode)) - ;; yasnippet is required to support place holders with eglot (dolist (hook '(prog-mode-hook conf-mode-hook org-mode-hook)) (add-hook hook 'yas-minor-mode)) diff --git a/emacs/init.el b/emacs/init.el index eec012e..def8ac1 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -43,18 +43,19 @@ (require 'my-text) (require 'my-git) (require 'my-org) -(require 'my-conf) -(require 'my-prog) (require 'my-eshell) (require 'my-tramp) (require 'my-elfeed) +(require 'my-flymake) +(require 'my-eldoc) +(require 'my-conf) +(require 'my-prog) (require 'my-tree-sitter) (require 'my-lsp) (require 'my-lang-go) -(require 'my-lang-python) -(require 'my-lang-rust) (require 'my-lang-nix) +(require 'my-lang-python) (require 'my-buffers) (require 'my-git-extra) |