nvim: pimp preview; vim: use rg if exists

This commit is contained in:
Marco Thomas
2023-03-07 10:51:47 +01:00
parent bc43486dbf
commit b3c3a4a5d8
3 changed files with 6 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ telescope.setup({
}) })
map("n", "<C-g>", "<cmd> Telescope git_files <CR>", default_opts) map("n", "<C-g>", "<cmd> Telescope git_files <CR>", default_opts)
map("n", "<C-f>", "<cmd> Telescope find_files find_command=rg,--ignore,--hidden,--files<CR>", default_opts) map("n", "<C-f>", "<cmd> Telescope find_files find_command=rg,--ignore,--hidden,--files<CR>", default_opts)
map("n", "<C-s>", "<cmd> Telescope live_grep<CR>", default_opts) map("n", "<C-s>", "<cmd> Telescope live_grep previewer=false<CR>", default_opts)
map("n", "<C-k>", "<cmd> Telescope keymaps<CR>", default_opts) map("n", "<C-k>", "<cmd> Telescope keymaps<CR>", default_opts)
-- LSP -- LSP
@@ -40,7 +40,7 @@ map("n", "<C-h>", "<cmd> lua vim.lsp.buf.signature_help()<CR>", default_opts)
map("n", "<leader>ln", "<cmd> lua vim.lsp.buf.rename()<CR>", default_opts) map("n", "<leader>ln", "<cmd> lua vim.lsp.buf.rename()<CR>", default_opts)
map("n", "<leader>lr", "<cmd> Telescope lsp_references<CR>", default_opts) map("n", "<leader>lr", "<cmd> Telescope lsp_references<CR>", default_opts)
map("n", "<leader>ls", "<cmd> Telescope lsp_workspace_symbols<CR>", default_opts) map("n", "<leader>ls", "<cmd> Telescope lsp_workspace_symbols<CR>", default_opts)
map("n", "<leader>lt", "<cmd> TodoTelescope<CR>", default_opts) map("n", "<leader>lt", "<cmd> TodoTelescope previewer=false<CR>", default_opts)
map("n", "<leader>lp", "<cmd> call SVED_Sync()<CR>", default_opts) map("n", "<leader>lp", "<cmd> call SVED_Sync()<CR>", default_opts)
wk.register({ wk.register({
["<leader>"] = { ["<leader>"] = {

View File

@@ -3,7 +3,9 @@ require('telescope').setup({
prompt_prefix = "", prompt_prefix = "",
selection_caret = " ", selection_caret = " ",
entry_prefix = " ", entry_prefix = " ",
winblend = 15,
border = false, border = false,
file_ignore_patterns = { "^.git/" },
sorting_strategy = "ascending", sorting_strategy = "ascending",
layout_strategy = "bottom_pane", layout_strategy = "bottom_pane",
layout_config = { layout_config = {

View File

@@ -115,7 +115,8 @@ command! -bang -nargs=* GGrep
\ call fzf#vim#grep( \ call fzf#vim#grep(
\ 'git grep --line-number -- '.shellescape(<q-args>), 0, \ 'git grep --line-number -- '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0) \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
map <C-s> :GGrep<CR> "map <C-s> :GGrep<CR>
map <C-s> :Rg<CR>
" git " git
map <leader>gs :Git status<CR> map <leader>gs :Git status<CR>