Created
December 8, 2023 19:29
-
-
Save IvanCl4udio/d6c9038fecf39561a6d12f149997b193 to your computer and use it in GitHub Desktop.
Neovim configuration
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
" ~/.config/nvim/init.vim | |
" Options | |
set background=dark | |
set clipboard=unnamedplus | |
set completeopt=noinsert,menuone,noselect | |
set cursorline | |
set hidden | |
set inccommand=split | |
set mouse=a | |
set number | |
set relativenumber | |
set splitbelow splitright | |
set title | |
set ttimeoutlen=0 | |
set wildmenu | |
" Tabs size | |
set expandtab | |
set shiftwidth=2 | |
set tabstop=2 | |
filetype plugin indent on | |
syntax on | |
set t_Co=256 | |
" True color if available | |
let term_program=$TERM_PROGRAM | |
" Check for conflicts with Apple Terminal app | |
if term_program !=? 'Apple_Terminal' | |
set termguicolors | |
else | |
if $TERM !=? 'xterm-256color' | |
set termguicolors | |
endif | |
endif | |
" Italics | |
let &t_ZH="\e[3m" | |
let &t_ZR="\e[23m" | |
call plug#begin() | |
" Appearance | |
Plug 'vim-airline/vim-airline' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'morhetz/gruvbox' | |
" Utilities | |
Plug 'sheerun/vim-polyglot' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'ap/vim-css-color' | |
Plug 'preservim/nerdtree' | |
Plug 'kien/ctrlp.vim' | |
" Completion / linters / formatters | |
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install'} | |
Plug 'plasticboy/vim-markdown' | |
" Git | |
Plug 'airblade/vim-gitgutter' | |
call plug#end() | |
colorscheme gruvbox | |
let g:airline_theme='gruvbox' | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
" File browser | |
let NERDTreeShowHidden=1 | |
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] | |
" Disable math tex conceal feature | |
let g:tex_conceal = '' | |
let g:vim_markdown_math = 1 | |
" Markdown | |
let g:vim_markdown_folding_disabled = 1 | |
let g:vim_markdown_frontmatter = 1 | |
let g:vim_markdown_conceal = 0 | |
let g:vim_markdown_fenced_languages = ['tsx=typescriptreact'] | |
" Normal mode remappings | |
nnoremap <C-q> :q!<CR> | |
nnoremap <F4> :bd<CR> | |
nnoremap <F5> :NERDTreeToggle<CR> | |
nnoremap <F6> :sp<CR>:terminal<CR> | |
" Tabs | |
nnoremap <S-Tab> gT | |
nnoremap <Tab> gt | |
nnoremap <silent> <S-t> :tabnew<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment