diff --git a/files/nvim/.config/nvim/lua/mappings.lua b/files/nvim/.config/nvim/lua/mappings.lua index 483268c..303f0c8 100644 --- a/files/nvim/.config/nvim/lua/mappings.lua +++ b/files/nvim/.config/nvim/lua/mappings.lua @@ -24,14 +24,15 @@ telescope.setup({ } } }) -map("n", "", " Telescope git_files ", default_opts) +map("n", "", " Telescope git_files ", default_opts) +map("n", "", " Telescope find_files find_command=rg,--ignore,--hidden,--files", default_opts) map("n", "", " Telescope live_grep", default_opts) map("n", "", " Telescope keymaps", default_opts) -- LSP map("n", "la", " lua vim.lsp.buf.code_action()", default_opts) map("n", "ld", " Telescope lsp_definitions", default_opts) -map("n", "le", " Telescope diagnostics", default_opts) +map("n", "le", " Telescope diagnostics previewer=false", default_opts) map("n", "lf", " lua vim.lsp.buf.format {async = true }", default_opts) map("n", "lh", " lua vim.lsp.buf.hover()", default_opts) map("i", "", " lua vim.lsp.buf.signature_help()", default_opts) @@ -119,3 +120,4 @@ cmp.setup({ -- nvim-tree map("n", "tt", " NvimTreeToggle", default_opts) map("n", "tc", " NvimTreeCollapse", default_opts) +map("n", "tr", " NvimTreeRefresh", default_opts) diff --git a/files/nvim/.config/nvim/lua/plugins/telescope-conf.lua b/files/nvim/.config/nvim/lua/plugins/telescope-conf.lua index 3ba0769..f9f486d 100644 --- a/files/nvim/.config/nvim/lua/plugins/telescope-conf.lua +++ b/files/nvim/.config/nvim/lua/plugins/telescope-conf.lua @@ -3,13 +3,17 @@ require('telescope').setup({ prompt_prefix = "  ", selection_caret = " ", entry_prefix = " ", + border = false, sorting_strategy = "ascending", - layout_strategy = "vertical", + layout_strategy = "bottom_pane", layout_config = { vertical = { - width = 160, + width = 140, prompt_position = "top", mirror = true, + }, + bottom_pane = { + theme = get_ivy } } }, diff --git a/files/vim/.vimrc b/files/vim/.vimrc index 3ac056e..b138383 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -15,9 +15,11 @@ call plug#begin() Plug 'tpope/vim-sleuth' " heuristic file indendation Plug 'jiangmiao/auto-pairs' " pair completion -Plug 'ctrlpvim/ctrlp.vim' " file finder Plug 'tpope/vim-fugitive' " git wrapper +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } +Plug 'junegunn/fzf.vim' + Plug 'sainnhe/everforest' " color scheme Plug 'vim-airline/vim-airline' " a nicer status line Plug 'vim-airline/vim-airline-themes' " auto settings theme for airline @@ -106,13 +108,21 @@ let g:netrw_liststyle = 3 " Tree-like structure let g:netrw_banner = 0 " Remove useless banner at the top of netrw " ============================== Macros and Mappings -map :CtrlP . -" C-/ to hide search results -map :noh +" fzf +map :Files +map :GFiles +command! -bang -nargs=* GGrep + \ call fzf#vim#grep( + \ 'git grep --line-number -- '.shellescape(), 0, + \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), 0) +map :GGrep + " git map gs :Git status map gb :Git blame -map :Git grep + +" other +map :noh fun! TrimWhitespace() let l:save = winsaveview()