Created
February 4, 2022 16:51
-
-
Save r3nya/49e980dd4ba35182b5ea14ea6cbbd1b8 to your computer and use it in GitHub Desktop.
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
" --- General | |
let mapleader = " " | |
" enables syntax highlighting | |
syntax on | |
" Better colors | |
set termguicolors | |
" number of spaces in a <Tab> | |
set tabstop=4 | |
set softtabstop=4 | |
set expandtab | |
" enable autoindents | |
set smartindent | |
" number of spaces used for autoindents | |
set shiftwidth=4 | |
" adds line numbers | |
set number | |
set relativenumber | |
" columns used for the line number | |
set numberwidth=4 | |
" highlights the matched text pattern when searching | |
set incsearch | |
set nohlsearch | |
" open splits intuitively | |
set splitbelow | |
set splitright | |
" navigate buffers without losing unsaved work | |
set hidden | |
" start scrolling when 8 lines from top or bottom | |
set scrolloff=8 | |
" Save undo history | |
set undofile | |
" Enable mouse support | |
set mouse=a | |
" case insensitive search unless capital letters are used | |
set ignorecase | |
set smartcase | |
" --- Plugins | |
call plug#begin('~/.config/nvim/plugged') | |
Plug 'cormacrelf/vim-colors-github' | |
Plug 'nvim-lua/plenary.nvim' | |
Plug 'nvim-telescope/telescope.nvim' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'itchyny/lightline.vim' | |
" File explorer | |
Plug 'kyazdani42/nvim-web-devicons' " for file icons | |
Plug 'kyazdani42/nvim-tree.lua' | |
call plug#end() | |
" UI | |
colorscheme github | |
set background=light | |
let g:lightline = { | |
\ 'colorscheme': 'ayu_light', | |
\ } | |
" telescope | |
" Find files using Telescope command-line sugar. | |
nnoremap <leader>ff <cmd>Telescope find_files<cr> | |
nnoremap <leader>fg <cmd>Telescope live_grep<cr> | |
nnoremap <leader>fb <cmd>Telescope buffers<cr> | |
nnoremap <leader>fh <cmd>Telescope help_tags<cr> | |
lua <<EOF | |
require('telescope').setup{ defaults = { file_ignore_patterns = { "node_modules" }} } | |
vim.g.nvim_tree_show_icons = { | |
git = 0, | |
folders = 0, | |
files = 0, | |
folder_arrows = 0, | |
} | |
require'nvim-tree'.setup() | |
EOF | |
" No arrow keys --- force yourself to use hjkl | |
nnoremap <up> <nop> | |
nnoremap <down> <nop> | |
" File explorer | |
nnoremap <leader>tt :NvimTreeToggle<CR> | |
nnoremap <leader>tr :NvimTreeRefresh<CR> | |
nnoremap <leader>tn :NvimTreeFindFile<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment