telescope.nvim
This commit is contained in:
parent
2f9fbeee3c
commit
f5ebf24fca
|
@ -14,6 +14,6 @@ map <C-h> <C-w>h
|
||||||
|
|
||||||
|
|
||||||
nnoremap ,<space> :Neoformat <CR>
|
nnoremap ,<space> :Neoformat <CR>
|
||||||
nnoremap .<space> :w <CR>
|
nnoremap .<space> :Telescope<CR>
|
||||||
|
|
||||||
inoremap kk <ESC>
|
inoremap kk <ESC>
|
||||||
|
|
|
@ -46,7 +46,8 @@ set signcolumn=yes
|
||||||
|
|
||||||
let g:auto_save = 1
|
let g:auto_save = 1
|
||||||
|
|
||||||
" let mapleader = "'"
|
let mapleader = "b"
|
||||||
|
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set title
|
set title
|
||||||
|
|
|
@ -3,7 +3,6 @@ Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
Plug 'lewis6991/gitsigns.nvim'
|
||||||
Plug 'sbdchd/neoformat'
|
Plug 'sbdchd/neoformat'
|
||||||
Plug 'glepnir/galaxyline.nvim'
|
Plug 'glepnir/galaxyline.nvim'
|
||||||
"Plug 'tweekmonster/startuptime.vim'
|
|
||||||
Plug 'akinsho/nvim-bufferline.lua'
|
Plug 'akinsho/nvim-bufferline.lua'
|
||||||
Plug '907th/vim-auto-save'
|
Plug '907th/vim-auto-save'
|
||||||
Plug 'michalliu/jsruntime.vim'
|
Plug 'michalliu/jsruntime.vim'
|
||||||
|
@ -19,4 +18,7 @@ Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}}
|
||||||
Plug 'Yggdroot/indentLine'
|
Plug 'Yggdroot/indentLine'
|
||||||
Plug 'ryanoasis/vim-devicons'
|
Plug 'ryanoasis/vim-devicons'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
|
Plug 'nvim-lua/popup.nvim'
|
||||||
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
|
"Plug 'nvim-telescope/telescope-media-files.nvim'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
lua <<EOF
|
||||||
|
|
||||||
|
require('telescope').setup{
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
vimgrep_arguments = {
|
||||||
|
'rg',
|
||||||
|
'--color=never',
|
||||||
|
'--no-heading',
|
||||||
|
'--with-filename',
|
||||||
|
'--line-number',
|
||||||
|
'--column',
|
||||||
|
'--smart-case'
|
||||||
|
},
|
||||||
|
prompt_position = "bottom",
|
||||||
|
prompt_prefix = "> ",
|
||||||
|
selection_caret = "> ",
|
||||||
|
entry_prefix = " ",
|
||||||
|
initial_mode = "insert",
|
||||||
|
selection_strategy = "reset",
|
||||||
|
sorting_strategy = "descending",
|
||||||
|
layout_strategy = "horizontal",
|
||||||
|
layout_defaults = {
|
||||||
|
horizontal = {
|
||||||
|
mirror = false,
|
||||||
|
preview_width = 0.5,
|
||||||
|
},
|
||||||
|
vertical = {
|
||||||
|
mirror = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
||||||
|
file_ignore_patterns = {},
|
||||||
|
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
||||||
|
shorten_path = true,
|
||||||
|
winblend = 0,
|
||||||
|
width = 0.75,
|
||||||
|
preview_cutoff = 120,
|
||||||
|
results_height = 1,
|
||||||
|
results_width = 0.8,
|
||||||
|
border = {},
|
||||||
|
borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
|
||||||
|
color_devicons = true,
|
||||||
|
use_less = true,
|
||||||
|
set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil,
|
||||||
|
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
||||||
|
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
||||||
|
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
||||||
|
|
||||||
|
-- Developer configurations: Not meant for general override
|
||||||
|
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
|
|
||||||
|
extensions = {
|
||||||
|
media_files = {
|
||||||
|
filetypes = {"png", "webp", "jpg", "jpeg"},
|
||||||
|
find_cmd = "rg" -- find command (defaults to `fd`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
-- require('telescope').load_extension('media_files')
|
||||||
|
-- require('telescope').extensions.media_files.media_files()
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
" telescope mappings
|
||||||
|
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
||||||
|
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
||||||
|
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
||||||
|
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
||||||
|
|
||||||
|
highlight TelescopeBorder guifg=#3e4451
|
||||||
|
highlight TelescopePromptBorder guifg=#3e4451
|
||||||
|
highlight TelescopeResultsBorder guifg=#3e4451
|
||||||
|
highlight TelescopePreviewBorder guifg=#525865
|
|
@ -11,4 +11,6 @@ ts_config.setup {
|
||||||
use_languagetree = true,
|
use_languagetree = true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
" ------- run plugins ------
|
" ------- run plugins ------
|
||||||
source ~/.config/nvim/confs/pluginList.vim
|
source ~/.config/nvim/confs/pluginList.vim
|
||||||
|
|
||||||
" ---- keybinds , look of nvim ------
|
" ---- keybinds , look of nvim ------
|
||||||
|
@ -11,8 +11,10 @@ source ~/.config/nvim/confs/cpp.vim
|
||||||
source ~/.config/nvim/confs/rust.vim
|
source ~/.config/nvim/confs/rust.vim
|
||||||
source ~/.config/nvim/confs/coc.vim
|
source ~/.config/nvim/confs/coc.vim
|
||||||
|
|
||||||
" ---- file tree , bufferline and syntax highlighting ------
|
" ---- syntax highlighting , file tree , bufferline------
|
||||||
source ~/.config/nvim/confs/treesitter.vim
|
source ~/.config/nvim/confs/treesitter.vim
|
||||||
source ~/.config/nvim/confs/nvimTree.vim
|
source ~/.config/nvim/confs/nvimTree.vim
|
||||||
source ~/.config/nvim/confs/tabline.vim
|
source ~/.config/nvim/confs/tabline.vim
|
||||||
source ~/.config/nvim/confs/statusline.vim
|
source ~/.config/nvim/confs/statusline.vim
|
||||||
|
|
||||||
|
source ~/.config/nvim/confs/telescope.vim
|
||||||
|
|
Loading…
Reference in New Issue