diff --git a/.config/nvim/conf.d/coc.vim b/.config/nvim/conf.d/coc.vim deleted file mode 100644 index b521659..0000000 --- a/.config/nvim/conf.d/coc.vim +++ /dev/null @@ -1,116 +0,0 @@ -"settings suggested by coc. -set hidden " Text Edit suggestion by coc -" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable -" delays and poor user experience. -set updatetime=300 -" Don't pass messages to |ins-completion-menu|. -set shortmess+=c -" Map for trigger completion, completion confirm, snippet expand and jump -inoremap - \ pumvisible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? - \ "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ check_back_space() ? "\" : - \ coc#refresh() -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction -let g:coc_snippet_next = '' -" Use to trigger completion. -if has('nvim') - inoremap coc#refresh() -else - inoremap coc#refresh() -endif -" Make notify coc.nvim to -" format on enter, could be remapped by other vim plugin -" (I disabled enter to confirm.) -inoremap "\u\\=coc#on_enter()\" - -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) -" GoTo code navigation. -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) -" Use K to show documentation in preview window. -nnoremap K :call show_documentation() -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - elseif (coc#rpc#ready()) - call CocActionAsync('doHover') - else - execute '!' . &keywordprg . " " . expand('') - endif -endfunction -" Highlight the symbol and its references when holding the cursor. -autocmd CursorHold * silent call CocActionAsync('highlight') -" Symbol renaming. -nmap rn (coc-rename) -" Formatting selected code. -xmap f (coc-format-selected) -nmap f (coc-format-selected) -" Applying codeAction to the selected region. -" Example: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap keys for applying codeAction to the current buffer. -nmap ac (coc-codeaction) -" Apply AutoFix to problem on the current line. -nmap qf (coc-fix-current) -" Map function and class text objects -" NOTE: Requires 'textDocument.documentSymbol' support from the language server. -xmap if (coc-funcobj-i) -omap if (coc-funcobj-i) -xmap af (coc-funcobj-a) -omap af (coc-funcobj-a) -xmap ic (coc-classobj-i) -omap ic (coc-classobj-i) -xmap ac (coc-classobj-a) -omap ac (coc-classobj-a) -" Remap and for scroll float windows/popups. -if has('nvim-0.4.0') || has('patch-8.2.0750') - nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" -endif -" Use CTRL-S for selections ranges. -" Requires 'textDocument/selectionRange' support of language server. -nmap (coc-range-select) -xmap (coc-range-select) -" Add `:Format` command to format current buffer. -command! -nargs=0 Format :call CocAction('format') -" Add `:Fold` command to fold current buffer. -command! -nargs=? Fold :call CocAction('fold', ) -" Add `:OR` command for organize imports of the current buffer. -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') -" Add (Neo)Vim's native statusline support. -" NOTE: Please see `:h coc-stats` for integrations with external plugins that -" provide custom statusline: lightline.vim, vim-airline. -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} -" Mappings for CoCList -" Show all diagnostics. -nnoremap a :CocList diagnostics -" Manage extensions. -nnoremap e :CocList extensions -" Show commands. -nnoremap c :CocList commands -" Find symbol of current document. -nnoremap o :CocList outline -" Search workspace symbols. -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list. -nnoremap p :CocListResume -" open COc yank -nnoremap y :CocList -A --normal yank diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index 16ba342..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,137 +0,0 @@ -call plug#begin('~/.config/nvim/plugged') - -" looks -Plug 'vim-airline/vim-airline' " airline for vim -Plug 'ryanoasis/vim-devicons' " adds many icons -Plug 'airblade/vim-gitgutter' " git changes on left. -Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } " colors -Plug 'mhinz/vim-startify' " start page -Plug 'tomasiser/vim-code-dark' " colorscheme -Plug 'cocopon/iceberg.vim' - -" misc -Plug 'vimwiki/vimwiki' " for my note taking. -Plug 'gentoo/gentoo-syntax' " syntax for gentoo related files - -" Coding -Plug 'neoclide/coc.nvim', {'branch': 'release'} " code completion -Plug 'chiel92/vim-autoformat' " used to remove trailing spaces. -Plug 'honza/vim-snippets' " snippet supprt. -Plug 'szw/vim-maximizer' " maximizing panel -Plug 'mfussenegger/nvim-dap' " Inspector for vim -Plug 'rcarriga/nvim-dap-ui' " UI for dap - -" functions -Plug 'machakann/vim-sandwich' " surrounding -Plug 'preservim/nerdcommenter' " comment out things -Plug 'nvim-lua/popup.nvim' " dependency of teltscope -Plug 'nvim-lua/plenary.nvim' -Plug 'nvim-telescope/telescope.nvim' " replacement of ctrlp -Plug 'tpope/vim-repeat' " repeat support for stuff -Plug 'tpope/vim-fugitive' " Git support. -Plug 'easymotion/vim-easymotion' " better motion!! -Plug 'godlygeek/tabular' " for OCD people. -Plug 'dhruvasagar/vim-table-mode' " Taking notes in vim - -" trees and bars -Plug 'preservim/nerdtree' -Plug 'Xuyuanp/nerdtree-git-plugin' -Plug 'tiagofumo/vim-nerdtree-syntax-highlight' -Plug 'preservim/tagbar' " press to get a tagbar. - -call plug#end() - -colorscheme iceberg - -set termguicolors -set relativenumber -set number -set shiftwidth=2 -set mouse=a -set ignorecase smartcase -set noshowmode -set smartindent -set scrolloff=10 - -" plugin settings -source ~/.config/nvim/conf.d/* - -let g:startify_custom_header = 'startify#pad(startify#fortune#boxed())' -let g:startify_lists = [ - \ { 'type': 'dir', 'header': [' MRU @ '. getcwd()] }, - \ { 'type': 'sessions', 'header': [' Sessions'] }, - \ { 'type': 'bookmarks', 'header': [' Bookmarks'] }, - \ { 'type': 'commands', 'header': [' Commands'] }, - \ ] -let g:startify_commands = [ - \ {'w': ['Open Vim Wiki', ':VimwikiIndex']}, - \ ] -let g:startify_custom_indices = [ - \ 'a', 'd', 'f', 'l', ';', 'g'] -let g:startify_skiplist = [ - \ '^/tmp', - \ escape(fnamemodify($HOME, ':p'), '\') .'Documents/Personal/Wiki', - \ escape(fnamemodify($HOME, ':p'), '\') .'Encrypted', - \ escape(fnamemodify($HOME, ':p'), '\') .'.config/yadm/repo.git', - \ ] - -let g:Hexokinase_ftDisabled = ['css'] - -let g:vimwiki_list = [{'path': '~/Documents/Personal/Wiki/', - \ 'syntax': 'markdown', 'ext': '.md'}] -" only enable vimwiki in wiki folder -let g:vimwiki_global_ext = 0 - -lua require("dapui").setup() -" keybindings (except for coc) -" Telescope -" Find files using Telescope command-line sugar. -nnoremap tf Telescope fd -nnoremap tg Telescope live_grep -nnoremap tb Telescope buffers -nnoremap th Telescope help_tags -" nerdtree tagbar coc formatter. -nnoremap lua require("dapui").toggle() -nnoremap Format -nnoremap TagbarToggle -nnoremap NERDTreeToggle -nnoremap NERDTreeFind -" easymotion -nmap f (easymotion-f) -nmap F (easymotion-F) -nmap l (easymotion-lineanywhere) -nmap j (easymotion-j) -nmap k (easymotion-k) -nmap w (easymotion-w) -nmap W (easymotion-W) -nmap b (easymotion-b) -nmap b (easymotion-B) -" fix intending. -vmap < >gv -" make Y behave like other Capitalized letters -nnoremap Y y$ -" n/N also centered -nnoremap n nzzzv -nnoremap N Nzzzv -" undo to the last , . or ! -inoremap , ,u -inoremap . .u -inoremap ! !u -inoremap ? ?u -" Shortcutting split navigation -map h -map j -map k -map l -map H -map J -map K -map L -map > > -map < -" Tab shortcuts -nnoremap :tabp -nnoremap :tabn -" map Alt + q to exit terminal mode. -tnoremap diff --git a/.config/nvim/lua/dap-custom.lua b/.config/nvim/lua/dap-custom.lua deleted file mode 100644 index caf7605..0000000 --- a/.config/nvim/lua/dap-custom.lua +++ /dev/null @@ -1,39 +0,0 @@ -local dap = require('dap') -dap.adapters.lldb = { - type = 'executable', - command = '/usr/bin/lldb', -- adjust as needed - name = "lldb" -} -local dap = require('dap') -dap.configurations.cpp = { - { - name = "Launch", - type = "lldb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, - - -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: - -- - -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - -- - -- Otherwise you might get the following error: - -- - -- Error on launch: Failed to attach to the target process - -- - -- But you should be aware of the implications: - -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html - runInTerminal = false, - }, -} - - --- If you want to use this for rust and c, add something like this: - -dap.configurations.c = dap.configurations.cpp -dap.configurations.rust = dap.configurations.cpp -