forked from colonelpanic/dotfiles
Move theming stuff out of init.el and into custom. Make jedi use flat index for imenu.
This commit is contained in:
parent
4c68b4f2ae
commit
8ccc274c81
27
init.el
27
init.el
@ -335,7 +335,8 @@
|
|||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq jedi:complete-on-dot t)
|
(setq jedi:complete-on-dot t)
|
||||||
(setq jedi:install-imenu t))
|
(setq jedi:install-imenu t)
|
||||||
|
(setq jedi:imenu-create-index-function 'jedi:create-flat-imenu-index))
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind ("C-c g" . jedi:goto-definition))
|
:bind ("C-c g" . jedi:goto-definition))
|
||||||
(use-package pytest
|
(use-package pytest
|
||||||
@ -603,20 +604,14 @@ buffer is not visiting a file."
|
|||||||
(read-only-mode))
|
(read-only-mode))
|
||||||
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
|
||||||
|
|
||||||
;; smart-mode-line
|
|
||||||
(sml/setup)
|
|
||||||
(sml/apply-theme 'respectful)
|
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; Themes
|
;; Themes
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
|
|
||||||
;; Choose random theme:
|
(unless (boundp 'dark-themes)
|
||||||
;; (defvar dark-themes '(monokai molokai solarized-dark base16-default))
|
(defvar dark-themes '(solarized-dark)))
|
||||||
;; (defvar light-themes '(zenburn solarized-light))
|
(unless (boundp 'light-themes)
|
||||||
|
(defvar light-themes '(solarized-light)))
|
||||||
(defvar dark-themes '(monokai))
|
|
||||||
(defvar light-themes '(solarized-light))
|
|
||||||
|
|
||||||
(defun random-choice (choices)
|
(defun random-choice (choices)
|
||||||
(nth (random (length choices)) choices))
|
(nth (random (length choices)) choices))
|
||||||
@ -634,9 +629,15 @@ buffer is not visiting a file."
|
|||||||
(let ((appropriate-theme (get-appropriate-theme)))
|
(let ((appropriate-theme (get-appropriate-theme)))
|
||||||
(if (eq appropriate-theme current-theme)
|
(if (eq appropriate-theme current-theme)
|
||||||
nil
|
nil
|
||||||
(progn (load-theme appropriate-theme t)
|
(progn
|
||||||
|
(deactivate-all-themes)
|
||||||
|
(load-theme appropriate-theme t)
|
||||||
(setq current-theme appropriate-theme)))))
|
(setq current-theme appropriate-theme)))))
|
||||||
|
|
||||||
|
(defun deactivate-all-themes ()
|
||||||
|
(interactive)
|
||||||
|
(mapcar (lambda (theme) (disable-theme theme)) custom-enabled-themes))
|
||||||
|
|
||||||
(defun set-my-font-for-frame (frame)
|
(defun set-my-font-for-frame (frame)
|
||||||
(condition-case exp
|
(condition-case exp
|
||||||
(set-frame-font (random-choice fonts) nil t)
|
(set-frame-font (random-choice fonts) nil t)
|
||||||
@ -644,6 +645,8 @@ buffer is not visiting a file."
|
|||||||
(set-frame-font "monaco-11" nil t) nil)))
|
(set-frame-font "monaco-11" nil t) nil)))
|
||||||
|
|
||||||
(defun remove-fringe-and-hl-line-mode (&rest stuff)
|
(defun remove-fringe-and-hl-line-mode (&rest stuff)
|
||||||
|
(sml/setup)
|
||||||
|
(sml/apply-theme 'respectful)
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user