From af39decffa8227ee7870de469736ae604872347f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 11 Mar 2024 00:55:46 -0600 Subject: More ricing with telescope and warp. --- init.vim | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 15 deletions(-) (limited to 'init.vim') diff --git a/init.vim b/init.vim index 807b166..c3e0190 100644 --- a/init.vim +++ b/init.vim @@ -16,9 +16,11 @@ if filereadable(printf('%s/.config/nvim/local-plug.vim', $HOME)) exec "source " . printf('%s/.config/nvim/local-plug.vim', $HOME) endif +Plug 'lukas-reineke/virt-column.nvim' Plug 'dylnmc/synstack.vim' Plug 'folke/trouble.nvim' Plug 'git@git.josher.dev:bulletjava.vim.git' +Plug 'git@git.josher.dev:nvim-warp.git' Plug 'git@git.josher.dev:fieldmarshal.vim.git' Plug 'git@git.josher.dev:nvim-color-picker.git' Plug 'google/vim-codefmt' @@ -45,7 +47,6 @@ Plug 'nvim-treesitter/nvim-treesitter-textobjects' Plug 'nvim-treesitter/playground' Plug 'onsails/lspkind.nvim' Plug 'tpope/vim-surround' -Plug 'vim-airline/vim-airline' if has('rneovim') Plug 'git@git.josher.dev:rneovim-userregs.git' @@ -93,6 +94,10 @@ noremap p (SynStack) " Way to find files. noremap ff Telescope find_files noremap Telescope find_files +function! s:find_in_dir() + exec "Telescope find_files search_dirs={\"" . escape(expand('%:h'), ' ') . "\"}" +endfunction +noremap call find_in_dir() inoremap (vsnip-expand) @@ -103,8 +108,13 @@ noremap ^ ^zH noremap t TroubleToggle +function! HighlightColorColumns() abort + hi MyColorColumn guifg=#644141 guibg=none gui=None +endfunction +call HighlightColorColumns() augroup InitVim au! + au ColorScheme * call HighlightColorColumns() autocmd BufRead *.java,*.c,*.cpp,*.cxx,*.hs TSBufEnable highlight " Automatically stop highligting things when leaving insert mode. If I want @@ -160,6 +170,15 @@ nnoremap bprev noremap lua vim.diagnostic.open_float() +noremap WarpGrid +onoremap vWarpGrid + +noremap w WarpWords +onoremap w vWarpWords + +noremap lua require('warp').run(require('warp.strategy.words').words_strategy) +onoremap vlua require('warp').run(require('warp.strategy.words').words_strategy) + nmap œ k nmap ï j omap œ k @@ -171,6 +190,8 @@ omap iï ij vmap œ k vmap ï j +" test a thing here ααααααααααααααβααααααααααααααααααααααααααααααααααααααα + noremap TSNodeUnderCursor noremap TSCaptureUnderCursor @@ -190,18 +211,10 @@ cnoreabbrev _ escape(expand('%:h'), ' \') set textwidth=80 set colorcolumn=+1 if has('rneovim') - function! HighlightColorColumns() abort - hi MyColorColumn guifg=#3a3a3a guibg=none gui=None - hi MyRedColorColumn guifg=#5a1a1a guibg=none gui=None - endfunction - call HighlightColorColumns() - " Grey color column right after text width is grey and in the background and - " a red one after the text width which is red and in the foreground. - set colorcolumn=+1/│/MyColorColumn/b,+20/│/MyRedColorColumn/f - - augroup InitVim - au ColorScheme * call HighlightColorColumns() - augroup END + " call HighlightColorColumns() + " " Grey color column right after text width is grey and in the background and + " " a red one after the text width which is red and in the foreground. + " set colorcolumn=+1/│/MyColorColumn/b,+20/│/MyRedColorColumn/f endif " Opens a terminal in the directory of the current file. @@ -224,6 +237,11 @@ lua << EOF end end + function reload_package(str) + remove_package(str) + return require(str) + end + -- CiderLSP vim.opt.completeopt = { "menu", "menuone", "noselect" } require("lualine").setup({ @@ -245,6 +263,10 @@ lua << EOF require('telescope').setup({ defaults = { + title = "", + borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }, + prompt_prefix = '🞂 ', + selection_caret = '🞂 ', layout_strategy = "center", results_title = false, sorting_strategy = "ascending", @@ -261,8 +283,11 @@ lua << EOF -- other configuration values here }) - -- You probably also want to set a keymap to toggle aerial - vim.keymap.set('n', 'a', 'AerialToggle!') + require("virt-column").setup({ + char = '│', + highlight = "MyColorColumn" + }) + vim.fn.HighlightColorColumns() EOF -- cgit