Add highlight-numbers-mode to python & elisp
This commit is contained in:
parent
4aece988ff
commit
be46654629
2 changed files with 5 additions and 3 deletions
|
@ -24,7 +24,6 @@
|
||||||
(add-hook 'before-save-hook #'delete-trailing-whitespace nil t)
|
(add-hook 'before-save-hook #'delete-trailing-whitespace nil t)
|
||||||
|
|
||||||
(eldoc-mode +1)
|
(eldoc-mode +1)
|
||||||
(highlight-quoted-mode +1)
|
|
||||||
(auto-compile-on-save-mode +1)
|
(auto-compile-on-save-mode +1)
|
||||||
(rainbow-delimiters-mode +1)
|
(rainbow-delimiters-mode +1)
|
||||||
|
|
||||||
|
@ -32,6 +31,9 @@
|
||||||
(not (file-in-directory-p buffer-file-name doom-emacs-dir)))
|
(not (file-in-directory-p buffer-file-name doom-emacs-dir)))
|
||||||
(flycheck-mode +1))
|
(flycheck-mode +1))
|
||||||
|
|
||||||
|
;; improve fontification
|
||||||
|
(highlight-quoted-mode +1)
|
||||||
|
(highlight-numbers-mode +1)
|
||||||
(font-lock-add-keywords
|
(font-lock-add-keywords
|
||||||
nil `(;; Display "lambda" as λ
|
nil `(;; Display "lambda" as λ
|
||||||
("(\\(lambda\\)" (1 (ignore (compose-region (match-beginning 1) (match-end 1) ?λ #'decompose-region))))
|
("(\\(lambda\\)" (1 (ignore (compose-region (match-beginning 1) (match-end 1) ?λ #'decompose-region))))
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
python-indent-guess-indent-offset-verbose nil
|
python-indent-guess-indent-offset-verbose nil
|
||||||
python-shell-interpreter "python")
|
python-shell-interpreter "python")
|
||||||
|
|
||||||
(add-hook 'python-mode-hook #'flycheck-mode)
|
|
||||||
|
|
||||||
:config
|
:config
|
||||||
|
(add-hook! 'python-mode-hook #'(flycheck-mode highlight-numbers-mode))
|
||||||
|
|
||||||
(set! :repl 'python-mode #'+python/repl)
|
(set! :repl 'python-mode #'+python/repl)
|
||||||
(set! :electric 'python-mode :chars '(?:))
|
(set! :electric 'python-mode :chars '(?:))
|
||||||
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
|
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue