Clean up
This commit is contained in:
parent
5099352078
commit
1b67819fc7
5 changed files with 52 additions and 47 deletions
|
@ -20,7 +20,7 @@
|
||||||
fringes-outside-margins t
|
fringes-outside-margins t
|
||||||
hl-line-sticky-flag nil ; only highlight in one window
|
hl-line-sticky-flag nil ; only highlight in one window
|
||||||
|
|
||||||
jit-lock-defer-time 0
|
jit-lock-defer-time nil
|
||||||
jit-lock-stealth-time 1
|
jit-lock-stealth-time 1
|
||||||
|
|
||||||
resize-mini-windows t)
|
resize-mini-windows t)
|
||||||
|
|
|
@ -151,7 +151,9 @@
|
||||||
|
|
||||||
(require 'server)
|
(require 'server)
|
||||||
(unless (server-running-p)
|
(unless (server-running-p)
|
||||||
(server-start)))
|
(server-start))
|
||||||
|
|
||||||
|
(add-hook! after-init (setq gc-cons-threshold 800000)))
|
||||||
|
|
||||||
(provide 'core)
|
(provide 'core)
|
||||||
;;; core.el ends here
|
;;; core.el ends here
|
||||||
|
|
2
init.el
2
init.el
|
@ -40,6 +40,8 @@
|
||||||
;;
|
;;
|
||||||
;;; License: GPLv3
|
;;; License: GPLv3
|
||||||
|
|
||||||
|
(setq gc-cons-threshold 169715200)
|
||||||
|
|
||||||
(defconst narf-theme 'narf-dark)
|
(defconst narf-theme 'narf-dark)
|
||||||
(defconst narf-default-font (font-spec :family "DejaVu Sans Mono" :size 12))
|
(defconst narf-default-font (font-spec :family "DejaVu Sans Mono" :size 12))
|
||||||
(defconst narf-big-font (font-spec :family "Inconsolata" :size 20))
|
(defconst narf-big-font (font-spec :family "Inconsolata" :size 20))
|
||||||
|
|
|
@ -14,54 +14,55 @@
|
||||||
(define-env-command! python-mode "python --version | cut -d' ' -f2")
|
(define-env-command! python-mode "python --version | cut -d' ' -f2")
|
||||||
|
|
||||||
;; interferes with smartparens
|
;; interferes with smartparens
|
||||||
(define-key python-mode-map (kbd "DEL") nil))
|
(define-key python-mode-map (kbd "DEL") nil)
|
||||||
|
|
||||||
(use-package nose
|
(use-package nose
|
||||||
:commands nose-mode
|
:commands nose-mode
|
||||||
:preface (defvar nose-mode-map (make-sparse-keymap))
|
:preface (defvar nose-mode-map (make-sparse-keymap))
|
||||||
:init
|
:init
|
||||||
(associate! nose-mode :pattern "/test_.+\\.py\\'")
|
(associate! nose-mode :pattern "/test_.+\\.py\\'")
|
||||||
:config
|
:config
|
||||||
(bind! :map nose-mode-map
|
(bind! :map nose-mode-map
|
||||||
:n ",tr" 'nosetests-again
|
:n ",tr" 'nosetests-again
|
||||||
:n ",ta" 'nosetests-all
|
:n ",ta" 'nosetests-all
|
||||||
:n ",ts" 'nosetests-one
|
:n ",ts" 'nosetests-one
|
||||||
:n ",tv" 'nosetests-module
|
:n ",tv" 'nosetests-module
|
||||||
:n ",tA" 'nosetests-pdb-all
|
:n ",tA" 'nosetests-pdb-all
|
||||||
:n ",tO" 'nosetests-pdb-one
|
:n ",tO" 'nosetests-pdb-one
|
||||||
:n ",tV" 'nosetests-pdb-module))
|
:n ",tV" 'nosetests-pdb-module))
|
||||||
|
|
||||||
(use-package anaconda-mode
|
(use-package anaconda-mode
|
||||||
:diminish anaconda-mode
|
:diminish anaconda-mode
|
||||||
:defines (anaconda-mode-map anaconda-nav-mode-map)
|
:defines (anaconda-mode-map anaconda-nav-mode-map)
|
||||||
:functions (anaconda-mode-running-p)
|
:functions (anaconda-mode-running-p)
|
||||||
:init
|
:init
|
||||||
(add-hook! python-mode '(anaconda-mode eldoc-mode))
|
(add-hook! python-mode '(anaconda-mode eldoc-mode))
|
||||||
(setq anaconda-mode-installation-directory (concat narf-temp-dir "anaconda/"))
|
(setq anaconda-mode-installation-directory (concat narf-temp-dir "anaconda/"))
|
||||||
:config
|
:config
|
||||||
(bind! :map anaconda-mode-map :m "gd" 'anaconda-mode-goto-definitions)
|
(bind! :map anaconda-mode-map :m "gd" 'anaconda-mode-goto-definitions)
|
||||||
(bind! :map anaconda-nav-mode-map :n [escape] 'anaconda-nav-quit)
|
(bind! :map anaconda-nav-mode-map :n [escape] 'anaconda-nav-quit)
|
||||||
|
|
||||||
(advice-add 'anaconda-mode-doc-buffer :after 'narf*anaconda-mode-doc-buffer)
|
(advice-add 'anaconda-mode-doc-buffer :after 'narf*anaconda-mode-doc-buffer)
|
||||||
|
|
||||||
(require 'company-anaconda)
|
(after! company
|
||||||
(define-company-backend! python-mode (anaconda))
|
(require 'company-anaconda)
|
||||||
(after! emr
|
(define-company-backend! python-mode (anaconda)))
|
||||||
(mapc (lambda (x)
|
(after! emr
|
||||||
(let ((command-name (car x))
|
(mapc (lambda (x)
|
||||||
(title (cadr x))
|
(let ((command-name (car x))
|
||||||
(region-p (caddr x))
|
(title (cadr x))
|
||||||
predicate)
|
(region-p (caddr x))
|
||||||
(setq predicate (lambda () (and (anaconda-mode-running-p)
|
predicate)
|
||||||
(not (use-region-p))
|
(setq predicate (lambda () (and (anaconda-mode-running-p)
|
||||||
(not (sp-point-in-string-or-comment)))))
|
(not (use-region-p))
|
||||||
(emr-declare-command (intern (format "anaconda-mode-%s" (symbol-name command-name)))
|
(not (sp-point-in-string-or-comment)))))
|
||||||
:title title :modes 'python-mode :predicate predicate)))
|
(emr-declare-command (intern (format "anaconda-mode-%s" (symbol-name command-name)))
|
||||||
'((show-doc "view documentation" t)
|
:title title :modes 'python-mode :predicate predicate)))
|
||||||
(find-assignments "find assignments" t)
|
'((show-doc "view documentation" t)
|
||||||
(find-definitions "find definitions" t)
|
(find-assignments "find assignments" t)
|
||||||
(find-file "find assignments" t)
|
(find-definitions "find definitions" t)
|
||||||
(find-references "show usages" nil)))))
|
(find-file "find assignments" t)
|
||||||
|
(find-references "show usages" nil))))))
|
||||||
|
|
||||||
(provide 'module-python)
|
(provide 'module-python)
|
||||||
;;; module-python.el ends here
|
;;; module-python.el ends here
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
:n "w" 'narf:helm-wg
|
:n "w" 'narf:helm-wg
|
||||||
:n "W" 'narf:workgroup-display)
|
:n "W" 'narf:workgroup-display)
|
||||||
|
|
||||||
:n "K" 'smart-up
|
:nv "K" 'smart-up
|
||||||
|
|
||||||
;; Don't move cursor on indent
|
;; Don't move cursor on indent
|
||||||
:n "=" (λ (save-excursion (call-interactively 'evil-indent)))
|
:n "=" (λ (save-excursion (call-interactively 'evil-indent)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue