re make dotfiles
This commit is contained in:
parent
485507e2a9
commit
406d1da86b
10 changed files with 246 additions and 333 deletions
14
bash/.bashrc
14
bash/.bashrc
|
@ -1,14 +0,0 @@
|
||||||
#
|
|
||||||
# Rawley's .bashrc
|
|
||||||
# Last edited: April 23, 2022
|
|
||||||
#
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
[[ $- != *i* ]] && return
|
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
alias vim='nvim'
|
|
||||||
alias vi='nvim'
|
|
||||||
PS1='[\e[0;32m\u\e[m@\e[0;33m\h\e[m \W]\e[0;33m\$\e[m '
|
|
||||||
|
|
||||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
|
|
@ -1,60 +0,0 @@
|
||||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;;
|
|
||||||
;; Rawley Fowler's config.el : Last Edited May 2022
|
|
||||||
;;
|
|
||||||
|
|
||||||
(setq user-full-name "Rawley Fowler"
|
|
||||||
user-mail-address "rawleyfowler@gmail.com")
|
|
||||||
|
|
||||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
|
||||||
;;
|
|
||||||
;; - `doom-font' -- the primary font to use
|
|
||||||
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
|
||||||
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
|
||||||
;; presentations or streaming.
|
|
||||||
;; - `doom-unicode-font' -- for unicode glyphs
|
|
||||||
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
|
|
||||||
(setq doom-theme 'doom-gruvbox-light)
|
|
||||||
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
|
||||||
(setq doom-font (font-spec :size 14))
|
|
||||||
|
|
||||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
|
||||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
|
||||||
(setq display-line-numbers-type t)
|
|
||||||
|
|
||||||
;; If you use `org' and don't want your org files in the default location below,
|
|
||||||
;; change `org-directory'. It must be set before org loads!
|
|
||||||
(setq org-directory "~/org/")
|
|
||||||
|
|
||||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
|
||||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
|
||||||
;;
|
|
||||||
;; (after! PACKAGE
|
|
||||||
;; (setq x y))
|
|
||||||
;;
|
|
||||||
;; The exceptions to this rule:
|
|
||||||
;;
|
|
||||||
;; - Setting file/directory variables (like `org-directory')
|
|
||||||
;; - Setting variables which explicitly tell you to set them before their
|
|
||||||
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
|
|
||||||
;; - Setting doom variables (which start with 'doom-' or '+').
|
|
||||||
;;
|
|
||||||
;; Here are some additional functions/macros that will help you configure Doom.
|
|
||||||
;;
|
|
||||||
;; - `load!' for loading external *.el files relative to this one
|
|
||||||
;; - `use-package!' for configuring packages
|
|
||||||
;; - `after!' for running code after a package has loaded
|
|
||||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
|
||||||
;; this file. Emacs searches the `load-path' when you load packages with
|
|
||||||
;; `require' or `use-package'.
|
|
||||||
;; - `map!' for binding new keys
|
|
||||||
;;
|
|
||||||
;; To get information about any of these functions/macros, move the cursor over
|
|
||||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
|
||||||
;; This will open documentation for it, including demos of how they are used.
|
|
||||||
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
|
|
||||||
;; etc).
|
|
||||||
;;
|
|
||||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
|
||||||
;; they are implemented.
|
|
|
@ -1,157 +0,0 @@
|
||||||
;;; init.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;;
|
|
||||||
;; Rawley Fowler's, init.el : Last Edited, May 2022
|
|
||||||
;;
|
|
||||||
|
|
||||||
;; This file controls what Doom modules are enabled and what order they load
|
|
||||||
;; in. Remember to run 'doom sync' after modifying it!
|
|
||||||
|
|
||||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
|
||||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
|
||||||
;; of our modules are listed, including what flags they support.
|
|
||||||
|
|
||||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
|
||||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
|
||||||
;; flags as well (those symbols that start with a plus).
|
|
||||||
;;
|
|
||||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
|
||||||
;; directory (for easy access to its source code).
|
|
||||||
|
|
||||||
(doom! :input
|
|
||||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
|
||||||
;;chinese
|
|
||||||
;;japanese
|
|
||||||
;;layout ; auie,ctsrnm is the superior home row
|
|
||||||
|
|
||||||
:completion
|
|
||||||
company ; the ultimate code completion backend
|
|
||||||
;;helm ; the *other* search engine for love and life
|
|
||||||
;;ido ; the other *other* search engine...
|
|
||||||
;;ivy ; a search engine for love and life
|
|
||||||
vertico ; the search engine of the future
|
|
||||||
|
|
||||||
:ui
|
|
||||||
doom ; what makes DOOM look the way it does
|
|
||||||
doom-dashboard ; a nifty splash screen for Emacs
|
|
||||||
(emoji +unicode) ; 🙂
|
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
|
||||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
|
||||||
neotree ; a project drawer, like NERDTree for vim
|
|
||||||
ophints ; highlight the region an operation acts on
|
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
|
||||||
unicode ; extended unicode support for various languages
|
|
||||||
vc-gutter ; vcs diff in the fringe
|
|
||||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
|
||||||
workspaces ; tab emulation, persistence & separate workspaces
|
|
||||||
|
|
||||||
:editor
|
|
||||||
(evil +everywhere); come to the dark side, we have cookies
|
|
||||||
file-templates ; auto-snippets for empty files
|
|
||||||
fold ; (nigh) universal code folding
|
|
||||||
(format +onsave) ; automated prettiness
|
|
||||||
snippets ; my elves. They type so I don't have to
|
|
||||||
word-wrap ; soft wrapping with language-aware indent
|
|
||||||
|
|
||||||
:emacs
|
|
||||||
dired ; making dired pretty [functional]
|
|
||||||
electric ; smarter, keyword-based electric-indent
|
|
||||||
;;ibuffer ; interactive buffer management
|
|
||||||
vc ; version-control and Emacs, sitting in a tree
|
|
||||||
|
|
||||||
:term
|
|
||||||
vterm ; the best terminal emulation in Emacs
|
|
||||||
|
|
||||||
:checkers
|
|
||||||
syntax ; tasing you for every semicolon you forget
|
|
||||||
|
|
||||||
:tools
|
|
||||||
docker
|
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
|
||||||
lookup ; navigate your code and its documentation
|
|
||||||
lsp ; M-x vscode
|
|
||||||
magit ; a git porcelain for Emacs
|
|
||||||
|
|
||||||
:os
|
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
|
||||||
|
|
||||||
:lang
|
|
||||||
;;agda ; types of types of types of types...
|
|
||||||
;;beancount ; mind the GAAP
|
|
||||||
(cc +lsp) ; C > C++ == 1
|
|
||||||
(clojure +lsp) ; Java with a lisp
|
|
||||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
|
||||||
;;coq ; proofs-as-programs
|
|
||||||
;;crystal ; ruby at the speed of c
|
|
||||||
;;csharp ; unity, .NET, and mono shenanigans
|
|
||||||
;;data ; config/data formats
|
|
||||||
(dart +flutter) ; paint ui and not much else
|
|
||||||
;;dhall
|
|
||||||
elixir ; erlang done right
|
|
||||||
elm ; care for a cup of TEA?
|
|
||||||
emacs-lisp ; drown in parentheses
|
|
||||||
;;erlang ; an elegant language for a more civilized age
|
|
||||||
;;ess ; emacs speaks statistics
|
|
||||||
;;factor
|
|
||||||
;;faust ; dsp, but you get to keep your soul
|
|
||||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
|
||||||
;;gdscript ; the language you waited for
|
|
||||||
(go +lsp) ; the hipster dialect
|
|
||||||
;;(graphql +lsp) ; Give queries a REST
|
|
||||||
(haskell +lsp) ; a language that's lazier than I am
|
|
||||||
;;hy ; readability of scheme w/ speed of python
|
|
||||||
;;idris ; a language you can depend on
|
|
||||||
json ; At least it ain't XML
|
|
||||||
(java +lsp) ; the poster child for carpal tunnel syndrome
|
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
|
||||||
;;julia ; a better, faster MATLAB
|
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
|
||||||
;;latex ; writing papers in Emacs has never been so fun
|
|
||||||
;;lean ; for folks with too much to prove
|
|
||||||
;;ledger ; be audit you can be
|
|
||||||
lua ; one-based indices? one-based indices
|
|
||||||
markdown ; writing docs for people to ignore
|
|
||||||
;;nim ; python + lisp at the speed of c
|
|
||||||
;;nix ; I hereby declare "nix geht mehr!"
|
|
||||||
;;ocaml ; an objective camel
|
|
||||||
org ; organize your plain life in plain text
|
|
||||||
;;php ; perl's insecure younger brother
|
|
||||||
;;plantuml ; diagrams for confusing people more
|
|
||||||
;;purescript ; javascript, but functional
|
|
||||||
;;python ; beautiful is better than ugly
|
|
||||||
;;qt ; the 'cutest' gui framework ever
|
|
||||||
;;racket ; a DSL for DSLs
|
|
||||||
;;raku ; the artist formerly known as perl6
|
|
||||||
;;rest ; Emacs as a REST client
|
|
||||||
;;rst ; ReST in peace
|
|
||||||
(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
|
||||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
|
||||||
;;scala ; java, but good
|
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
|
||||||
;;sml
|
|
||||||
;;solidity ; do you need a blockchain? No.
|
|
||||||
;;swift ; who asked for emoji variables?
|
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
|
||||||
;;web ; the tubes
|
|
||||||
;;yaml ; JSON, but readable
|
|
||||||
;;zig ; C, but simpler
|
|
||||||
|
|
||||||
:email
|
|
||||||
;;(mu4e +org +gmail)
|
|
||||||
;;notmuch
|
|
||||||
;;(wanderlust +gmail)
|
|
||||||
|
|
||||||
:app
|
|
||||||
;;calendar
|
|
||||||
;;emms
|
|
||||||
;;everywhere ; *leave* Emacs!? You must be joking
|
|
||||||
;;irc ; how neckbeards socialize
|
|
||||||
;;(rss +org) ; emacs as an RSS reader
|
|
||||||
;;twitter ; twitter client https://twitter.com/vnought
|
|
||||||
|
|
||||||
:config
|
|
||||||
;;literate
|
|
||||||
(default +bindings +smartparens))
|
|
199
emacs.d/init.el
Normal file
199
emacs.d/init.el
Normal file
|
@ -0,0 +1,199 @@
|
||||||
|
;; Rawley Fowler's init.el.
|
||||||
|
;; I was a long time Vim user. But emacs stole my heart.
|
||||||
|
(setq inhibit-startup-message t)
|
||||||
|
(setq initial-scratch-message nil)
|
||||||
|
(when (version<= "26.0.50" emacs-version)
|
||||||
|
(global-display-line-numbers-mode)) ;; Line numbers
|
||||||
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
|
;; Backups
|
||||||
|
(setq backup-directory-alist
|
||||||
|
`((".*" . ,temporary-file-directory)))
|
||||||
|
(setq auto-save-file-name-transforms
|
||||||
|
`((".*" ,temporary-file-directory t)))
|
||||||
|
|
||||||
|
;; Disabling bars
|
||||||
|
(menu-bar-mode -1)
|
||||||
|
(scroll-bar-mode -1)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
|
||||||
|
;; UTF-8 and spacing
|
||||||
|
(set-language-environment "UTF-8")
|
||||||
|
(set-terminal-coding-system 'utf-8)
|
||||||
|
(set-keyboard-coding-system 'utf-8)
|
||||||
|
(set-selection-coding-system 'utf-8)
|
||||||
|
(prefer-coding-system 'utf-8)
|
||||||
|
(transient-mark-mode)
|
||||||
|
(show-paren-mode 1)
|
||||||
|
|
||||||
|
(setq font-lock-maximum-decoration t)
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
(setq tab-width 4)
|
||||||
|
(setq c-basic-offset 4)
|
||||||
|
|
||||||
|
;;;; Package management
|
||||||
|
(require 'package)
|
||||||
|
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
|
||||||
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
||||||
|
(package-initialize)
|
||||||
|
|
||||||
|
(unless (package-installed-p 'use-package)
|
||||||
|
(package-refresh-contents)
|
||||||
|
(package-install 'use-package))
|
||||||
|
|
||||||
|
(eval-and-compile
|
||||||
|
(setq use-package-always-ensure t
|
||||||
|
use-package-expand-minimally t))
|
||||||
|
|
||||||
|
(require 'use-package)
|
||||||
|
|
||||||
|
;;;; Packages.
|
||||||
|
;; EVIL!!!
|
||||||
|
(use-package evil
|
||||||
|
:ensure t ;; Install evil if not installed
|
||||||
|
:init ;; Tweak the config before loading it
|
||||||
|
(setq evil-want-integration t)
|
||||||
|
(setq evil-want-keybinding nil)
|
||||||
|
(setq evil-vsplit-window-right t)
|
||||||
|
(setq evil-split-window-below t)
|
||||||
|
(evil-mode))
|
||||||
|
(use-package evil-collection
|
||||||
|
:after evil
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(evil-collection-init))
|
||||||
|
|
||||||
|
;; Project mangement
|
||||||
|
(use-package projectile
|
||||||
|
:config
|
||||||
|
(projectile-mode +1)
|
||||||
|
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map))
|
||||||
|
|
||||||
|
(use-package neotree
|
||||||
|
:config
|
||||||
|
(global-set-key (kbd "C-c C-w") 'neotree-toggle))
|
||||||
|
|
||||||
|
;; Icons
|
||||||
|
(use-package all-the-icons
|
||||||
|
:if (display-graphic-p))
|
||||||
|
|
||||||
|
;; Ivy
|
||||||
|
(use-package ivy)
|
||||||
|
(use-package counsel)
|
||||||
|
(use-package swiper)
|
||||||
|
|
||||||
|
(require 'ivy)
|
||||||
|
(ivy-mode 1)
|
||||||
|
(setq ivy-use-virtual-buffers t)
|
||||||
|
(setq ivy-count-format "(%d/%d) ")
|
||||||
|
|
||||||
|
;; Parens
|
||||||
|
(use-package paren
|
||||||
|
:ensure nil
|
||||||
|
:init
|
||||||
|
(setq show-paren-delay 0)
|
||||||
|
:config
|
||||||
|
(show-paren-mode +1))
|
||||||
|
|
||||||
|
(use-package smartparens
|
||||||
|
:config
|
||||||
|
(smartparens-global-mode 1))
|
||||||
|
(require 'smartparens)
|
||||||
|
(use-package evil-smartparens
|
||||||
|
:hook ('smartparens-enabled-hook #'evil-smartparens-mode))
|
||||||
|
|
||||||
|
(use-package which-key)
|
||||||
|
|
||||||
|
;; LSP packages
|
||||||
|
(use-package lsp-mode
|
||||||
|
:commands (lsp lsp-deferred)
|
||||||
|
:init
|
||||||
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
|
:config
|
||||||
|
(lsp-enable-which-key-integration t)
|
||||||
|
(lsp-completion-enable t))
|
||||||
|
|
||||||
|
(use-package lsp-ui)
|
||||||
|
|
||||||
|
(use-package auto-complete
|
||||||
|
:config
|
||||||
|
(ac-config-default))
|
||||||
|
(setq tab-always-indent 'complete)
|
||||||
|
(add-to-list 'completion-styles 'initials t)
|
||||||
|
|
||||||
|
;; Language modes
|
||||||
|
(use-package typescript-mode
|
||||||
|
:mode ("\\.tsx?\\'" . typescript-mode)
|
||||||
|
:hook (typescript-mode . lsp-deferred)
|
||||||
|
:config
|
||||||
|
(setq typescript-indent-level 2))
|
||||||
|
|
||||||
|
(use-package clojure-mode
|
||||||
|
:mode ("\\.cljs?\\'" . clojure-mode)
|
||||||
|
:hook (clojure-mode . lsp-deferred)
|
||||||
|
:config
|
||||||
|
(setq clojure-indent-level 2))
|
||||||
|
|
||||||
|
(use-package go-mode
|
||||||
|
:mode ("\\.go\\'" . go-mode)
|
||||||
|
:hook (go-mode . lsp-deferred))
|
||||||
|
|
||||||
|
(use-package markdown-mode
|
||||||
|
:mode ("\\.md\\'" . markdown-mode)
|
||||||
|
:hook (markdown-mode . auto-fill-mode))
|
||||||
|
|
||||||
|
(use-package json-mode)
|
||||||
|
(use-package vimrc-mode)
|
||||||
|
(use-package yaml-mode)
|
||||||
|
|
||||||
|
;;;; Bindings
|
||||||
|
;; Ivy
|
||||||
|
(global-set-key (kbd "C-s") 'swiper-isearch)
|
||||||
|
(global-set-key (kbd "M-x") 'counsel-M-x)
|
||||||
|
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
||||||
|
(global-set-key (kbd "M-y") 'counsel-yank-pop)
|
||||||
|
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
|
||||||
|
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
|
||||||
|
(global-set-key (kbd "<f1> l") 'counsel-find-library)
|
||||||
|
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
|
||||||
|
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
|
||||||
|
(global-set-key (kbd "<f2> j") 'counsel-set-variable)
|
||||||
|
(global-set-key (kbd "C-x b") 'ivy-switch-buffer)
|
||||||
|
(global-set-key (kbd "C-c v") 'ivy-push-view)
|
||||||
|
(global-set-key (kbd "C-c V") 'ivy-pop-view)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-c c") 'counsel-compile)
|
||||||
|
(global-set-key (kbd "C-c g") 'counsel-git)
|
||||||
|
(global-set-key (kbd "C-c j") 'counsel-git-grep)
|
||||||
|
(global-set-key (kbd "C-c L") 'counsel-git-log)
|
||||||
|
(global-set-key (kbd "C-c k") 'counsel-rg)
|
||||||
|
(global-set-key (kbd "C-c m") 'counsel-linux-app)
|
||||||
|
(global-set-key (kbd "C-c n") 'counsel-fzf)
|
||||||
|
(global-set-key (kbd "C-x l") 'counsel-locate)
|
||||||
|
(global-set-key (kbd "C-c J") 'counsel-file-jump)
|
||||||
|
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
|
||||||
|
(global-set-key (kbd "C-c w") 'counsel-wmctrl)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-c C-r") 'ivy-resume)
|
||||||
|
(global-set-key (kbd "C-c b") 'counsel-bookmark)
|
||||||
|
(global-set-key (kbd "C-c d") 'counsel-descbinds)
|
||||||
|
(global-set-key (kbd "C-c g") 'counsel-git)
|
||||||
|
(global-set-key (kbd "C-c o") 'counsel-outline)
|
||||||
|
(global-set-key (kbd "C-c t") 'counsel-load-theme)
|
||||||
|
(global-set-key (kbd "C-c F") 'counsel-org-file)
|
||||||
|
|
||||||
|
;;;; Themes
|
||||||
|
;; I use the default emacs color scheme, with Consolas font.
|
||||||
|
(custom-set-variables
|
||||||
|
;; custom-set-variables was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
'(package-selected-packages
|
||||||
|
'(yaml-mode vimrc-mode json-mode clojure-mode typescript-mode use-package restart-emacs lsp-mode evil-collection)))
|
||||||
|
(custom-set-faces
|
||||||
|
;; custom-set-faces was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
)
|
|
@ -1,14 +0,0 @@
|
||||||
# Rawley Fowlers, config.fish. Last updated: April 30th, 2022
|
|
||||||
|
|
||||||
if status is-interactive
|
|
||||||
set fish_greeting
|
|
||||||
set TERM "st"
|
|
||||||
set EDITOR "nvim"
|
|
||||||
set VISUAL "nvim"
|
|
||||||
alias vim='nvim'
|
|
||||||
alias vi='nvim'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Paths
|
|
||||||
set GOPATH $HOME/.go
|
|
||||||
set PATH $PATH /usr/local/bin /usr/bin /bin /usr/local/go/bin
|
|
|
@ -1,45 +0,0 @@
|
||||||
export CLICOLOR=1
|
|
||||||
COLOR_RED="\033[0;31m"
|
|
||||||
COLOR_YELLOW="\033[0;33m"
|
|
||||||
COLOR_GREEN="\033[0;32m"
|
|
||||||
COLOR_OCHRE="\033[38;5;95m"
|
|
||||||
COLOR_BLUE="\033[0;34m"
|
|
||||||
COLOR_WHITE="\033[0;37m"
|
|
||||||
COLOR_RESET="\033[0m"
|
|
||||||
|
|
||||||
function git_color {
|
|
||||||
local git_status="$(git status 2> /dev/null)"
|
|
||||||
if [[ ! $git_status =~ "Working directory clean" ]]; then
|
|
||||||
echo -e $COLOR_RED
|
|
||||||
elif [[ $git_status =~ "Your branch is ahead of" ]]; then
|
|
||||||
echo -e $COLOR_YELLOW
|
|
||||||
elif [[ $git_status =~ "Nothing to commit" ]]; then
|
|
||||||
echo -e $COLOR_GREEN
|
|
||||||
else
|
|
||||||
echo -e $COLOR_OCHRE
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function git_branch {
|
|
||||||
local git_status="$(git status 2> /dev/null)"
|
|
||||||
local on_branch="On branch ([^${IFS}]*)"
|
|
||||||
local on_commit="HEAD detached at ([^${IFS}]*)"
|
|
||||||
|
|
||||||
if [[ $git_status =~ on_branch ]]; then
|
|
||||||
local branch=${BASH_REMATCH[1]}
|
|
||||||
echo "[$branch]"
|
|
||||||
elif [[ $git_status =~ $on_branch ]]; then
|
|
||||||
local commit=${BASH_REMATCH[1]}
|
|
||||||
echo "[$commit]"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
PS1='\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]'
|
|
||||||
PS1+="\[\$(git_color)\]" # colors git status
|
|
||||||
PS1+="\$(git_branch)" # prints current branch
|
|
||||||
PS1+="\[$COLOR_BLUE\]\[$COLOR_RESET\]\$ "
|
|
||||||
export PS1
|
|
||||||
|
|
||||||
export LC_ALL=en_US.UTF-8
|
|
||||||
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
|
||||||
alias ls="ls -Gp"
|
|
|
@ -10,30 +10,36 @@ plug('morhetz/gruvbox')
|
||||||
plug('ap/vim-css-color')
|
plug('ap/vim-css-color')
|
||||||
plug('ap/vim-buftabline')
|
plug('ap/vim-buftabline')
|
||||||
plug('dag/vim-fish')
|
plug('dag/vim-fish')
|
||||||
|
plug('kassio/neoterm')
|
||||||
|
plug('tpope/vim-dispatch')
|
||||||
|
plug('radenling/vim-dispatch-neovim')
|
||||||
plug('clojure-vim/clojure.vim', {['for'] = 'clojure'})
|
plug('clojure-vim/clojure.vim', {['for'] = 'clojure'})
|
||||||
|
plug('Olical/conjure', {['for'] = 'clojure'})
|
||||||
|
plug('tpope/vim-fireplace', {['for'] = 'clojure'})
|
||||||
|
plug('guns/vim-clojure-highlight', {['for'] = 'clojure'})
|
||||||
|
plug('guns/vim-clojure-static', {['for'] = 'clojure'})
|
||||||
|
plug('clojure-vim/vim-jack-in', {['for'] = 'clojure'})
|
||||||
|
plug('luochen1990/rainbow')
|
||||||
plug('scrooloose/nerdtree', { on = 'NERDTreeToggle'})
|
plug('scrooloose/nerdtree', { on = 'NERDTreeToggle'})
|
||||||
plug('fatih/vim-go', { ['for'] = 'go' })
|
plug('fatih/vim-go', { ['for'] = 'go' })
|
||||||
plug('tree-sitter/tree-sitter')
|
plug('tree-sitter/tree-sitter')
|
||||||
plug('tpope/vim-surround')
|
plug('tpope/vim-surround')
|
||||||
plug('tpope/vim-fireplace', {['for'] = 'clojure'})
|
|
||||||
plug('neovim/nvim-lsp')
|
plug('neovim/nvim-lsp')
|
||||||
plug('neovim/nvim-lspconfig')
|
plug('neovim/nvim-lspconfig')
|
||||||
plug('junegunn/goyo.vim', {['for'] = 'markdown'})
|
plug('junegunn/goyo.vim', {['for'] = 'markdown'})
|
||||||
plug('junegunn/fzf', {['dir'] = '~/.fzf', ['do'] = './install --all'})
|
plug('junegunn/fzf', {['dir'] = '~/.fzf', ['do'] = './install --all'})
|
||||||
plug('junegunn/fzf.vim')
|
plug('junegunn/fzf.vim')
|
||||||
plug('jiangmiao/auto-pairs')
|
plug('jiangmiao/auto-pairs')
|
||||||
plug('guns/vim-clojure-highlight', {['for'] = 'clojure'})
|
|
||||||
plug('guns/vim-clojure-static', {['for'] = 'clojure'})
|
|
||||||
plug('luochen1990/rainbow', {['for'] = 'clojure'})
|
|
||||||
plug('docunext/closetag.vim')
|
plug('docunext/closetag.vim')
|
||||||
plug('norcalli/nvim_utils')
|
plug('norcalli/nvim_utils')
|
||||||
plug('hrsh7th/nvim-cmp')
|
plug('hrsh7th/nvim-cmp')
|
||||||
plug('hrsh7th/cmp-buffer')
|
plug('hrsh7th/cmp-buffer')
|
||||||
plug('hrsh7th/cmp-nvim-lsp')
|
plug('hrsh7th/cmp-nvim-lsp')
|
||||||
|
plug('saadparwaiz1/cmp_luasnip')
|
||||||
plug('l3mon4d3/luasnip')
|
plug('l3mon4d3/luasnip')
|
||||||
plug('leafgarland/typescript-vim', {['for'] = 'typescript'})
|
plug('leafgarland/typescript-vim', {['for'] = 'typescript'})
|
||||||
vim.call('plug#end')
|
vim.call('plug#end')
|
||||||
pcall(require, 'nvim_utils')
|
pcall(require, 'nvim_utils')
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
-- Basic editor configurations
|
-- Basic editor configurations
|
||||||
set.tabstop = 4
|
set.tabstop = 4
|
||||||
|
@ -83,28 +89,52 @@ cmp.setup({
|
||||||
{ name = 'luasnip' }
|
{ name = 'luasnip' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
local cmp_capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
-- Colors
|
-- Colors
|
||||||
vim.cmd('syntax enable')
|
vim.cmd('syntax enable')
|
||||||
vim.cmd('colo gruvbox')
|
vim.cmd('colo gruvbox')
|
||||||
vim.o.background = 'light'
|
vim.o.background = 'light'
|
||||||
-- Clojure/Common Lisp specific configurations
|
-- Rainbow Parens for Clojure, and Lisp
|
||||||
-- Clojure and Common Lisp style is 2 space indent
|
|
||||||
-- https://guide.clojure.style
|
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
filetype on
|
filetype on
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
autocmd Filetype clojure,clj,lisp,lsp,cl,l let g:rainbow_active=1
|
autocmd Filetype clojure,clj,lisp,lsp,cl,l :RainbowToggle
|
||||||
]])
|
]])
|
||||||
require('lspconfig')['clojure_lsp'].setup{ capabilities = cmp_capabilities }
|
-- Auto complete
|
||||||
-- Go specific configurations
|
local opts = { noremap=true, silent=true }
|
||||||
require('lspconfig')['gopls'].setup{ capabilities = cmp_capabilities }
|
map('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
||||||
-- C/C++ specific configurations
|
map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
||||||
require('lspconfig')['clangd'].setup{ capabilities = cmp_capabilities }
|
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
||||||
-- TypeScript specific configurations
|
map('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
|
||||||
require('lspconfig')['tsserver'].setup{ capabilities = cmp_capabilities }
|
local on_attach = function(client, bufnr)
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||||
|
end
|
||||||
|
local cmp_capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
local servers = { 'clojure_lsp', 'gopls', 'clangd', 'tsserver' }
|
||||||
|
for _, lsp in pairs(servers) do
|
||||||
|
require('lspconfig')[lsp].setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = cmp_capabilities,
|
||||||
|
flags = {
|
||||||
|
debounce_text_changes = 150,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
-- 2 Tab space standard languages
|
-- 2 Tab space standard languages
|
||||||
|
-- Clojure and Common Lisp style is 2 space indent
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
autocmd Filetype clojure,clj,lisp,lsp,cl,l,javascript,js,typescript,ts setlocal tabstop=2 shiftwidth=2
|
autocmd Filetype clojure,clj,lisp,lsp,cl,l,javascript,js,typescript,ts setlocal tabstop=2 shiftwidth=2
|
||||||
]])
|
]])
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
#
|
|
||||||
# Ralwey Fowler's .kshrc
|
|
||||||
# Last edited: April 25th, 2022
|
|
||||||
#
|
|
||||||
|
|
||||||
# I use NeoVim exclusively on OpenBSD.
|
|
||||||
alias vi=nvim
|
|
||||||
alias vim=nvim
|
|
||||||
alias ls=colorls
|
|
||||||
|
|
||||||
# I'm a noob, I know.
|
|
||||||
alias sudo=doas
|
|
||||||
|
|
||||||
# For some reason ruby on OpenBSD is ruby30 or gem30 or ruby27 etc, sort of nice for version control but annoying to type.
|
|
||||||
alias ruby=ruby30
|
|
||||||
alias gem=gem30
|
|
||||||
|
|
||||||
# PS1 is the prompt for your shell.
|
|
||||||
# This translates to '[USER@HOST /curr/dir]$ '
|
|
||||||
PS1='[${USER}@${HOST} ${PWD}]$ '
|
|
||||||
|
|
||||||
export vi vim ls sudo ruby gem PS1
|
|
|
@ -1,4 +0,0 @@
|
||||||
export PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
|
|
||||||
export ENV=$HOME/.kshrc
|
|
||||||
export HOME
|
|
||||||
export TERM
|
|
Loading…
Reference in a new issue