Guest User

Untitled

a guest
Aug 17th, 2025
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. packloadall
  2.  
  3. set nocompatible
  4. filetype plugin on
  5. syntax on
  6.  
  7. " SET
  8. set background=dark
  9. set termguicolors
  10. set clipboard=unnamedplus
  11. set nu rnu
  12. set wrap linebreak
  13. set number nobackup nowritebackup splitbelow splitright
  14. set mouse=a
  15. set autoindent
  16. set shiftwidth=4
  17. set smarttab
  18. set nohlsearch
  19. set termguicolors
  20. set ttimeoutlen=50
  21. set backspace=indent,eol,start
  22. set incsearch
  23. " set hlsearch
  24. set ignorecase
  25. set smartcase
  26. " set omnifunc
  27. " set rtp+=~/.fzf
  28.  
  29. " set list
  30. " set fillchars=vert:\
  31.  
  32. " LET
  33. let g:python3_host_prog = "/usr/bin/python3"
  34. " Set the diagnostic popup to never show
  35. let g:airline_theme='deus'
  36. let g:lsp_signs_enable = v:false
  37. let g:lsp_diagnostics_enabled = v:false
  38. let g:neosnippet#snippets_directory='~/.vim/plugged/vim-snippets/snippets'
  39. let NERDTreeShowHidden=1
  40. let g:vimwiki_list = [{'path': '~/wiki/', 'syntax': 'markdown'}]
  41. " Initialize configuration dictionary
  42. let g:fzf_vim = {}
  43. let g:fzf_vim.preview_window = ['hidden,right,50%,<70(up,40%)', 'ctrl-/']
  44.  
  45. let g:easycomplete_nerd_font = 1
  46. let g:easycomplete_winborder = 10
  47. let g:easycomplete_pum_format = ["kind", "abbr", "menu"]
  48.  
  49. let g:easycomplete_diagnostics_next = "<C-j>"
  50. " let g:easycomplete_diagnostics_previous = "<C-k>"
  51.  
  52.  
  53. " let g:UltiSnipsExpandTrigger='<cr>'
  54. let g:UltiSnipsJumpForwardTrigger='<c-b>'
  55. let g:UltiSnipsJumpBackwardTrigger='<c-z>'
  56. let g:UltiSnipsListSnippets='<c-l>'
  57.  
  58.  
  59. " COLORSCHEME
  60. colorscheme gruvbox
  61.  
  62. set t_Co=256
  63. if &term =~ '256color'
  64. set t_ut=
  65. endif
  66.  
  67.  
  68. " INSERT MODE MAPPINGS
  69. inoremap ( ()<Left>
  70. inoremap (( (
  71. inoremap [ []<Left>
  72. inoremap [[ [
  73. inoremap " ""<Left>
  74. inoremap "" "
  75. inoremap { {}<Left>
  76. inoremap {{ {
  77. inoremap ' ''<Left>
  78. inoremap '' '
  79.  
  80.  
  81. function! ToggleTexMapping()
  82. if &filetype != 'tex'
  83. inoremap ' ''<Left>
  84. else
  85. iunmap '
  86. endif
  87. endfunction
  88.  
  89. augroup NonTexFileMappings
  90. autocmd!
  91. autocmd FileType * call ToggleTexMapping()
  92. augroup END
  93.  
  94. if executable('clangd')
  95. " pip install python-lsp-server
  96. au User lsp_setup call lsp#register_server({
  97. \ 'name': 'clangd',
  98. \ 'cmd': {server_info->['clangd']},
  99. \ 'allowlist': ['c'],
  100. \ })
  101. endif
  102.  
  103. function! s:on_lsp_buffer_enabled() abort
  104. setlocal omnifunc=lsp#complete
  105. " setlocal signcolumn=yes
  106. " if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
  107. nmap <buffer> gd <plug>(lsp-definition)
  108. nmap <buffer> gs <plug>(lsp-document-symbol-search)
  109. nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
  110. nmap <buffer> gr <plug>(lsp-references)
  111. nmap <buffer> gi <plug>(lsp-implementation)
  112. nmap <buffer> gt <plug>(lsp-type-definition)
  113. nmap <buffer> <leader>rn <plug>(lsp-rename)
  114. nmap <buffer> [g <plug>(lsp-previous-diagnostic)
  115. nmap <buffer> ]g <plug>(lsp-next-diagnostic)
  116. nmap <buffer> K <plug>(lsp-hover)
  117. endfunction
  118.  
  119. augroup lsp_install
  120. au!
  121. " call s:on_lsp_buffer_enabled only for languages that has the server registered.
  122. autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
  123. augroup END
  124.  
  125. " NORMAL MODE MAPPINGS
  126.  
  127. nnoremap <C-n> :NERDTreeToggle<CR>
  128. map <Leader>t :term ++close<cr>
  129. tmap <Leader>t <c-w>:term ++close<cr>
  130. nnoremap <leader>ff <cmd>FZF<cr>
  131. nnoremap <leader>fg <cmd>Ag<cr>
  132.  
  133.  
  134. " VIM-PLUG
  135. call plug#begin('~/.vim/plugged')
  136. Plug 'junegunn/vim-easy-align'
  137.  
  138.  
  139. Plug 'prabirshrestha/vim-lsp'
  140.  
  141. Plug 'mattn/vim-lsp-settings'
  142.  
  143. Plug 'honza/vim-snippets'
  144.  
  145. Plug 'junegunn/vim-easy-align'
  146.  
  147. Plug 'junegunn/vim-github-dashboard'
  148.  
  149. Plug 'lervag/vimtex'
  150.  
  151. Plug 'ghifarit53/tokyonight-vim'
  152. " SNIPPET
  153.  
  154. Plug 'Shougo/neosnippet.vim'
  155. Plug 'prabirshrestha/async.vim'
  156. Plug 'thomasfaingnaert/vim-lsp-snippets'
  157. Plug 'thomasfaingnaert/vim-lsp-neosnippet'
  158. Plug 'Shougo/neosnippet-snippets'
  159.  
  160. " Plug 'nvim-lua/plenary.nvim'
  161. " Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' }
  162. " or , { 'branch': '0.1.x' }
  163. Plug 'jayli/vim-easycomplete' , {'commit': '1db4a17ee62c1947b898131c4facd199cf07a185'}
  164. Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
  165. Plug 'junegunn/fzf.vim'
  166. Plug 'sirVer/ultisnips'
  167. call plug#end()
  168.  
  169. " VUNDLE
  170.  
  171. set nocompatible " be iMproved, required
  172. filetype off " required
  173.  
  174. " set the runtime path to include Vundle and initialize
  175. set rtp+=~/.vim/bundle/Vundle.vim
  176. call vundle#begin()
  177. " alternatively, pass a path where Vundle should install plugins
  178. "call vundle#begin('~/some/path/here')
  179.  
  180. Plugin 'VundleVim/Vundle.vim'
  181.  
  182. Plugin 'tpope/vim-fugitive'
  183. Plugin 'vim-airline/vim-airline'
  184.  
  185. Plugin 'vim-airline/vim-airline-themes'
  186.  
  187. Plugin 'git://git.wincent.com/command-t.git'
  188. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  189.  
  190. call vundle#end() " required
  191. filetype plugin indent on " required
  192.  
  193. syntax enable
  194.  
  195. let g:vimtex_view_method = 'zathura'
  196.  
  197. let g:vimtex_view_general_viewer = 'okular'
  198. let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
  199.  
  200. let g:vimtex_compiler_method = 'latexmk'
  201.  
  202. let maplocalleader = ","
  203.  
  204. syntax on
  205.  
  206.  
  207.  
  208. if ! has('gui_running')
  209. set ttimeoutlen=10
  210. augroup FastEscape
  211. autocmd!
  212. au InsertEnter * set timeoutlen=0
  213. au InsertLeave * set timeoutlen=1000
  214. augroup END
  215. endif
  216.  
  217.  
  218. hi Normal guibg=NONE ctermbg=NONE
  219. hi FoldColumn guibg=NONE ctermbg=NONE
  220. hi SignColumn ctermbg=NONE guibg=NONE
  221.  
  222. let g:neosnippet#snippets_directory='~/.vim/plugged/vim-snippets/snippets'
  223. highlight DiagnosticVirtualTextError guibg=NONE
  224. highlight DiagnosticError guibg=NONE
  225. highlight DiagnosticVirtualTextWarn guibg=NONE
  226. highlight DiagnosticVirtualTextInfo guibg=NONE
  227. highlight DiagnosticVirtualTextHint guibg=NONE
  228.  
Add Comment
Please, Sign In to add comment