diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json index 6d0cadf..90985ff 100644 --- a/.config/nvim/coc-settings.json +++ b/.config/nvim/coc-settings.json @@ -1,5 +1,6 @@ { "suggest.noselect": false, + "codeLens.enable": true, "languageserver": { "ccls": { @@ -40,6 +41,8 @@ "cSpell.userWords": [ "Minecraft", "Odometry", + "Vulkan", + "endianness", "repr", "setpoint", "tpope", diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 48128cb..d77fc20 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -36,6 +36,7 @@ nmap gr (coc-references) " use space or \ exec 'nmap ' +exec 'vmap ' nnoremap w :w @@ -44,6 +45,7 @@ vnoremap p p`] nnoremap p p`] nmap r (coc-rename) +"vmap r (coc-refactor) " refactor xmap f (coc-format-selected) @@ -95,6 +97,9 @@ silent nnoremap + silent nnoremap > " split resize +silent nnoremap e :ToggleTerm +" fancy ls + silent nnoremap n :NERDTreeToggle " fancy ls @@ -111,6 +116,9 @@ silent nnoremap b :w:!pandoc %:t --pdf-engine=xelatex -o %:t:r.ht silent nnoremap p :set invpaste " disable autoformatting so pasted code looks right +silent nnoremap c :set rnu! +" relative line number toggle on c + " keep cursor from skipping wrapped lines silent nnoremap j gj silent nnoremap k gk @@ -122,7 +130,8 @@ silent nnoremap gk k " nnoremap silent vmap a (coc-codeaction-selected) -silent nmap a (coc-codeaction-line) +" silent nmap a (coc-codeaction-line) +silent nmap a (coc-codeaction-cursor) " coc.vim spellcheck and refactoring silent tnoremap @@ -213,8 +222,17 @@ Plug 'foxbunny/vim-amber' Plug 'SirVer/ultisnips' Plug 'tribela/vim-transparent' Plug 'mbbill/undotree' +" Plug 'danth/pathfinder.vim' " training +Plug 'yuttie/comfortable-motion.vim' +Plug 'nvim-lua/plenary.nvim' +Plug 'saecki/crates.nvim', { 'tag': 'v0.3.0' } +" Plug 'andweeb/presence.nvim' " discord +Plug 'akinsho/toggleterm.nvim', {'tag' : '*'} +Plug 'mg979/vim-visual-multi', {'branch': 'master'} call plug#end() +lua require("toggleterm").setup() +lua require('crates').setup() " default let g:transparent_groups = ['Normal', 'Comment', 'Constant', 'Special', 'Identifier', \ 'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', @@ -278,9 +296,8 @@ function! Opensession() " open session under cursor, or run homepage command if getline(".") == "Close" " clear buffer, for example to write something silent normal uu silent nun - silent file untitled " set name - silent set buftype="" " normal window " unmap enter (disable this function from running again) + bd echo "" elseif getline(".") == " Exit" " quit nvim silent normal uu @@ -289,6 +306,11 @@ function! Opensession() " open session under cursor, or run homepage command silent normal uu\ww elseif getline(".") == " NTree" " open nerdtree silent normal uu + bd + " the thing on the following line not existing probably cost me several + " hours over the years cleaning up random empty files with one-word + " names + silent nun NERDTreeToggle elseif getline(".") == "" echo ""