Last active
November 27, 2020 09:01
-
-
Save aleksseven/bb9d3f33385cf059a07d67c8dae301b6 to your computer and use it in GitHub Desktop.
This is my Neovim config
This file contains hidden or 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
" This is my init.vim config | |
" BY Alex Sanchez Arellano | |
call plug#begin() | |
" Themes | |
Plug 'crusoexia/vim-monokai' | |
Plug 'morhetz/gruvbox' | |
Plug 'robbyrussell/oh-my-zsh' | |
Plug 'tomasr/molokai' | |
Plug 'cocopon/iceberg.vim' | |
Plug 'alessandroyorba/alduin' | |
Plug 'flazz/vim-colorschemes' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'Yavor-Ivanov/airline-monokai-subtle.vim' | |
" File Explorer with Icons | |
Plug 'scrooloose/nerdtree' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'vim-airline/vim-airline' | |
" File Search | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
" Coc completion | |
" Plug 'neoclide/coc.nvim' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver', 'coc-omnisharp'] | |
" C# | |
Plug 'OmniSharp/omnisharp-vim' | |
" Python | |
Plug 'neoclide/coc-python', {'do': 'yarn install --frozen-lockfile'} | |
Plug 'neoclide/coc-tabnine', {'do': 'yarn install --frozen-lockfile'} | |
Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'} | |
Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'} | |
" SimpylFold | |
Plug 'tmhedberg/SimpylFold' | |
" YouCompleteMe | |
" Plug 'valloric/youcompleteme', { 'do': './install.py' } | |
" Vim Markdowm | |
Plug 'tpope/vim-markdown' | |
" JavaScript | |
Plug 'pangloss/vim-javascript' | |
Plug 'crusoexia/vim-javascript-lib' | |
" Jsx | |
Plug 'maxmellon/vim-jsx-pretty' | |
" Typescript | |
Plug 'herringtondarkholme/yats.vim' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'peitalin/vim-jsx-typescript' | |
" Dart | |
Plug 'dart-lang/dart-vim-plugin' | |
Plug 'natebosch/vim-lsc' | |
Plug 'natebosch/vim-lsc-dart' | |
" Plug 'roxma/nvim-completion-manager' | |
" Plug 'SirVer/ultisnips' | |
" Plug 'honza/vim-snippets' | |
call plug#end() | |
runtime coc-init.vim | |
" Set line numbers | |
":set relativenumber | |
:set number | |
":set number relativenumber | |
" << Python >> | |
let g:python_host_prog = '/home/alex/.pyenv/versions/2.7.18/bin/python' | |
" let g:python3_host_prog = '/home/alex/.pyenv/versions/3.7.9/bin/python' | |
" let g:python3_host_prog = '/home/alex/.pyenv/versions/3.6.9/bin/python' | |
" let g:python3_host_prog = '/home/alex/venvs/python3.6.9/bin/python' | |
let g:python3_host_prog = '/home/alex/venvs/python3.7/bin/python' | |
let g:ruby_host_prog = '/home/alex/.rbenv/versions/2.7.2/bin/neovim-ruby-host' | |
let g:loaded_python_provider = 0 | |
" let g:loaded_python3_provider = 1 | |
" << C# >> | |
let g:OmniSharp_server_stdio = 1 | |
inoremap <expr> <Tab> pumvisible() ? '<C-n>' : | |
\ getline('.')[col('.')-2] =~# '[[:alnum:].-_#$]' ? '<C-x><C-o>' : '<Tab>' | |
" Themes neovim | |
" (Monokai) | |
"syntax on | |
"set termguicolors | |
"set background=dark | |
"colorscheme monokai | |
"set termguicolors | |
"set t_Co=256 " vim-monokai now only support 256 colours in terminal. | |
"let g:monokai_term_italic = 1 | |
"let g:monokai_gui_italic = 1 | |
" (Molokai) | |
"set termguicolors | |
"set background=dark | |
"colorscheme gruvbox | |
"let g:molokai_original = 1 | |
"let g:rehash256 = 1 | |
" (Alduin) | |
" 1). most Black Background | |
"let g:alduin_Shout_Dragon_Aspect = 1 | |
"colorscheme alduin | |
" 2). Black Background | |
"let g:alduin_Shout_Become_Ethereal = 1 | |
"colorscheme alduin | |
" 3). Adds Deep Red Color for Special Highlighting Groups | |
"let g:alduin_Shout_Fire_Breath = 1 | |
"colorscheme alduin | |
" 4). Removes Block Matchparens setting and adds an underline | |
"let g:alduin_Shout_Aura_Whisper = 1 | |
"colorscheme alduin | |
" (Iceberg) | |
"set termguicolors | |
"set background=dark | |
" Vim color-scheme | |
colorscheme monokai | |
" (Gruvbox) | |
" Javascript config | |
let g:javascript_plugin_jsdoc = 1 | |
let g:javascript_plugin_flow = 1 | |
"function! AccentDemo() | |
" let keys = ['a','b','c','d','e','f','g','h'] | |
" for k in keys | |
" call airline#parts#define_text(k, k) | |
" endfor | |
" call airline#parts#define_accent('a', 'red') | |
" call airline#parts#define_accent('b', 'green') | |
" call airline#parts#define_accent('c', 'blue') | |
" call airline#parts#define_accent('d', 'yellow') | |
" call airline#parts#define_accent('e', 'orange') | |
" call airline#parts#define_accent('f', 'purple') | |
" call airline#parts#define_accent('g', 'bold') | |
" call airline#parts#define_accent('h', 'italic') | |
" let g:airline_section_a = airline#section#create(keys) | |
"endfunction | |
"autocmd VimEnter * call AccentDemo() | |
let g:airline_section_b = '%{strftime("%c")}' | |
let g:airline_section_b = 'BN: %{bufnr("%c")}' | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#buffer_nr_show = 1 | |
set t_Co=256 | |
"let g:airline#extensions#tabline#left_sep = ' ' | |
"let g:airline#extensions#tabline#left_alt_sep = '|' | |
"let g:airline#extensions#tabline#formatter = 'default' | |
let g:airline_powerline_fonts = 1 | |
let g:airline_theme='dark_minimal' | |
" Jsx | |
let g:vim_jsx_pretty_highlight_close_tag = 1 | |
let g:vim_jsx_pretty_colorful_config = 1 | |
" Neovim Coc Completion | |
" YouCompletme | |
" let g:ycm_autoclose_preview_window_after_completion=1 | |
" map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
" Typescript | |
let g:yats_host_keyword = 1 | |
" Dart | |
let dart_html_in_string=v:true | |
let g:dart_style_guide = 2 | |
let g:dart_format_on_save = 1 | |
" let g:dartfmt_options | |
let g:lsc_auto_map = v:true | |
" Vim markdowm | |
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh'] | |
let g:markdown_syntax_conceal = 0 | |
let g:markdown_minlines = 100 | |
" Nerd tree | |
let g:NERDTreeShowHidden = 1 | |
let g:NERDTreeMinimalUI = 1 | |
let g:NERDTreeIgnore = [] | |
let g:NERDTreeStatusline = '' | |
" Automaticaly close nvim if NERDTree is only thing left open | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" Toggle | |
nnoremap <silent> <C-n> :NERDTreeToggle<CR> | |
"Symplfold | |
let g:SimpylFold_docstring_preview=1 | |
" add more.. | |
" Terminal integrate | |
au BufEnter * if &buftype == 'terminal' | :startinsert | endif | |
" open terminal on ctrl+; | |
" uses zsh shell | |
function! OpenTerminal() | |
split term://zsh | |
resize 10 | |
endfunction | |
nnoremap <c-t> :call OpenTerminal()<CR> | |
set t_Co=256 | |
" open new split panes to right and below | |
set splitright | |
set splitbelow | |
" turn terminal to normal mode with escape | |
tnoremap <Esc> <C-\><C-t> | |
" use alt+hjkl to move between split/vsplit panels | |
tnoremap <A-h> <C-\><C-n><C-w>h | |
tnoremap <A-j> <C-\><C-n><C-w>j | |
tnoremap <A-k> <C-\><C-n><C-w>k | |
tnoremap <A-l> <C-\><C-n><C-w>l | |
nnoremap <A-h> <C-w>h | |
nnoremap <A-j> <C-w>j | |
nnoremap <A-k> <C-w>k | |
nnoremap <A-l> <C-w>l | |
nnoremap <C-p> :FZF<CR> | |
let g:fzf_action = { | |
\ 'ctrl-t': 'tab split', | |
\ 'ctrl-s': 'split', | |
\ 'ctrl-v': 'vsplit' | |
\} | |
" requires silversearcher-ag | |
" used to ignore gitignore files | |
let $FZF_DEFAULT_COMMAND = 'ag -g ""' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment