diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-11 00:55:46 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-11 00:55:46 -0600 |
commit | af39decffa8227ee7870de469736ae604872347f (patch) | |
tree | 90c982bbda2b2a7f8d59d898da8630bc76b68300 /init.vim | |
parent | fdb2f5d6d251f12f58e66d74d35aef2cdf3d5ad0 (diff) | |
download | config.vim-af39decffa8227ee7870de469736ae604872347f.tar.gz config.vim-af39decffa8227ee7870de469736ae604872347f.tar.bz2 config.vim-af39decffa8227ee7870de469736ae604872347f.zip |
More ricing with telescope and warp.
Diffstat (limited to 'init.vim')
-rw-r--r-- | init.vim | 55 |
1 files changed, 40 insertions, 15 deletions
@@ -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 <leader>p <plug>(SynStack) " Way to find files. noremap <leader>ff <cmd>Telescope find_files<cr> noremap <M-f> <cmd>Telescope find_files<cr> +function! s:find_in_dir() + exec "Telescope find_files search_dirs={\"" . escape(expand('%:h'), ' ') . "\"}" +endfunction +noremap <M-F> <cmd>call <sid>find_in_dir()<cr> inoremap <C-+> <Plug>(vsnip-expand) @@ -103,8 +108,13 @@ noremap ^ ^zH noremap <leader>t <cmd>TroubleToggle<cr> +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 <M-h> <cmd>bprev<cr> noremap <C-g> <cmd>lua vim.diagnostic.open_float()<cr> +noremap <C-f> <cmd>WarpGrid<cr> +onoremap <C-f> v<cmd>WarpGrid<cr> + +noremap <leader>w <cmd>WarpWords<cr> +onoremap <leader>w v<cmd>WarpWords<cr> + +noremap <M-w> <cmd>lua require('warp').run(require('warp.strategy.words').words_strategy)<cr> +onoremap <M-w> v<cmd>lua require('warp').run(require('warp.strategy.words').words_strategy)<cr> + nmap œ <leader>k nmap ï <leader>j omap œ <leader>k @@ -171,6 +190,8 @@ omap iï i<leader>j vmap œ <leader>k vmap ï <leader>j +" test a thing here ααααααααααααααβααααααααααααααααααααααααααααααααααααααα + noremap <M-ñ> <cmd>TSNodeUnderCursor<cr> noremap <M-©> <cmd>TSCaptureUnderCursor<cr> @@ -190,18 +211,10 @@ cnoreabbrev <expr> _ 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', '<leader>a', '<cmd>AerialToggle!<CR>') + require("virt-column").setup({ + char = '│', + highlight = "MyColorColumn" + }) + vim.fn.HighlightColorColumns() EOF |