blob: cfe5eec62bf035a8687669984e8c16db1b26a5d1 (
plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
syntax enable
let g:hybrid_custom_term_colors = 1
set background=dark
colorscheme hybrid
set encoding=utf-8
set noswapfile
" CLIPBOARD
set clipboard+=unnamedplus
" indentation and looks
" set relativenumber
set number
set smartindent
set smartcase
set incsearch
set incsearch
" vertical and horizontal splits
set splitbelow splitright
set wildmode=longest
" tabs and stuff
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
" removing white spaces
autocmd BufWritePre * %s/\s\+$//e
" disable auto commenting
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" plugins
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'ryanoasis/vim-devicons'
Plug 'tpope/vim-surround'
Plug 'jiangmiao/auto-pairs'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'preservim/nerdcommenter'
Plug 'sheerun/vim-polyglot'
Plug 'preservim/nerdtree'
"Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'andweeb/presence.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'github/copilot.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neovim/nvim-lspconfig' " LSP
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " AST
Plug 'ThePrimeagen/vim-be-good'
Plug 'rust-lang/rust.vim'
"Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
call plug#end()
" [Tabnine] Autocompletion
set rtp+=~/.vim/plugged/tabnine-vim
" [Rust.vim] Syntax checker provider
let g:syntastic_rust_checkers = ['cargo']
" LSP
lua require'lspconfig'.gopls.setup{}
lua require'lspconfig'.pyright.setup{}
lua require'lspconfig'.tsserver.setup{}
lua require'lspconfig'.rust_analyzer.setup{}
lua require'lspconfig'.bashls.setup{}
lua require'lspconfig'.dartls.setup{}
lua require'lspconfig'.cssls.setup{}
"lua require'lspconfig'.vuels.setup{}
lua require'lspconfig'.svelte.setup{}
"lua require'lspconfig'.graphql.setup{}
let g:presence_neovim_image_text="The One True Text Editor"
let g:presence_main_image="file"
" air-line
let g:airline_powerline_fonts = 1
let g:airline_theme='deus'
"let g:airline#extensions#tabline#enabled = 1
filetype plugin on
filetype plugin indent on
" Disable --INSERT-- (etc.) because it is already shown in the statusline
set noshowmode
"nvim-colorizer settings
"set termguicolors
"lua require'colorizer'.setup()
""" CtrlP
let g:ctrlp_working_path_mode = 'ra'
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<TAB>"
" Cursor highlight line
"hi CursorLine cterm=NONE ctermbg=236
"hi CursorColumn cterm=NONE ctermbg=236
"nnoremap <Leader>b :set cursorline! <CR>
" (Disable/enable) Local cursor line
"augroup CursorLine
"au!
"au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
"au WinLeave * setlocal nocursorline
"augroup END
" remaps
" replace all
nnoremap <C-r> :%s//g<Left><Left>
" vim tree
nnoremap <leader>\ :NERDTreeToggle<CR>
" Start NERDTree. If a file is specified, move the cursor to its window.
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
" Exit Vim if NERDTree is the only window left.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" spell check
map S :setlocal spell! spelllang=en_us<CR>
" movement
map J k
map K j
" Quick save and exit
map zz :wq<CR>
map zx :q!<CR>
map zs :w<CR>
"""NeoVide
if exists("g:neovide")
set guifont="Inconsolata Nerd:h14"
"let g:neovide_transparency = 0.8
let g:neovide_cursor_vfx_mode = "pixiedust"
endif
|