"" Encoding set encoding=utf8 "" Disable modeline set nomodeline "" System undo levels set undofile set undolevels=100 " Line Numbers set number set relativenumber "" Stop word wrapping set nowrap "" Hide Buffers set hidden "" Statusline set laststatus=0 "" Top/Bottom scroll padding set scrolloff=3 set sidescrolloff=5 " Syntax Colors set termguicolors " Misc set title " Indentation set softtabstop=2 set tabstop=2 set shiftwidth=2 set autoindent " Syntax syntax on " Save on close set confirm " Use system clipboard set clipboard=unnamedplus " Faster scrolling set ttyfast " Search set hlsearch set smartcase set showmatch " Undo set undolevels=1000 " Filetypes filetype plugin on " auto-install vim-plug if empty(glob('~/.config/nvim/autoload/plug.vim')) silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall autocmd VimEnter * PlugInstall | source $MYVIMRC endif call plug#begin('~/.config/nvim/autoload/plugged') " LSP Support Plug 'neovim/nvim-lspconfig' Plug 'williamboman/nvim-lsp-installer' " Autocompletion Plug 'hrsh7th/nvim-cmp' Plug 'hrsh7th/cmp-buffer' Plug 'hrsh7th/cmp-path' Plug 'saadparwaiz1/cmp_luasnip' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-nvim-lua' " Snippets Plug 'L3MON4D3/LuaSnip' Plug 'rafamadriz/friendly-snippets' Plug 'VonHeikemen/lsp-zero.nvim' Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' } Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'BurntSushi/ripgrep' Plug 'sharkdp/fd' Plug 'baliestri/aura-theme', { 'branch': 'feat/neovim-port', 'rtp': 'packages/neovim' } Plug 'lukelbd/vim-toggle' Plug 'kyazdani42/nvim-tree.lua' Plug 'dense-analysis/ale' Plug 'preservim/nerdcommenter' Plug 'akinsho/bufferline.nvim', { 'tag': '*' } Plug 'voldikss/vim-floaterm' Plug 'skywind3000/asyncrun.vim' Plug 'vim-test/vim-test' Plug 'folke/which-key.nvim' Plug 'mhinz/vim-startify' call plug#end() " Use aura theme installed above colorscheme aura-soft-dark " - Core Key Bindings - "" Map Leader to spacebar let mapleader=" " "" Shortcut to save nnoremap s :w "" Shortcut to close buffer nnoremap w :bd "" Moving current lines up/down nnoremap k :execute 'move -1-'. v:count1 nnoremap j :execute 'move +'. v:count1 "" Buffers Next/Previous nnoremap :bnext nnoremap :bprev "" Shortcut to close buffer nnoremap :bd "" Shortcut to reopen closed buffer nmap "" Toggle let g:toggle_map = '' "" Tree lua require'nvim-tree'.setup {} let g:nvim_tree_icons = { \ 'default': "", \ 'symlink': "", \ 'git': { \ 'unstaged': "✗", \ 'staged': "✓", \ 'unmerged': "", \ 'renamed': "➜", \ 'untracked': "★", \ 'deleted': "R", \ 'ignored': "◌" \ }, \ 'folder': { \ 'arrow_open': ">", \ 'arrow_closed': "<", \ 'default': "", \ 'open': "", \ 'empty': "=", \ 'empty_open': "==", \ 'symlink': "-", \ 'symlink_open': "--", \ } \ } nnoremap :NvimTreeToggle "" Lint let b:ale_fixers = ['prettier', 'eslint'] "" Telescope nnoremap ff Telescope find_files nnoremap fb Telescope buffers nnoremap fs Telescope spell_suggest nnoremap fr Telescope registers nnoremap fo Telescope oldfiles nnoremap fg Telescope live_grep nnoremap / Telescope current_buffer_fuzzy_find " Bufferline lua << EOF require("bufferline").setup { options = { show_buffer_close_icons = false, diagnostics = "nvim_lsp" } } EOF " Floating Terminal nnoremap ` :FloatermToggle " Async Run (:AsyncRun) let g:asyncrun_open=1 nnoremap a :AsyncRun -mode=term -pos=floaterm nnoremap ga :AsyncRun -mode=term -pos=floaterm git add -p nnoremap gc :AsyncRun -mode=term -pos=floaterm git commit -m "" " Comment italics highlight Comment cterm=italic gui=italic " LSP Zero lua << EOF require'lspconfig'.pyright.setup{} local lsp = require('lsp-zero') lsp.preset('recommended') lsp.setup() EOF " vim-test let test#strategy = "floaterm" nmap t :TestNearest nmap T :TestFile nmap ts :TestSuite nmap tl :TestLast nmap tv :TestVisit " which-key nmap ? :WhichKey lua << EOF require("which-key").setup {} EOF "" vim-startify let g:startify_custom_header = [ \ 'Gaiety | 2022', \ '▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄', \ '██░▄▄▀█░▄▄█░▄▀▄░█▀▄▄▀█░▄▄▄█▀▄▄▀█░▄▄▀█░▄▄▄█▀▄▄▀█░▄▄▀██', \ '██░██░█░▄▄█░█▄█░█░██░█░█▄▀█░██░█░▀▀▄█░█▄▀█░██░█░██░██', \ '██░▀▀░█▄▄▄█▄███▄██▄▄██▄▄▄▄██▄▄██▄█▄▄█▄▄▄▄██▄▄██▄██▄██', \ '▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀', \ '', \ 'MAPPING ACTION', \ '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', \ ' Leader', \ '? List Bindings', \ '', \ ] let g:startify_change_to_dir = 0