diff --git a/configs/.zshrc b/configs/.zshrc index 96a7ffa..a850e9a 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -46,8 +46,6 @@ export PATH=$PATH:/usr/local/go/bin #export SDKMAN_DIR="$HOME/.sdkman" #[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" - - # Go version manager #[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm" @@ -67,6 +65,9 @@ if [ -s "$HOME/.pyenv" ]; then eval "$(pyenv init -)" fi +# For wsl stay in the current dir when splitting panes? +export PROMPT_COMMAND='printf "\e]9;9;%s\e\\" "$(wslpath -m "$PWD")"' + # The next line updates PATH for the Google Cloud SDK. #if [ -f '/home/coder/downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/home/coder/downloads/google-cloud-sdk/path.zsh.inc'; fi @@ -78,4 +79,4 @@ fi # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh \ No newline at end of file +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/configs/init.vim b/configs/init.vim index 4f4464c..9e7cc6c 100644 --- a/configs/init.vim +++ b/configs/init.vim @@ -1,5 +1,16 @@ set number +set tabstop=4 " The width of a TAB is set to 4. + " Still it is a \t. It is just that + " Vim will interpret it to be having + " a width of 4. + +set shiftwidth=4 " Indents will have a width of 4 + +set softtabstop=4 " Sets the number of columns for a TAB + +set expandtab " Expand TABs to spaces + " Plugins will be downloaded under the specified directory. call plug#begin('~/.vim/plugged') @@ -8,25 +19,62 @@ Plug 'tpope/vim-sensible' Plug 'kaicataldo/material.vim', { 'branch': 'main' } Plug 'ryanoasis/vim-devicons' Plug 'preservim/nerdtree' +" A status line to the bottom +Plug 'itchyny/lightline.vim' +Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'evanleck/vim-svelte', {'branch': 'main'} +Plug 'ctrlpvim/ctrlp.vim' +Plug 'mattn/emmet-vim' +Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } " List ends here. Plugins become visible to Vim after this call. call plug#end() -" For Neovim 0.1.3 and 0.1.4 -let $NVIM_TUI_ENABLE_TRUE_COLOR=1 - " Or if you have Neovim >= 0.1.5 if (has("termguicolors")) set termguicolors endif +let g:svelte_preprocessors = ['typescript'] + " Theme syntax enable let g:material_theme_style = 'ocean-community' colorscheme material -let mapleader = "," +let g:lightline = { + \ 'colorscheme': 'one', + \ 'background': 'dark', + \ } +let mapleader = "," +nmap rn (coc-rename) + + +" COC Configs +set updatetime=300 + +" NerdTREE config nmap :NERDTreeToggle +let NERDTreeShowHidden=1 +au VimEnter * NERDTree +nmap h +nmap j +nmap k +nmap l + +autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft() + +" Close all open buffers on entering a window if the only +" buffer that's left is the NERDTree buffer +function! s:CloseIfOnlyNerdTreeLeft() + if exists("t:NERDTreeBufName") + if bufwinnr(t:NERDTreeBufName) != -1 + if winnr("$") == 1 + q + endif + endif + endif +endfunction let g:python3_host_prog = expand('~/.pyenv/shims/python3.9')