Created
May 6, 2025 11:11
-
-
Save NiravBhuva/dde14efac2ab43645e3ab14c62a721ec to your computer and use it in GitHub Desktop.
Neo Vim 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
set nocompatible " disable compatibility to old-time vi | |
set showmatch " show matching | |
set ignorecase " case insensitive | |
set mouse=v " middle-click paste with | |
set hlsearch " highlight search | |
set incsearch " incremental search | |
set tabstop=4 " number of columns occupied by a tab | |
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing | |
"set expandtab " converts tabs to white space | |
set shiftwidth=4 " width for autoindents | |
set autoindent " indent a new line the same amount as the line just typed | |
"set number " add line numbers | |
set wildmode=longest,list " get bash-like tab completions | |
set cc=80 " set an 100 column border for good coding style | |
filetype plugin indent on "allow auto-indenting depending on file type | |
syntax on " syntax highlighting | |
set mouse=a " enable mouse click | |
set clipboard=unnamedplus " using system clipboard | |
filetype plugin on | |
set cursorline " highlight current cursorline | |
set ttyfast " Speed up scrolling in Vim | |
" set spell " enable spell check (may need to download language package) | |
" set noswapfile " disable creating swap file | |
" set backupdir=~/.cache/vim " Directory to store backup files. | |
"self explanatory | |
highlight Comment cterm=italic | |
highlight Todo cterm=bold,italic | |
"if, else etc | |
highlight Conditional cterm=italic | |
highlight Keyword cterm=italic | |
highlight Character cterm=italic | |
"return, let, const etc | |
highlight Statement cterm=italic,bold | |
highlight Identifier cterm=italic,bold | |
"console, function args etc | |
highlight Special cterm=italic,bold | |
let mapleader = "\<Space>" | |
"Plugins | |
call plug#begin('~/.local/share/nvim/site/plugged') | |
Plug 'folke/tokyonight.nvim' | |
Plug 'nvim-tree/nvim-web-devicons' "Optional | |
Plug 'nvim-tree/nvim-tree.lua' | |
Plug 'VundleVim/Vundle.vim' | |
Plug 'jelera/vim-javascript-syntax' | |
Plug 'pangloss/vim-javascript' | |
Plug 'dNitro/vim-pug-complete' | |
Plug 'nathanaelkane/vim-indent-guides' | |
Plug 'Raimondi/delimitMate' | |
Plug 'scrooloose/syntastic' | |
Plug 'digitaltoad/vim-pug' | |
Plug 'groenewege/vim-less' | |
Plug 'nvim-lua/plenary.nvim' | |
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } | |
"jsx linting | |
Plug 'mxw/vim-jsx' | |
Plug 'w0rp/ale' | |
"Prettier setup | |
Plug 'sbdchd/neoformat' | |
call plug#end() | |
" Telescope key mappings | |
nnoremap <Leader>ff :Telescope find_files<CR> | |
nnoremap <Leader>fg :Telescope live_grep<CR> | |
nnoremap <Leader>fb :Telescope buffers<CR> | |
nnoremap <Leader>fh :Telescope help_tags<CR> | |
" Set colorscheme | |
colorscheme tokyonight-night | |
let g:user_emmet_leader_key='\<Space>' | |
let g:user_emmet_settings = { 'javascript.jsx' : { 'extends' : 'jsx', }, } | |
"Prettier configuration | |
let g:neoformat_enabled_javascript = ['prettier', 'eslint_d'] | |
let g:neoformat_run_all_formatters = 1 | |
"Run prettier automatically on save | |
au BufWritePre *.js,*.ts,*.scss,*.rb,*.jsx Neoformat | |
set completeopt-=preview |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment