Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- packloadall
- set nocompatible
- filetype plugin on
- syntax on
- " SET
- set background=dark
- set termguicolors
- set clipboard=unnamedplus
- set nu rnu
- set wrap linebreak
- set number nobackup nowritebackup splitbelow splitright
- set mouse=a
- set autoindent
- set shiftwidth=4
- set smarttab
- set nohlsearch
- set termguicolors
- set ttimeoutlen=50
- set backspace=indent,eol,start
- set incsearch
- " set hlsearch
- set ignorecase
- set smartcase
- " set omnifunc
- " set rtp+=~/.fzf
- " set list
- set fillchars=vert:\
- " LET
- let g:python3_host_prog = "/usr/bin/python3"
- " Set the diagnostic popup to never show
- let g:airline_theme='deus'
- let g:lsp_signs_enable = v:false
- let g:lsp_diagnostics_enabled = v:false
- let g:neosnippet#snippets_directory='~/.vim/plugged/vim-snippets/snippets'
- let NERDTreeShowHidden=1
- let g:vimwiki_list = [{'path': '~/wiki/', 'syntax': 'markdown'}]
- " Initialize configuration dictionary
- let g:fzf_vim = {}
- let g:fzf_vim.preview_window = ['hidden,right,50%,<70(up,40%)', 'ctrl-/']
- let g:easycomplete_nerd_font = 1
- let g:easycomplete_winborder = 10
- let g:easycomplete_pum_format = ["kind", "abbr", "menu"]
- let g:easycomplete_diagnostics_next = "<C-j>"
- " let g:easycomplete_diagnostics_previous = "<C-k>"
- let g:UltiSnipsExpandTrigger='<cr>'
- let g:UltiSnipsJumpForwardTrigger='<c-b>'
- let g:UltiSnipsJumpBackwardTrigger='<c-z>'
- let g:UltiSnipsListSnippets='<c-l>'
- " COLORSCHEME
- colorscheme gruvbox
- set t_Co=256
- if &term =~ '256color'
- set t_ut=
- endif
- " INSERT MODE MAPPINGS
- inoremap ( ()<Left>
- inoremap (( (
- inoremap [ []<Left>
- inoremap [[ [
- inoremap " ""<Left>
- inoremap "" "
- inoremap { {}<Left>
- inoremap {{ {
- inoremap ' ''<Left>
- inoremap '' '
- function! ToggleTexMapping()
- if &filetype != 'tex'
- inoremap ' ''<Left>
- else
- iunmap '
- endif
- endfunction
- augroup NonTexFileMappings
- autocmd!
- autocmd FileType * call ToggleTexMapping()
- augroup END
- if executable('clangd')
- " pip install python-lsp-server
- au User lsp_setup call lsp#register_server({
- \ 'name': 'clangd',
- \ 'cmd': {server_info->['clangd']},
- \ 'allowlist': ['c'],
- \ })
- endif
- function! s:on_lsp_buffer_enabled() abort
- setlocal omnifunc=lsp#complete
- setlocal signcolumn=yes
- if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
- nmap <buffer> gd <plug>(lsp-definition)
- nmap <buffer> gs <plug>(lsp-document-symbol-search)
- nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
- nmap <buffer> gr <plug>(lsp-references)
- nmap <buffer> gi <plug>(lsp-implementation)
- nmap <buffer> gt <plug>(lsp-type-definition)
- nmap <buffer> <leader>rn <plug>(lsp-rename)
- nmap <buffer> [g <plug>(lsp-previous-diagnostic)
- nmap <buffer> ]g <plug>(lsp-next-diagnostic)
- nmap <buffer> K <plug>(lsp-hover)
- " nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
- " nnoremap <buffer> <expr><c-g> lsp#scroll(-4)
- let g:lsp_format_sync_timeout = 1000
- autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
- " refer to doc to add more commands
- endfunction
- augroup lsp_install
- au!
- " call s:on_lsp_buffer_enabled only for languages that has the server registered.
- autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
- augroup END
- " NORMAL MODE MAPPINGS
- nnoremap <C-n> :NERDTreeToggle<CR>
- map <Leader>t :term ++close<cr>
- tmap <Leader>t <c-w>:term ++close<cr>
- nnoremap <leader>ff <cmd>FZF<cr>
- nnoremap <leader>fg <cmd>Ag<cr>
- " VIM-PLUG
- call plug#begin('~/.vim/plugged')
- Plug 'junegunn/vim-easy-align'
- Plug 'prabirshrestha/vim-lsp'
- Plug 'mattn/vim-lsp-settings'
- Plug 'honza/vim-snippets'
- Plug 'junegunn/vim-easy-align'
- Plug 'junegunn/vim-github-dashboard'
- Plug 'lervag/vimtex'
- Plug 'ghifarit53/tokyonight-vim'
- " SNIPPET
- Plug 'Shougo/neosnippet.vim'
- Plug 'prabirshrestha/async.vim'
- Plug 'thomasfaingnaert/vim-lsp-snippets'
- Plug 'thomasfaingnaert/vim-lsp-neosnippet'
- Plug 'Shougo/neosnippet-snippets'
- " Plug 'nvim-lua/plenary.nvim'
- " Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' }
- " or , { 'branch': '0.1.x' }
- Plug 'jayli/vim-easycomplete'
- Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
- Plug 'junegunn/fzf.vim'
- Plug 'sirVer/ultisnips'
- call plug#end()
- " VUNDLE
- set nocompatible " be iMproved, required
- filetype off " required
- " set the runtime path to include Vundle and initialize
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- " alternatively, pass a path where Vundle should install plugins
- "call vundle#begin('~/some/path/here')
- Plugin 'VundleVim/Vundle.vim'
- Plugin 'tpope/vim-fugitive'
- Plugin 'vim-airline/vim-airline'
- Plugin 'vim-airline/vim-airline-themes'
- Plugin 'git://git.wincent.com/command-t.git'
- Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
- call vundle#end() " required
- filetype plugin indent on " required
- syntax enable
- let g:vimtex_view_method = 'zathura'
- let g:vimtex_view_general_viewer = 'okular'
- let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
- let g:vimtex_compiler_method = 'latexmk'
- let maplocalleader = ","
- syntax on
- if ! has('gui_running')
- set ttimeoutlen=10
- augroup FastEscape
- autocmd!
- au InsertEnter * set timeoutlen=0
- au InsertLeave * set timeoutlen=1000
- augroup END
- endif
- hi Normal guibg=NONE ctermbg=NONE
- hi FoldColumn guibg=NONE ctermbg=NONE
- hi SignColumn ctermbg=NONE guibg=NONE
- let g:neosnippet#snippets_directory='~/.vim/plugged/vim-snippets/snippets'
Advertisement
Add Comment
Please, Sign In to add comment