-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
133 lines (113 loc) · 3.32 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
" Settings start
set scrolloff=8
set number
"set relativenumber
set termguicolors " enable true colors support
set tabstop=2 softtabstop=4
set shiftwidth=2
set expandtab
set background=dark
set cursorline
set ai
set si
set completeopt=menu,menuone,noselect
set updatetime=100
syntax enable
"set foldenable
"set foldlevelstart=1
"set foldnestmax=10
"set foldmethod=indent
"set foldcolumn=2
set ignorecase
set smartcase
" Settings end
" Plugins start
call plug#begin()
Plug 'mhinz/vim-signify'
Plug 'tpope/vim-fugitive'
Plug 'ayu-theme/ayu-vim'
Plug 'neovim/nvim-lspconfig'
Plug 'glepnir/lspsaga.nvim'
Plug 'folke/lsp-colors.nvim'
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'windwp/nvim-autopairs'
Plug 'morhetz/gruvbox'
Plug 'overcache/NeoSolarized'
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-surround'
Plug 'jiangmiao/auto-pairs'
Plug 'airblade/vim-gitgutter'
Plug 'folke/trouble.nvim'
Plug 'tpope/vim-commentary'
Plug 'lewis6991/gitsigns.nvim'
Plug 'karb94/neoscroll.nvim'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'frenzyexists/aquarium-vim', { 'branch': 'develop' }
Plug 'NLKNguyen/papercolor-theme'
Plug 'sainnhe/gruvbox-material'
Plug 'ayu-theme/ayu-vim' " or other package manager
Plug 'MattesGroeger/vim-bookmarks'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'ms-jpq/chadtree', {'branch': 'chad', 'do': 'python3 -m chadtree deps'}
Plug 'mattn/emmet-vim'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/nvim-cmp'
Plug 'ap/vim-buftabline'
Plug 'mhinz/vim-startify'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'
call plug#end()
" Plugins end
"
" Plugins setup start
lua << EOF
require('gitsigns').setup()
require('neoscroll').setup()
require('colorizer').setup()
require('trouble').setup()
require('lspsaga').init_lsp_saga()
EOF
" Plugins setup end
" Colors start
let ayucolor="light" " for light version of theme
let ayucolor="mirage" " for mirage version of theme
let ayucolor="dark" " for dark version of theme
"colorscheme PaperColor
colorscheme gruvbox-material
" Colors end
" Maps start
let mapleader = " "
nnoremap <leader>g :CHADopen<CR>
inoremap jk <Esc>
nnoremap <leader>bn :bn<CR>
nnoremap <leader>bp :bp<CR>
" move through grep list
nnoremap <C-k> :cnext<CR>
nnoremap <C-j> :cprev<CR>
" move through changeList using <alt + jjj
nnoremap <M-Left> g;
nnoremap <M-Right> g,
"move lines up/down (visually select line and move with Shift + j/k)
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
"reload init.vim
nnoremap <leader><CR> :so ~/.config/nvim/init.vim
"Running auto linter
"? May be need to find lint on save?
nnoremap <leader>t mF:%!eslint_d --stdin --fix-to-stdout --stdin-filename %<CR>`F
vnoremap <leader>f :!eslint_d --stdin --fix-to-stdout<CR>gv
nnoremap <leader>xx <cmd>TroubleToggle<cr>
nnoremap <leader>xw <cmd>TroubleToggle lsp_workspace_diagnostics<cr>
nnoremap <leader>xd <cmd>TroubleToggle lsp_document_diagnostics<cr>
nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
nnoremap gR <cmd>TroubleToggle lsp_references<cr>
nnoremap <silent> ;f <cmd>Telescope find_files<cr>
nnoremap <silent> ;r <cmd>Telescope live_grep<cr>
nnoremap <silent> \\ <cmd>Telescope buffers<cr>
nnoremap <silent> ;; <cmd>Telescope help_tags<cr>
" Maps end