From 4d3e80df9cde2a2d651d8010f3a78556afdfa8df Mon Sep 17 00:00:00 2001 From: jowj Date: Mon, 6 Jan 2020 10:22:45 -0600 Subject: [PATCH 1/3] add zshrc for mac config. --- .zshrc | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..660e643 --- /dev/null +++ b/.zshrc @@ -0,0 +1,80 @@ +shopt -s nocaseglob # glob filenames case-insensitively +shopt -s histappend # append history to history file, don't overwrite. +shopt -s checkwinsize # fix line wrap issues + + +set completion-ignore-case on # ignore case when tab-completing + +# find paths inside agares +export AGARES=${AGARES:-"$HOME/.agares"} + +# update paths with installed executables: +export PATH=/usr/local/bin:$PATH +export PATH=/usr/local/share/python:$PATH +export PATH=/Users/jowj/Library/Python/3.6/bin:$PATH +export PATH=/home/josiah/.local/bin:$PATH +export PATH=/home/josiah/.gem/ruby/2.6.0/bin:$PATH + +# blatantly steal micah's ls aliases because they make SO MUCH SENSE omg. +alias python="python3" +alias py="python3" +alias pip="pip3" +alias lsa='ls -a' +alias lsl='ls -a -l' +alias lsli='lsl -i' # lsl+inodes +alias l1='ls -1' +alias llm='lsl -r -t' # lsl+ sort by modified time (lastest at bottom) + +# blatantly steal micah's colorized man pages +# See: http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized +# see: https://github.com/mrled/dhd/blob/800544cae0cc2f4e2b85b5dafae59babf75677fe/hbase/.bashrc +man() { + env \ + LESS_TERMCAP_md=$'\e[1;36m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[1;40;92m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[1;32m' \ + man "$@" +} + +# history control variables +export HISTCONTROL=ignoreboth +export HISTSIZE="INFINITE" +export HISTFILESIZE=5000 +export HISTCONTROL="ignorespace" +export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S " + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# this looks like garbage but its just color initation and termination +PROMPT='%F{green} ǰ %F{red}☭ %f ' +# PROMPT='%F{green}%n%f@%F{magenta}%m%f %F{blue}%B%~%b%f %# ' +export CLICOLOR=1 +export LSCOLORS=GxFxCxDxBxegedabagaced + +echo "" +echo " /'-./\_ | $HOSTNAME" +echo " : ||,> |" +echo " \.-'|| | $0" +echo -e "\e[31m || BURIED\e[0m |" +echo -e "\e[31m || HATCHET\e[0m | $OSTYPE" +echo -e "\e[31m ||\e[0m |" +echo "" From c398583cd554483b82aa60e8a7386b50d4eb45b6 Mon Sep 17 00:00:00 2001 From: jowj Date: Tue, 7 Jan 2020 15:03:38 -0600 Subject: [PATCH 2/3] Remove old bash lines. --- .zshrc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.zshrc b/.zshrc index 660e643..81ba8cc 100644 --- a/.zshrc +++ b/.zshrc @@ -1,8 +1,3 @@ -shopt -s nocaseglob # glob filenames case-insensitively -shopt -s histappend # append history to history file, don't overwrite. -shopt -s checkwinsize # fix line wrap issues - - set completion-ignore-case on # ignore case when tab-completing # find paths inside agares From 81c875cd5b3655534439835ba0a724f59d5b9dc3 Mon Sep 17 00:00:00 2001 From: jowj Date: Tue, 7 Jan 2020 15:59:44 -0600 Subject: [PATCH 3/3] Move to lsp from eglot config; add company. --- .emacs.d/init.el | 12 ++++++++---- .emacs.d/jlj-python.el | 44 +++++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e821310..23c4aad 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -41,11 +41,15 @@ '(epg-gpg-program "/usr/local/bin/gpg") '(global-hl-line-mode t) '(package-selected-packages - '(ob-restclient virtualenvwrapper flymake-python-pyflakes lsp-ui lsp-mode jedi znc yaml-mode which-key use-package twittering-mode try smex racer python-mode pylint py-autopep8 powershell pdf-tools outline-magic org2blog multiple-cursors magit helm flycheck-rust eyebrowse exec-path-from-shell emojify elpy ein doom-themes dockerfile-mode docker csharp-mode ansible anaconda-mode ace-window)) + (quote + (company-lsp ob-restclient virtualenvwrapper flymake-python-pyflakes lsp-ui lsp-mode jedi znc yaml-mode which-key use-package twittering-mode try smex racer python-mode pylint py-autopep8 powershell pdf-tools outline-magic org2blog multiple-cursors magit helm flycheck-rust eyebrowse exec-path-from-shell emojify elpy ein doom-themes dockerfile-mode docker csharp-mode ansible anaconda-mode ace-window))) '(znc-servers - `(("bouncer.awful.club" 5000 t - ((freenode "blindidiotgod/freenode" ,znc-password) - (OFTC "blindidiotgod/OFTC" ,znc-password)))))) + (\` + (("bouncer.awful.club" 5000 t + ((freenode "blindidiotgod/freenode" + (\, znc-password)) + (OFTC "blindidiotgod/OFTC" + (\, znc-password)))))))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.emacs.d/jlj-python.el b/.emacs.d/jlj-python.el index abcf4c6..35c1474 100644 --- a/.emacs.d/jlj-python.el +++ b/.emacs.d/jlj-python.el @@ -4,32 +4,36 @@ ;; using jedi requires virtualenv to be installed ;; pipenv is mostly acceptable but i could not make a full IDE experience happen -;; (use-package pylint -;; :ensure t) - - -;; (setq python-shell-interpreter "/usr/local/bin/python3" -;; python-shell-interpreter-args "-i") +(use-package pipenv + :ensure t) -;; (use-package py-autopep8 -;; :ensure t -;; :config -;; (progn -;; (add-hook 'python-mode-hook 'py-autopep8-enable-on-save))) +(use-package flycheck + :ensure t) -;; (use-package jedi -;; :ensure t -;; :init -;; (add-hook 'python-mode-hook 'jedi:setup) -;; (add-hook 'python-mode-hook 'jedi:ac-setup)) +; Let's set up company! perhaps not necessary but this is what i like to use +(use-package company + :ensure t + :config + (setq company-idle-delay 0) + (setq company-minimum-prefix-length 1)) -(use-package pipenv - :ensure t) +; install lsp mode +(use-package lsp-mode + :ensure t + :hook (python-mode . lsp-deferred) + :commands (lsp lsp-deferred)) -(use-package eglot +; let's add the lsp company backend +(use-package company-lsp :ensure t :config - (add-hook 'python-mode-hook 'eglot-ensure)) + (push 'company-lsp company-backends)) + +; also installs lsp as a dependency +(use-package lsp-ui + :ensure t + :hook (lsp-mode . lsp-ui-mode)) + ;; (use-package pyvenv ;; :ensure t)