1
1
Fork 0

Progress WIP

This commit is contained in:
Ava Gaiety Wroten 2022-04-07 22:36:29 -05:00
parent 141afbad3d
commit dfa005bb25
9 changed files with 177 additions and 262 deletions

30
.zshrc Normal file
View file

@ -0,0 +1,30 @@
# Vim key bindings
bindkey -v
# fzf keybindings
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Zi - Not working? Ensure this file is sourced AFTER ziinit is ran in the `.zshrc` file
zi pack for ls_colors
zi ice depth"1"
zi light romkatv/powerlevel10k
zi light z-shell/zzcomplete
zi snippet 'https://github.com/zpm-zsh/colors/blob/master/colors.plugin.zsh'
zi light Aloxaf/fzf-tab
zi snippet OMZ::plugins/git/git.plugin.zsh
zi snippet 'https://github.com/zsh-users/zsh-autosuggestions/blob/master/zsh-autosuggestions.zsh'
zi snippet 'https://github.com/CurryEleison/zsh-asdf-prompt/blob/main/zsh-asdf-prompt.plugin.zsh'
zi snippet 'https://github.com/kalsowerus/zsh-bitwarden/blob/master/zsh-bitwarden.plugin.zsh'
zi snippet 'https://github.com/walesmd/caniuse.plugin.zsh/blob/master/caniuse.plugin.zsh'
zi snippet 'https://github.com/mdumitru/fancy-ctrl-z/blob/master/fancy-ctrl-z.zsh'
zi snippet 'https://github.com/zpm-zsh/ls/blob/master/ls.plugin.zsh'
zi snippet 'https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/zsh-syntax-highlighting.zsh'
zi snippet 'https://github.com/laurenkt/zsh-vimto/blob/master/zsh-vimto.zsh'
# zi snippet 'https://github.com/softmoth/zsh-vim-mode/blob/main/zsh-vim-mode.plugin.zsh'
zi ice depth=1
zi light jeffreytse/zsh-vi-mode
zi ice as"program" pick"bin/git-dsf"
zi light z-shell/zsh-diff-so-fancy
ZSH_BITWARDEN_COPY_CMD=pbcopy
echo zsh file sourced

View file

@ -1,17 +1,15 @@
# Gaiety's Dotfiles
Designed for Linux (Arch) and MacOS.
Designed for MacOS.
## Setup
[Install asdf](https://asdf-vm.com/#/core-manage-asdf) version manager
* [Install asdf](https://asdf-vm.com/#/core-manage-asdf) version manager `brew install asdf`
* `brew install extraterm`
* `brew install neovim`
* `brew install fzf` & `$(brew --prefix)/opt/fzf/install`
* `sh -c "$(curl -fsSL https://git.io/get-zi)" --`
Several tools can find configs by setting the fish variable below:
First [follow the steps to install and use the fish shell](./fish/README.md)
```bash
set -Ux XDG_CONFIG_HOME {location_of_dotfiles}
sudo pacman -S ripgrep # brew install ripgrep
sudo pacman -S sed
```sh
npm i -g pyright
sh init
```

1
init
View file

@ -3,5 +3,4 @@ BASEDIR=$(cd $(dirname $0) && pwd)
mkdir -p ~/.config/nvim
ln -sf $BASEDIR/nvim/init.vim ~/.config/nvim/init.vim
rm -f ~/.zshrc
echo source $BASEDIR/.zshrc >> ~/.zshrc

View file

@ -1,15 +0,0 @@
# Gaiety's Dotfiles
## Neovim
Vim alternative `nvim`.
## Setup
```bash
mkdir ~/.config/nvim/vim-plug
sudo pacman -S neovim
sudo pacman -S ctags
```

View file

@ -1,34 +0,0 @@
" - Config -
"" Encoding
set encoding=utf8
"" Disable modeline
set nomodeline
"" System undo levels
set undofile
set undolevels=100
"" Indenting
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
"" Disable error sounds
set noerrorbells
"" Stop word wrapping
set nowrap
"" Show invisible characters
set conceallevel=1
"" Enable search highlighting
set hlsearch
"" Line Numbers
set number relativenumber
"" Top/Bottom scroll padding
set scrolloff=3
set sidescrolloff=5
"" Enable autoread if file changes
set autoread
"" Hide Buffers
set hidden
"" Statusline
set laststatus=0
"" termguicolors
set termguicolors

View file

@ -1,52 +0,0 @@
# Gaiety's Neovim Help
## Keys
### Global
* `Spacebar` Leader
* `<Leader>? {or /}` Open _this_ help file
### Panes
* `Ctrl h {or j, k, l}` Change pane up, down, left or right
### Buffers
* `<Leader>w` Save
* `Esc Esc` Close buffer
* `<Leader><Leader>` Reopen buffer
* `Tab {or Shift Tab}` Next (or previous) buffer
* `<Leader>fb` Fuzzy find by buffer
* `<Leader>hR` Git reset buffer
### Editing
* `<Leader>k {or j}` Move **current** line up/down
* **Insert Mode** `Tab` Autocomplete
* `<Leader>ta` Toggle Alternative (false/true)
### Browsing Files
* `<Leader>{tilde}` Open file browser
* `<Leader>ff` Fuzzy find files in git project
* `<Leader>fg` Grep searches in git project
### Registers
* `"` See (and use) registers
* `<Leader>fr` Fuzzy find by registers
### Git
* `<Leader>fgb` Fuzzy find by git branches
* `<Leader>fgc` Fuzzy find by git commits
* `<Leader>fgt` Fuzzy find by git tags
* `<Leader>gb` Blame **current** line
* `<Leader>hn {or hp}` Go to next or previous hunk
* `<Leader>hs` Stage **current** hunk
* `<Leader>hu` Undo stage hunk
* `<Leader>hp` Preview hunk
* `<Leader>hr` Reset hunk
* `<Leader>hR` Reset buffer

View file

@ -1,2 +1,140 @@
"" Encoding
set encoding=utf8
"" Disable modeline
set nomodeline
"" System undo levels
set undofile
set undolevels=100
" Line Numbers
set number
set relativenumber
"" Stop word wrapping
set nowrap
"" Hide Buffers
set hidden
"" Statusline
set laststatus=0
"" Top/Bottom scroll padding
set scrolloff=3
set sidescrolloff=5
" Colors
set termguicolors
" Misc
set title
" Indentation
set softtabstop=2
set tabstop=2
set shiftwidth=2
set autoindent
" Syntax
syntax on
" Save on close
set confirm
" Use system clipboard
set clipboard=unnamedplus
" Faster scrolling
set ttyfast
" Search
set hlsearch
set smartcase
set showmatch
" Undo
set undolevels=1000
" auto-install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'BurntSushi/ripgrep'
Plug 'sharkdp/fd'
Plug 'baliestri/aura-theme', { 'branch': 'feat/neovim-port', 'rtp': 'packages/neovim' }
Plug 'lukelbd/vim-toggle'
Plug 'kyazdani42/nvim-tree.lua'
Plug 'dense-analysis/ale'
call plug#end()
" Use aura theme installed above
colorscheme aura-soft-dark
" - Core Key Bindings -
"" Map Leader to spacebar
let mapleader=" "
"" Shortcut to save
nnoremap <Leader>w :w<CR>
"" Moving current lines up/down
nnoremap <Leader>k :<c-u>execute 'move -1-'. v:count1<cr>
nnoremap <Leader>j :<c-u>execute 'move +'. v:count1<cr>
"" Buffers Next/Previous
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprev<CR>
"" Shortcut to close buffer
nnoremap <Esc><Esc> :bd<CR>
"" Shortcut to reopen closed buffer
nmap <Leader><Leader> <c-^>
"" Toggle
let g:toggle_map = '<C-a>'
"" Tree
lua require'nvim-tree'.setup {}
let g:nvim_tree_icons = {
\ 'default': "",
\ 'symlink': "",
\ 'git': {
\ 'unstaged': "✗",
\ 'staged': "✓",
\ 'unmerged': "",
\ 'renamed': "➜",
\ 'untracked': "★",
\ 'deleted': "R",
\ 'ignored': "◌"
\ },
\ 'folder': {
\ 'arrow_open': ">",
\ 'arrow_closed': "<",
\ 'default': "",
\ 'open': "",
\ 'empty': "=",
\ 'empty_open': "==",
\ 'symlink': "-",
\ 'symlink_open': "--",
\ }
\ }
nnoremap <Leader>` :NvimTreeToggle<CR>
"" Lint
let b:ale_fixers = ['prettier', 'eslint']
"" LSP
lua <<EOF
require'lspconfig'.pyright.setup{}
EOF
"" Telescope
nnoremap <leader>ff <cmd>Telescope find_files<cr>

View file

@ -1,32 +0,0 @@
" - Core Key Bindings -
"" Map Leader to spacebar
let mapleader=" "
"" Open Custom Help
nnoremap <Leader>? :e $XDG_CONFIG_HOME/nvim/help.md<cr>
nnoremap <Leader>/ :e $XDG_CONFIG_HOME/nvim/help.md<cr>
"" Shortcut to save
nnoremap <Leader>w :w<CR>
"" Moving current lines up/down
nnoremap <Leader>k :<c-u>execute 'move -1-'. v:count1<cr>
nnoremap <Leader>j :<c-u>execute 'move +'. v:count1<cr>
"" Buffers Next/Previous
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprev<CR>
"" Shortcut to close buffer
nnoremap <Esc><Esc> :bd<CR>
"" Shortcut to reopen closed buffer
nmap <Leader><Leader> <c-^>
" - Plugin Key Bindings -
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files find_command=rg,--ignore,--hidden,--files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fr <cmd>Telescope registers<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fgb <cmd>Telescope git_branches<cr>
nnoremap <leader>fgc <cmd>Telescope git_commits<cr>
nnoremap <leader>fgt <cmd>Telescope tags<cr>
" fern
nnoremap <Leader>` :Fern . -reveal=%<CR>
" toggle alternative
nnoremap <Leader>ta :ToggleAlternate<CR>

View file

@ -1,117 +0,0 @@
" auto-install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall
"autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
" ale before
let g:ale_completion_enabled = 1
let g:ale_completion_autoimport = 1
call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'christoomey/vim-tmux-navigator'
Plug 'mhinz/vim-startify'
Plug 'dracula/vim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'ourigen/skyline.vim'
Plug 'romgrk/barbar.nvim'
Plug 'ojroques/vim-oscyank'
Plug 'sjl/vitality.vim'
Plug 'dense-analysis/ale'
Plug 'tpope/vim-commentary'
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
Plug 'lifepillar/vim-mucomplete'
Plug 'wellle/context.vim'
Plug 'Yggdroot/indentLine'
Plug 'lambdalisue/fern.vim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'lewis6991/gitsigns.nvim'
Plug 'junegunn/vim-peekaboo'
Plug 'rmagatti/alternate-toggler'
Plug 'pangloss/vim-javascript'
Plug 'vim-ruby/vim-ruby'
Plug 'mustache/vim-mustache-handlebars'
call plug#end()
" dracula colorscheme
let g:dracula_colorterm = 0 " Set background as transparent
colorscheme dracula
" ale
let b:ale_fixers = ['prettier', 'eslint']
" prettier
let g:prettier#autoformat_config_present = 1
" javascript
let g:javascript_plugin_jsdoc = 1
let g:javascript_conceal_function = "ƒ"
" mucomplete
set completeopt+=menuone
set completeopt+=noselect
set shortmess+=c " Shut off completion messages
" indentLine
let g:indentLine_char_list = ['|', '¦', '┆', '┊']
" oscyank
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '+' | OSCYankReg + | endif
" gitsigns
lua << EOF
require('gitsigns').setup {
keymaps = {
noremap = true,
buffer = true,
['n <leader>hn'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
['n <leader>hp'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
['n <leader>hR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
['n <leader>hd'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
['n <leader>gb'] = '<cmd>lua require"gitsigns".blame_line()<CR>',
}
}
EOF
set statusline+=%{get(b:,'gitsigns_status','')}
"" skyline
let g:skyline_encoding = 0
let g:skyline_gitbranch = 1
"" vim-startify
let g:startify_custom_header = [
\ 'Gaiety | 2021',
\ ' .:::: .:: .:: .:: ',
\ ' .: .:: .:: .:: .:: .:: .:: ',
\ '.:: .:: .:: .:::: .:.: .: .:: .:: .::: .:: .:: .:: .:.: .:',
\ '.:: .: .: .:: .:: .:: .:: .:: .:: .:: .:: .: .:: .: .:: .:: ',
\ '.:: .::::.:: .::.:: .:: .::: .:: .:: .:: .:: .:: .: .::.::::: .:: .:: ',
\ ' .:: .: .: .:: .:: .:: .:: .:: .:: .:: .:: .:: .:: .: .::.: .:: ',
\ ' .::::: .:: .:: .:: .:: .:: .:: .:::: .:: .::: .: .:: .:::: .:: ',
\ '',
\ 'MAPPING ACTION',
\ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━',
\ '<Space> Leader',
\ '<Leader>? List Bindings',
\ '',
\ ]
let g:startify_change_to_dir = 0