From 8defbe09d5fc4313db5d7b1d208431c2a54d0a55 Mon Sep 17 00:00:00 2001 From: Garrit Franke Date: Thu, 10 Jun 2021 09:42:58 +0200 Subject: [PATCH] feat(vim): saner defaults --- .config/nvim/autoload/languageserver.vim | 0 .config/nvim/autoload/sets.vim | 21 +++++++++++++++++++++ .config/nvim/init.vim | 11 +++++++---- .zshrc | 11 +++++++++-- 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .config/nvim/autoload/languageserver.vim create mode 100644 .config/nvim/autoload/sets.vim diff --git a/.config/nvim/autoload/languageserver.vim b/.config/nvim/autoload/languageserver.vim new file mode 100644 index 0000000..e69de29 diff --git a/.config/nvim/autoload/sets.vim b/.config/nvim/autoload/sets.vim new file mode 100644 index 0000000..9b3c674 --- /dev/null +++ b/.config/nvim/autoload/sets.vim @@ -0,0 +1,21 @@ +set number relativenumber " Show line numbers in relative manner +set mouse=a " Enable mouse +set updatetime=300 " Quicker update time means snappier feedback +set mousemodel=popup_setpos +set tabstop=4 softtabstop=4 +set shiftwidth=4 +set smartindent +set expandtab +set backspace=indent,eol,start +set showmatch +set noswapfile +set nobackup +set nowritebackup +set shortmess+=c " Don't pass messages to |ins-completion-menu|. +set ignorecase +set scrolloff=8 +set hidden +set linebreak +set laststatus=2 +set noshowmode +set nohlsearch diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index e2cb811..8603202 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -16,8 +16,9 @@ Plug 'scrooloose/nerdtree' Plug 'prettier/vim-prettier' Plug 'tpope/vim-fugitive' Plug 'airblade/vim-gitgutter' -Plug 'pangloss/vim-javascript' Plug 'mxw/vim-jsx' +Plug 'jelera/vim-javascript-syntax' +Plug 'luochen1990/rainbow' " FZF Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } @@ -246,6 +247,9 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr " Mirror the NERDTree before showing it. This makes it the same on all tabs. nnoremap :NERDTreeMirror:NERDTreeFind +" Rainbow Brackets +let g:rainbow_active = 1 + " ----------------------- " Remaps " ----------------------- @@ -261,7 +265,6 @@ nnoremap j gj " NerdTree bindings nnoremap :NERDTreeToggle -nnoremap :NERDTreeFind " ctrl alt up/down (Move lines) nnoremap :m .+1== @@ -276,8 +279,8 @@ nnoremap Telescope live_grep vnoremap Telescope live_grep " ctrl p (Find file) -nnoremap Telescope find_files -vnoremap Telescope find_files +nnoremap Telescope find_files +vnoremap Telescope find_files " Use yank to copy to clipboard vnoremap y "*y diff --git a/.zshrc b/.zshrc index 7d8cea4..699ae7b 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,4 @@ + # Path to your oh-my-zsh installation. export ZSH="$HOME/.oh-my-zsh" export EDITOR="/usr/local/bin/nvim" @@ -11,8 +12,14 @@ export PATH=$PATH:~/sources/scripts/ # Add cargo export PATH=$PATH:~/.cargo/bin -# Add brew -export PATH=/opt/homebrew/bin:$PATH +# Add homebrew (multiple platforms) +CPU=$(uname -p) +if [[ "$CPU" == "arm" ]]; then + export PATH="/opt/homebrew/bin:$PATH" + alias oldbrew=/usr/local/bin/brew +else + export PATH="/usr/local/bin:$PATH" +fi # LLVM export PATH="/usr/local/opt/llvm/bin:$PATH"