Created
December 21, 2020 21:37
-
-
Save cesarmiquel/fbd5f1a5c714dca9d418b74bef8d3218 to your computer and use it in GitHub Desktop.
NeoVim configuration: ~/.config/nvim/init.vim
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
if exists('g:GtkGuiLoaded') | |
" some code here | |
call rpcnotify(1, 'Gui', 'Font', 'Monoid Regular 10') | |
let g:GuiInternalClipboard = 1 | |
endif | |
" ---------------------------------------------------------------------------------- | |
" Installed plugins. To install/update use: PlugInstall | |
" ---------------------------------------------------------------------------------- | |
call plug#begin() | |
" solarized color scheme | |
Plug 'altercation/vim-colors-solarized' | |
" add git markers to gutter to indicate new lines, etc | |
Plug 'airblade/vim-gitgutter' | |
" Change status line | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
" Ctrl-p | |
Plug 'ctrlpvim/ctrlp.vim' | |
" Asynchronous Lint Engine (ALE) | |
Plug 'w0rp/ale' | |
" Javascript syntax highlighting and indentation | |
Plug 'pangloss/vim-javascript' | |
" JS + JSX: https://github.com/MaxMEllon/vim-jsx-pretty | |
Plug 'yuezk/vim-js' | |
Plug 'maxmellon/vim-jsx-pretty' | |
" Another nice colorscheme: https://github.com/morhetz/gruvbox/wiki/Configuration | |
Plug 'morhetz/gruvbox' | |
" Markdown | |
Plug 'plasticboy/vim-markdown' | |
" indent lines | |
Plug 'yggdroot/indentline' | |
" For autocomplete | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
" Tagalong: open/close HTML tags | |
Plug 'AndrewRadev/tagalong.vim' | |
" Autoclose HTML tags | |
Plug 'alvan/vim-closetag' | |
" Nerdtree | |
Plug 'scrooloose/nerdtree' | |
" Support for dustjs | |
Plug 'jimmyhchan/dustjs.vim' | |
" For on the fly grep | |
Plug 'wsdjeg/FlyGrep.vim' | |
" Prosession session management | |
Plug 'tpope/vim-obsession' | |
Plug 'dhruvasagar/vim-prosession' | |
" JSON with Comment | |
Plug 'kevinoid/vim-jsonc' | |
" Show marks on margin | |
Plug 'kshenoy/vim-signature' | |
call plug#end() | |
" ---------------------------------------------------------------------------------- | |
" Configurations | |
" ---------------------------------------------------------------------------------- | |
" Enable syntax highlighting | |
syntax enable | |
" Configuration for Solarized | |
"set background=dark | |
"let g:solarized_termcolors=256 | |
"colorscheme solarized | |
let g:gruvbox_contrast_dark='hard' | |
colorscheme gruvbox | |
" Show line numbers | |
set number | |
" show current line | |
set cursorline | |
" CtrlP (new fuzzy finder) | |
let g:ctrlp_map = ',e' | |
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git' " Ignore node_modules | |
" tab navigation | |
map tn :tabn<CR> | |
map tp :tabp<CR> | |
map tm :tabm<CR> | |
map tt :tabnew | |
map <C-S-Right> :tabn<CR> | |
imap <C-S-Right> <ESC>:tabn<CR> | |
map <C-S-Left> :tabp<CR> | |
imap <C-S-Left> <ESC>:tabp<CR> | |
" Tabs | |
" default tabs and spaces handling | |
set expandtab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
" Make <ESC> return quickly | |
set timeoutlen=200 | |
" tabs / indent exceptions | |
autocmd FileType html setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType blade setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType twig setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType javascriptreact setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType javascript.jsx setlocal shiftwidth=2 tabstop=2 | |
" disable autofold in markdown files | |
let g:vim_markdown_folding_disabled = 1 | |
let g:vim_markdown_frontmatter = 1 | |
let g:vim_markdown_conceal = 0 | |
" indent line config | |
let g:indentLine_char_list = ['┊'] | |
" Enable mouse wheel | |
set mouse=nv | |
" Configura Linters | |
let g:ale_linters = { 'javascript': ['eslint'], 'javascript.jsx': ['eslint'], } | |
" Configure tagalong | |
let g:tagalong_additional_filetypes = ['html', 'xml', 'jsx', 'eruby', 'ejs', 'eco', 'php', 'htmldjango', 'javascriptreact', 'typescriptreact', 'javascript'] | |
" Configure closetag | |
let g:closetag_filetypes = 'javascript,jsx,javascriptreact,html,xhtml,phtml' | |
" Powerline configuration | |
let g:airline_powerline_fonts=1 | |
" Configuracion de tabs para airlie | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#formatter = 'unique_tail' | |
let g:airline_theme='wombat' | |
" NERDTreeToggle bingin | |
map <F3> :NERDTreeToggle<CR> | |
" For retro-coding | |
" For Kickass files | |
autocmd BufRead *.asm set filetype=asm | |
" | |
" For GBASM files | |
autocmd BufRead *.z80 set filetype=rgbasm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment