From dfa005bb25ddf3c4c97c50b0628a2e5b2b22cdb1 Mon Sep 17 00:00:00 2001 From: Ava Gaiety Wroten Date: Thu, 7 Apr 2022 22:36:29 -0500 Subject: [PATCH] Progress WIP --- .zshrc | 30 ++++++++++ README.md | 20 +++---- init | 1 - nvim/README.md | 15 ----- nvim/config.vim | 34 ----------- nvim/help.md | 52 ---------------- nvim/init.vim | 138 +++++++++++++++++++++++++++++++++++++++++++ nvim/keybindings.vim | 32 ---------- nvim/plugins.vim | 117 ------------------------------------ 9 files changed, 177 insertions(+), 262 deletions(-) create mode 100644 .zshrc delete mode 100644 nvim/README.md delete mode 100644 nvim/config.vim delete mode 100644 nvim/help.md delete mode 100644 nvim/keybindings.vim delete mode 100644 nvim/plugins.vim diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..5bfc5fb --- /dev/null +++ b/.zshrc @@ -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 diff --git a/README.md b/README.md index d752826..17afec5 100644 --- a/README.md +++ b/README.md @@ -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 ``` - diff --git a/init b/init index 8f1a34a..78b5244 100644 --- a/init +++ b/init @@ -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 diff --git a/nvim/README.md b/nvim/README.md deleted file mode 100644 index 293ae62..0000000 --- a/nvim/README.md +++ /dev/null @@ -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 -``` - - diff --git a/nvim/config.vim b/nvim/config.vim deleted file mode 100644 index c211376..0000000 --- a/nvim/config.vim +++ /dev/null @@ -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 diff --git a/nvim/help.md b/nvim/help.md deleted file mode 100644 index a8d6aa0..0000000 --- a/nvim/help.md +++ /dev/null @@ -1,52 +0,0 @@ -# Gaiety's Neovim Help - -## Keys - -### Global - -* `Spacebar` Leader -* `? {or /}` Open _this_ help file - -### Panes - -* `Ctrl h {or j, k, l}` Change pane up, down, left or right - -### Buffers - -* `w` Save -* `Esc Esc` Close buffer -* `` Reopen buffer -* `Tab {or Shift Tab}` Next (or previous) buffer -* `fb` Fuzzy find by buffer -* `hR` Git reset buffer - -### Editing - -* `k {or j}` Move **current** line up/down -* **Insert Mode** `Tab` Autocomplete -* `ta` Toggle Alternative (false/true) - -### Browsing Files - -* `{tilde}` Open file browser -* `ff` Fuzzy find files in git project -* `fg` Grep searches in git project - -### Registers - -* `"` See (and use) registers -* `fr` Fuzzy find by registers - -### Git - -* `fgb` Fuzzy find by git branches -* `fgc` Fuzzy find by git commits -* `fgt` Fuzzy find by git tags - -* `gb` Blame **current** line -* `hn {or hp}` Go to next or previous hunk -* `hs` Stage **current** hunk -* `hu` Undo stage hunk -* `hp` Preview hunk -* `hr` Reset hunk -* `hR` Reset buffer diff --git a/nvim/init.vim b/nvim/init.vim index abb89b3..ab9a1bd 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -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 w :w +"" Moving current lines up/down +nnoremap k :execute 'move -1-'. v:count1 +nnoremap j :execute 'move +'. v:count1 +"" Buffers Next/Previous +nnoremap :bnext +nnoremap :bprev + "" Shortcut to close buffer + nnoremap :bd + "" Shortcut to reopen closed buffer + nmap +"" Toggle +let g:toggle_map = '' +"" 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 ` :NvimTreeToggle +"" Lint +let b:ale_fixers = ['prettier', 'eslint'] +"" LSP +lua <ff Telescope find_files diff --git a/nvim/keybindings.vim b/nvim/keybindings.vim deleted file mode 100644 index f3a6b54..0000000 --- a/nvim/keybindings.vim +++ /dev/null @@ -1,32 +0,0 @@ -" - Core Key Bindings - -"" Map Leader to spacebar -let mapleader=" " -"" Open Custom Help -nnoremap ? :e $XDG_CONFIG_HOME/nvim/help.md -nnoremap / :e $XDG_CONFIG_HOME/nvim/help.md -"" Shortcut to save -nnoremap w :w -"" Moving current lines up/down -nnoremap k :execute 'move -1-'. v:count1 -nnoremap j :execute 'move +'. v:count1 -"" Buffers Next/Previous -nnoremap :bnext -nnoremap :bprev - "" Shortcut to close buffer - nnoremap :bd - "" Shortcut to reopen closed buffer - nmap - -" - Plugin Key Bindings - -" Find files using Telescope command-line sugar. -nnoremap ff Telescope find_files find_command=rg,--ignore,--hidden,--files -nnoremap fg Telescope live_grep -nnoremap fr Telescope registers -nnoremap fb Telescope buffers -nnoremap fgb Telescope git_branches -nnoremap fgc Telescope git_commits -nnoremap fgt Telescope tags -" fern -nnoremap ` :Fern . -reveal=% -" toggle alternative -nnoremap ta :ToggleAlternate diff --git a/nvim/plugins.vim b/nvim/plugins.vim deleted file mode 100644 index 3f094e8..0000000 --- a/nvim/plugins.vim +++ /dev/null @@ -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 hn'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, - ['n hp'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, - - ['n hs'] = 'lua require"gitsigns".stage_hunk()', - ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', - ['n hr'] = 'lua require"gitsigns".reset_hunk()', - ['n hR'] = 'lua require"gitsigns".reset_buffer()', - ['n hd'] = 'lua require"gitsigns".preview_hunk()', - ['n gb'] = 'lua require"gitsigns".blame_line()', - } - } -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', - \ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', - \ ' Leader', - \ '? List Bindings', - \ '', -\ ] -let g:startify_change_to_dir = 0