Last active
January 20, 2024 21:57
-
-
Save diegopacheco/15e07c6fb8e8126949344765fc4b9b9c to your computer and use it in GitHub Desktop.
.vimrc configs and plugins
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 nocompatible " be iMproved, required | |
filetype off " required | |
" | |
" Vim spesific editor configs | |
" | |
set encoding=utf-8 | |
set number " Show line numbers | |
set backspace=indent,eol,start " fix backspace | |
set mouse=a " fix mouse to it only scroll inside vim not outside | |
" | |
" Vundle Help | |
" | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" Install YCM autocomplete | |
Plugin 'git@github.com:ycm-core/YouCompleteMe.git' | |
" Install NerdTree FileSystem Tree plugin | |
Plugin 'preservim/nerdtree' | |
" Install dracula theme | |
Plugin 'dracula/vim', { 'name': 'dracula' } | |
" Install dev icons | |
Plugin 'ryanoasis/vim-devicons' | |
" Vim Navigator plugin for smooth navigation between tmux and vim | |
Plugin 'christoomey/vim-tmux-navigator' | |
" Integration vim/tmux | |
Plugin 'preservim/vimux' | |
" Lil Snake game in vim - :VimGameSnake to start | |
Plugin 'johngrib/vim-game-snake' | |
" Install Languages Syntax plugins | |
Plugin 'ziglang/zig.vim' | |
Plugin 'vim-crystal/vim-crystal' | |
Plugin 'maxmellon/vim-jsx-pretty' | |
Plugin 'leafgarland/typescript-vim' | |
Plugin 'ollykel/v-vim' | |
Plugin 'junegunn/fzf.vim' | |
Plugin 'neoclide/coc.nvim', {'branch': 'release'} | |
Plugin 'fatih/vim-go' | |
Plugin 'udalov/kotlin-vim' | |
Plugin 'weirongxu/coc-kotlin' | |
Plugin 'autozimu/LanguageClient-neovim', { | |
\ 'branch': 'next', | |
\ 'do': 'bash install.sh', | |
\ } | |
" (Optional) Multi-entry selection UI. | |
Plugin 'junegunn/fzf' | |
" Install Airline plugin (status bar) | |
Plugin 'vim-airline/vim-airline' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" | |
" NerdTree Configs | |
" | |
nnoremap <leader>n :NERDTreeFocus<CR> | |
nnoremap <C-n> :NERDTree<CR> | |
nmap <F3> :NERDTreeToggle<CR> | |
nmap <C-f> :NERDTreeFind<CR> | |
let g:NERDTreeWinPos = "right" | |
autocmd VimEnter * NERDTree | |
" | |
" YCM (Autocomplete) plugin config | |
" | |
nmap <F2> <Plug>(YCMFindSymbolInWorkspace) | |
nmap <F4> <Plug>(YCMFindSymbolInDocument) | |
set completeopt=popup | |
" | |
" LSP's config | |
" | |
let g:ycm_language_server = | |
\ [ | |
\ { | |
\ 'name': 'rust', | |
\ 'cmdline': [ 'rust-analyzer' ], | |
\ 'filetypes': [ 'rs' ] | |
\ }, | |
\ { | |
\ 'name': 'zig', | |
\ 'cmdline': [ 'zls' ], | |
\ 'filetypes': [ 'zig' ] | |
\ }, | |
\ { | |
\ 'name': 'python', | |
\ 'cmdline': ['pylsp'], | |
\ 'filetypes': ['py'] | |
\ }, | |
\ { | |
\ 'name': 'java', | |
\ 'cmdline': ['/bin/bash/','/home/jdtls'], | |
\ 'filetypes': ['java'] | |
\ }, | |
\ { | |
\ 'name': 'go', | |
\ 'cmdline': ['gopls'], | |
\ 'filetypes': ['go'] | |
\ }, | |
\ { | |
\ 'name': 'scala', | |
\ 'cmdline': ['metals'], | |
\ 'rootPatterns': ['build.sbt'], | |
\ 'filetypes': ['scala', 'sbt'] | |
\ }, | |
\ { | |
\ 'name': 'v', | |
\ 'cmdline': ['v','ls','--socket'], | |
\ 'port': 5007, | |
\ 'filetypes': ['v'] | |
\ }, | |
\ { | |
\ 'name': 'cpp', | |
\ 'cmdline': ['clangd'], | |
\ 'filetypes': ['cpp'] | |
\ }, | |
\ { | |
\ 'name': 'js', | |
\ 'cmdline': ['typescript-language_server', '--stdio'], | |
\ 'filetypes': ['js', 'jsx', 'ts', 'tsx'] | |
\ }, | |
\ { | |
\ 'name': 'crystal', | |
\ 'cmdline': ['/home/crystalline'], | |
\ 'filetypes': ['cr'] | |
\ }, | |
\ ] | |
" | |
" LSP - config for LanguageClient-neovim | |
" | |
set hidden | |
autocmd BufReadPost *.kt setlocal filetype=kotlin | |
let g:LanguageClient_serverCommands = { | |
\ 'kotlin': ["kotlin-language-server"], | |
\ } | |
" | |
" Dracula Theme configs | |
" | |
if v:version < 802 | |
packadd! dracula | |
endif | |
syntax enable | |
colorscheme dracula |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment