File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1- vim .bo .formatprg = " jq ."
1+ vim .bo .shiftwidth = 2
2+ vim .bo .tabstop = 2
3+ vim .bo .softtabstop = 2
Original file line number Diff line number Diff line change @@ -31,9 +31,8 @@ function M.file_or_lsp_status()
3131end
3232function M .format_uri (uri )
3333 if vim .startswith (uri , " jdt://" ) then
34- local package = uri :match (" contents/[%a%d._-]+/([%a%d._-]+)" ) or " "
35- local class = uri :match (" contents/[%a%d._-]+/[%a%d._-]+/([%a%d$]+).class" ) or " "
36- return string.format (" %s::%s" , package , class )
34+ local jar , pkg , class = uri :match (" ^jdt://contents/([^/]+)/([^/]+)/(.+)?" )
35+ return string.format (" %s::%s (%s)" , pkg , class , jar )
3736 else
3837 local fname = vim .fn .fnamemodify (vim .uri_to_fname (uri ), " :." )
3938 fname = fname :gsub (" src/main/java/" , " s/m/j/" )
Original file line number Diff line number Diff line change @@ -219,13 +219,22 @@ if vim.fn.executable("find") == 1 then
219219end
220220
221221if vim .fn .executable (" fzy" ) == 1 then
222+ command (" Rg" , function (opt )
223+ local fzy = require (" kide.fzy" )
224+ fzy .execute (" rg --no-heading --trim -nH --smart-case " .. opt .args , fzy .sinks .edit_live_grep , " Grep " )
225+ end , {
226+ desc = " Grep" ,
227+ nargs = 1 ,
228+ })
222229 map (" n" , " <leader>fb" , function ()
223230 local fzy = require (" kide.fzy" )
224231 local bufs = vim .api .nvim_list_bufs ()
225232 local cats = {}
226233 for _ , v in ipairs (bufs ) do
227- local buf_name = vim .api .nvim_buf_get_name (v )
228- table.insert (cats , tostring (v ) .. " : " .. buf_name )
234+ if vim .bo [v ].buflisted then
235+ local buf_name = vim .api .nvim_buf_get_name (v )
236+ table.insert (cats , tostring (v ) .. " : " .. buf_name )
237+ end
229238 end
230239 local param = vim .fn .shellescape (table.concat (cats , " \n " ))
231240 fzy .execute (" echo -e " .. param , function (choice )
You can’t perform that action at this time.
0 commit comments