Last active
January 14, 2022 08:01
-
-
Save RZHSSNZDH/e6a7e967bf09ff8883fde30f76f072e1 to your computer and use it in GitHub Desktop.
My nvim config file
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
call plug#begin() | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'nvim-lua/plenary.nvim' | |
Plug 'lewis6991/gitsigns.nvim' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'hoob3rt/lualine.nvim' | |
Plug 'norcalli/nvim-colorizer.lua' | |
Plug 'akinsho/nvim-bufferline.lua' | |
Plug 'preservim/nerdtree' | |
Plug 'tpope/vim-commentary' | |
Plug 'kyazdani42/nvim-web-devicons' | |
Plug 'tpope/vim-commentary' | |
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update | |
Plug 'windwp/nvim-autopairs' | |
Plug 'ayu-theme/ayu-vim' | |
call plug#end() | |
let mapleader = "," | |
nnoremap <leader>f :Files<CR> | |
nnoremap <F2> :NERDTreeToggle<CR> | |
:autocmd FileType cpp :map <F5> :!g++ % -o %:r && ./%:r <CR> | |
:autocmd FileType python :map <F5> :!python3.9 % <CR> | |
set mouse=a | |
set scrolloff=100 | |
let NERDTreeShowHidden=1 | |
set number | |
set cursorline | |
set termguicolors | |
set signcolumn=yes | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set nowrap | |
set hidden | |
set nobackup | |
set nowritebackup | |
set cmdheight=2 | |
set updatetime=300 | |
set shortmess+=c | |
vmap <leader>y "+y | |
nmap <leader>y "+y | |
nmap <leader>p "+p | |
vnoremap K :move '<-2<CR>gv-gv | |
vnoremap J :move '>+1<CR>gv-gv | |
nnoremap <C-Up> :resize +2<CR> | |
nnoremap <C-Down> :resize -2<CR> | |
nnoremap <C-Left> :vertical resize +2<CR> | |
nnoremap <C-Right> :vertical resize -2<CR> | |
set splitbelow | |
set splitright | |
nnoremap <leader>vs :vsplit<CR> | |
nnoremap <leader>hs :split<CR> | |
nnoremap <leader>h :set hlsearch!<CR> | |
vnoremap > >gv | |
vnoremap < <gv | |
set bg=dark | |
let ayucolor="mirage" | |
colorscheme ayu | |
nmap <leader>c gcc | |
vmap <leader>c gc | |
nnoremap <Leader>] :BufferLineCyclePrev<CR> | |
nnoremap <Leader>[ :BufferLineCycleNext<CR> | |
nnoremap <Leader>x :bd<CR> | |
lua << EOF | |
require("nvim-autopairs").setup() | |
require("nvim-web-devicons").setup() | |
require("bufferline").setup() | |
require("colorizer").setup() | |
require("gitsigns").setup({ | |
signs = { | |
add = {hl = 'GitSignsAdd' , text = '▎', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, | |
change = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, | |
delete = {hl = 'GitSignsDelete', text = '▎', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, | |
topdelete = {hl = 'GitSignsDelete', text = '▎', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, | |
changedelete = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, | |
}, | |
}) | |
require("lualine").setup({ | |
options= { | |
theme= 'ayu_mirage' | |
} | |
}) | |
require('nvim-treesitter.configs').setup { | |
ensure_installed = {"javascript", "typescript", "css", "html", "python", "rust"}, | |
highlight = { | |
enable = true, | |
additional_vim_regex_highlighting = false, | |
}, | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment