From 4a903ca920b43184efb05a30c0bb79d21b56e0a9 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Tue, 26 Mar 2024 21:43:28 -0400 Subject: Updated neovim based on theprimagen --- .config/nvim.bak/init.vim | 120 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .config/nvim.bak/init.vim (limited to '.config/nvim.bak/init.vim') diff --git a/.config/nvim.bak/init.vim b/.config/nvim.bak/init.vim new file mode 100644 index 0000000..7bb71b7 --- /dev/null +++ b/.config/nvim.bak/init.vim @@ -0,0 +1,120 @@ +" Basic setup stuff +let mapleader=" " +set number relativenumber +filetype plugin on +syntax on +set wildmode=longest,list,full +set mouse=a +set colorcolumn=80 +set autoindent noexpandtab tabstop=4 shiftwidth=4 + +" Quick Save +map w :w + +" Spell check +map o :setlocal spell! spelllang=en_us + +" Open a terminal +map t :vsplit term://zsh + +" Change Line break to 120 +map l :set colorcolumn=120 +" Change Line break to 80 +map L :set colorcolumn=80 + +" Quick Netrw +map x :Ex + +" Keyboard shortcuts for harpoon + +map q :lua require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) +map a :lua require("harpoon"):list():append() +map n :lua require("harpoon"):list():next() +map p :lua require("harpoon"):list():prev() + +" Telescope Keyboard shortcuts +map ts :Telescope find_files + +" Removes spaces at the end of lines when saving +autocmd BufWritePre * %s/\s\+$//e + +" Center Cursor when entering insert mode +autocmd InsertEnter * norm zz + +" Fixing indenting visual block +vmap < >gv + +" Makes splitting default to the right and to the bottom +set splitbelow splitright + +" Remaps moving keys for splitting +map h +map j +map k +map l + +" Plugins +call plug#begin('~/.local/share/nvim/plugged') +Plug 'junegunn/goyo.vim' " Nice for reading Documents +Plug 'neoclide/coc.nvim', {'branch': 'release'} " Code Completion +Plug 'tpope/vim-commentary' " Makes commenting multiple lines easier +Plug 'NLKNguyen/papercolor-theme' +Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.x' } +Plug 'ThePrimeagen/harpoon', { 'branch': 'harpoon2' } +Plug 'neovim/nvim-lspconfig' +Plug 'mfussenegger/nvim-dap' +Plug 'rcarriga/nvim-dap-ui' +call plug#end() + +"Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} +"Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'} + +let g:coc_global_extensions = [ + \ 'coc-html', + \ 'coc-java', + \ 'coc-tsserver', + \ 'coc-css', + \ 'coc-clangd', + \ 'coc-go', + \ 'coc-pairs', + \ 'coc-python', + \ 'coc-flutter' + \ ] + +lua vim.g.coq_settings = {auto_start = 'shut-up',} + +lua require("dap_lldb") + +" nvim-dap keybinds +map db :lua require("dap").toggle_breakpoint() +map dc :lua require("dap").continue() +map dso :lua require("dap").step_over() +map ds :lua require("dap").step_into() +map dr :lua require("dapui").open({ reset = true }) +map dt :lua require("dapui").toggle() + +" Goyo plugin makes text more readable when writing prose: +map f :Goyo \| set linebreak + +" Commentary plugin +map c :Commentary \| set linebreak + +" runs gofmt when closing a go file. +autocmd VimLeave *.go !gofmt -w % + +" required for harpoon to run +:lua require("harpoon"):setup() + +" This handles gofmt on save +" https://www.getman.io/posts/programming-go-in-neovim/ +lua require("lsp_config") +autocmd BufWritePre *.go lua vim.lsp.buf.formatting() +autocmd BufWritePre *.go lua goimports(1000) + +set t_Co=256 + +set background=light " for the light version of the theme + +colorscheme PaperColor -- cgit v1.2.3