telescope-live-grep-args.nvim icon indicating copy to clipboard operation
telescope-live-grep-args.nvim copied to clipboard

grep_visual_selection should support passing format options

Open kevindashgit opened this issue 11 months ago • 0 comments

I'm trying to leverage the grep_visual_selection function to grep based on a selection in a given buffer. However, I work in a very deeply pathed project such that I cannot see the full file paths of the options presented.

I want to be able to either shorten the paths when that case arises, or modify how the preview is presented or whatever it takes so that I can see both the preview and the full file paths.

Here is what I'm using now as a mapping:

vim.keymap.set('v', '<leader>*', '<cmd>lua require("telescope-live-grep-args.shortcuts").grep_visual_selection()<cr>') 

and here's how I have telescope-live-grep-args configured in my init.lua

   47 require('telescope').setup {
   48   
   49   
   50   -- ... stuff here ...
   51    
   52   
   53   extensions = {
   54     
   55     -- .... stuff here ...
   56     
   57     live_grep_args = {
   58       auto_quoting = true, -- enable/disable auto-quoting
   59       -- define mappings, e.g.
   60       mappings = { -- extend mappings
   61         i = {
   62           ["<C-k>"] = lga_actions.quote_prompt(),
   63           ["<C-i>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
   64         },
   65       },
   66       
   67       theme = "dropdown", -- use dropdown theme
   68       
   69       
   70       layout_config = {
   71         prompt_position = "bottom",
   72         preview_cutoff = 80,
   73       }
   74
   75     }
   76   }
   77 }

kevindashgit avatar Mar 06 '24 16:03 kevindashgit