@@ -1243,42 +1243,25 @@ end
12431243function M .open (opts )
12441244 if M .state .active then return end
12451245
1246- -- Get base path first
12471246 local base_path = opts and opts .cwd or vim .fn .getcwd ()
12481247
1249- -- Capture current file before creating UI (which changes current buffer)
12501248 local current_buf = vim .api .nvim_get_current_buf ()
12511249 if current_buf and vim .api .nvim_buf_is_valid (current_buf ) then
12521250 local current_file = vim .api .nvim_buf_get_name (current_buf )
12531251 if current_file ~= ' ' and vim .fn .filereadable (current_file ) == 1 then
12541252 local absolute_path = vim .fn .fnamemodify (current_file , ' :p' )
1255- -- Convert to relative path from base_path
12561253 local relative_path =
12571254 vim .fn .fnamemodify (vim .fn .resolve (absolute_path ), ' :s?' .. vim .fn .escape (base_path , ' \\ ' ) .. ' /??' )
12581255 M .state .current_file_cache = relative_path
1259- vim .notify (
1260- ' DEBUG: Current file captured (relative): ' .. tostring (M .state .current_file_cache ),
1261- vim .log .levels .INFO
1262- )
12631256 else
12641257 M .state .current_file_cache = nil
12651258 end
12661259 else
1267- vim .notify (' DEBUG: No valid current buffer found' , vim .log .levels .INFO )
12681260 M .state .current_file_cache = nil
12691261 end
12701262
12711263 if not file_picker .is_initialized () then
1272- local config = {
1273- base_path = base_path ,
1274- max_results = 100 ,
1275- frecency = {
1276- enabled = true ,
1277- db_path = vim .fn .stdpath (' cache' ) .. ' /fff_nvim' ,
1278- },
1279- }
1280-
1281- if not file_picker .setup (config ) then
1264+ if not file_picker .setup () then
12821265 vim .notify (' Failed to initialize file picker' , vim .log .levels .ERROR )
12831266 return
12841267 end
0 commit comments