From bada83f1c6a87ebb7d2435a851d8686b2aa6edfb Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 7 Aug 2019 13:12:35 -0700 Subject: [PATCH] some minor changes to emacs for python and zsh --- .gitignore | 4 ++++ dotfiles/emacs.d/init.el | 9 +++++++-- dotfiles/emacs.d/package.el | 1 + dotfiles/zshrc | 5 ++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d5c3bed..c77cb5e 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,7 @@ dotfiles/config/xbuild dotfiles/config/stetic dotfiles/config/NuGet dotfiles/config/GitExtensions + + +# Jedi Python Environment +dotfiles/emacs.d/.python-environments/* diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 62be3db..832d10b 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -227,7 +227,7 @@ ;; Line Numbering - Note: Might not look good with files with 10,000 or more lines ;;-------------------------------------------------------------------------------------- -;; NOTE: Line numbers are toggled with C-s n +;; NOTE: Line numbers are toggled with C-c n (defvar linum-format) (setq linum-format "%4d \u2502") @@ -278,6 +278,11 @@ (global-company-mode t) (add-hook 'after-init-hook 'global-company-mode) +(defun company/python-mode-hook () + (add-to-list 'company-backends 'company-jedi)) + +(add-hook 'python-mode-hook 'company/python-mode-hook) + ;;------------------------------------------------------------------------------------- ;; Alignment ;;------------------------------------------------------------------------------------- @@ -474,7 +479,7 @@ (set-terminal-parameter nil 'background-mode 'dark) (load-theme 'material t) -;; 10 pt font +;; 12 pt font (set-frame-font "inconsolata") (set-face-attribute 'default nil :height 120) diff --git a/dotfiles/emacs.d/package.el b/dotfiles/emacs.d/package.el index 1cda417..950d9ad 100644 --- a/dotfiles/emacs.d/package.el +++ b/dotfiles/emacs.d/package.el @@ -5,6 +5,7 @@ company company-irony company-emacs-eclim + company-jedi eclim irony counsel diff --git a/dotfiles/zshrc b/dotfiles/zshrc index de1a6eb..1e52c19 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -14,9 +14,8 @@ fi if [[ "$OSTYPE" == "linux-gnu" ]]; then # Linux - eval `dircolors ~/.dir_colors/dircolors` - export VISUAL="nvim" - alias vim="$VISUAL" + export VISUAL="emacs" + alias emacs="$VISUAL" elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX export VISUAL="/usr/local/bin/nvim"