Created
February 1, 2022 17:47
-
-
Save jakescript/974ad10d73eb3fde994766a98b01f479 to your computer and use it in GitHub Desktop.
init.vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nu | |
set relativenumber | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set smarttab | |
set smartindent | |
set nohlsearch | |
set hidden | |
set noerrorbells | |
set nowrap | |
set noswapfile | |
set nobackup | |
set undodir=~/.vim/undodir | |
set undofile | |
set incsearch | |
set scrolloff=8 | |
set signcolumn=yes | |
set colorcolumn=80 | |
set background=dark | |
set cmdheight=2 | |
set updatetime=300 | |
set showtabline=2 | |
call plug#begin('~/.vim/plugged') | |
Plug 'NLKNguyen/papercolor-theme' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'nvim-telescope/telescope.nvim' | |
Plug 'nvim-lua/plenary.nvim' | |
Plug 'preservim/nerdtree' | |
Plug 'PhilRunninger/nerdtree-buffer-ops' | |
Plug 'nvim-treesitter/nvim-treesitter' | |
Plug 'pangloss/vim-javascript' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'peitalin/vim-jsx-typescript' | |
Plug 'styled-components/vim-styled-components', { 'branch': 'main' } | |
Plug 'jparise/vim-graphql' | |
Plug 'rafi/awesome-vim-colorschemes' | |
Plug 'tpope/vim-fugitive' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'BurntSushi/ripgrep' | |
Plug 'terrortylor/nvim-comment' | |
Plug 'JoosepAlviste/nvim-ts-context-commentstring' | |
call plug#end() | |
let mapleader = ' ' | |
let g:airline_theme='gruvbox' | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:coc_global_extension = [ 'coc-tsserver', 'coc-pairs', 'coc-json', 'coc-eslint', 'coc-prettier'] | |
let g:gruvbox_contrast_dark='hard' | |
colorscheme gruvbox | |
lua <<EOF | |
require('telescope').setup{ | |
defaults = { file_ignore_patterns = { "node_modules", "wp*" }} | |
} | |
require('nvim_comment').setup{ | |
comment_empty=false, | |
line_mapping = "<C-c>", operator_mapping = "<C-_>", | |
hook = function() | |
require("ts_context_commentstring.internal").update_commentstring() | |
end | |
} | |
require('nvim-treesitter.configs').setup { | |
context_commentstring = { | |
enable = true, | |
config = { | |
javascript = { | |
__default = '// %s', | |
jsx_element = '{/* %s */}', | |
jsx_fragment = '{/* %s */}', | |
jsx_attribute = '// %s', | |
comment = '// %s' | |
} | |
} | |
}, | |
highlight = { | |
enable = true, | |
additional_vim_regex_highlighting = false, | |
}, | |
} | |
EOF | |
nnoremap <C-b> :Telescope buffers<CR> | |
nnoremap <C-p> :Telescope git_files<CR> | |
nnore <leader>ps :lua require('telescope.builtin').grep_string({ search = vim.fn.input(" Grep find > " ) })<CR> | |
nmap <leader>gs :G<CR> | |
nmap <F1> :NERDTreeToggle<CR> | |
nmap <leader>gs :G<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment