Skip to content

Commit

Permalink
switch theme and use vim plug for vim package management
Browse files Browse the repository at this point in the history
  • Loading branch information
jobstoit committed Aug 6, 2023
1 parent 7d57e8f commit 99dc8f1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
13 changes: 1 addition & 12 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,18 @@ mkdir -p ~/.config/profile.d
mkdir -p $NVIM_PATH/colors
mkdir -p $NVIM_PLUGIN

[ -d ~/.oh-my-zsh ] || sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
sudo usermod --shell $(which zsh) $USER
[ -d ~/.oh-my-zsh ] || sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

cp -f $DOTFILES_ROOT/vim/citylights.vim $NVIM_PATH/colors/citylights.vim
cp -f $DOTFILES_ROOT/vim/init.vim $NVIM_PATH/init.vim
cp -f $DOTFILES_ROOT/.profile ~/.config/profile.d/personal
cp -f $DOTFILES_ROOT/.bashrc ~/.bashrc
cp -f $DOTFILES_ROOT/.zshrc ~/.zshrc

# Install brew package manager
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" && \
[ $(uname) = "Linux" ] && /home/linuxbrew/.linuxbrew/bin/brew shellenv >> ~/.config/profile.d/_brew && \
. ~/.config/profile.d/_brew

# Install neovim
brew install neovim && \
nvim --version

# Install vim plugins
git clone https://github.com/itchyny/lightline.vim.git $NVIM_PLUGIN/lightline.vim
git clone https://github.com/mattn/emmet-vim.git $NVIM_PLUGIN/emmet-vim
git clone https://github.com/neovim/nvim-lspconfig.git $NVIM_PLUGIN/nvim-lspconfig

# Donwload tools
[ -z $GOLANG_DISABLED ] && GOLANG_DISABLED='false'
[ -z $RUST_DISABLED ] && RUST_DISABLED='false'
Expand Down
2 changes: 0 additions & 2 deletions golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ go install -v github.com/uudashr/gopkgs/cmd/gopkgs@v2 && \
go install -v honnef.co/go/tools/cmd/staticcheck@latest && \
sudo rm -rf $GOPATH/src $GOPATH/pkg $HOME/.cache/go $HOME/.cache/go-build

# nvim plugins
git clone https://github.com/fatih/vim-go.git ~/.config/nvim/pack/plugins/start/vim-go
2 changes: 0 additions & 2 deletions rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
source "$HOME/.cargo/env" && \
cargo version

# neovim config
git clone https://github.com/rust-lang/rust.vim.git ~/.config/nvim/pack/plugins/start/rust.vim
43 changes: 34 additions & 9 deletions vim/init.vim
Original file line number Diff line number Diff line change
@@ -1,31 +1,56 @@
" General
syntax on
filetype plugin indent on
call plug#begin()
" Language support
Plug 'neovim/nvim-lspconfig'
Plug 'fatih/vim-go', { 'tag': '*' }
Plug 'rust-lang/rust.vim'
Plug 'hashivim/vim-terraform'

" Tools
Plug 'itchyny/lightline.vim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.2' }

" Colors
Plug 'tjdevries/colorbuddy.vim'
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
Plug 'jordanbrauer/citylights.nvim'
Plug 'joshdick/onedark.vim'
call plug#end()

"syntax on
"filetype plugin indent on
set number

" set relateive numbers
set relativenumber
let mapleader = "\<Space>"

" Theming
colorscheme citylights
hi! Normal ctermbg=NONE guibg=NONE
hi! LineNr ctermbg=NONE guibg=NONE
hi! NonText ctermbg=NONE guibg=NONE
colorscheme catppuccin-macchiato
let g:lightline = {'colorscheme': 'catppuccin'}

" Key mapping
nmap - :Ex<CR>
nmap \ :vsp .<CR>
nmap <C-l> :lnext<CR>
nmap <C-h> :lprevious<CR>
nmap <C-j> :cnext<CR>
nmap <C-k> :cprevious<CR>
nmap <C-\> :tabe<CR>:terminal<CR><C-w>j:q<CR>
"nmap <C-\> :tabe<CR>:terminal<CR><C-w>j:q<CR>

" Nvim Terminal remap
tnoremap <Esc> <C-\><C-n>
tnoremap <C-w> <Esc><C-w>
tnoremap <g-t> <Esc><C-w>gt
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
" autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 200)
"
set completeopt-=preview

if executable('cargo')
Expand All @@ -46,6 +71,6 @@ lua << EOF
})
EOF

autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 200)
autocmd FileType typescript setlocal formatprg=prettier\ --parser\ typescript
endif

0 comments on commit 99dc8f1

Please sign in to comment.