|
1 | 1 | local M = {} |
2 | 2 |
|
| 3 | +local conf = require('fff.conf') |
3 | 4 | local file_picker = require('fff.file_picker') |
4 | 5 | local preview = require('fff.file_picker.preview') |
5 | 6 | local icons = require('fff.file_picker.icons') |
@@ -229,7 +230,7 @@ function M.calculate_layout_dimensions(cfg) |
229 | 230 | return layout |
230 | 231 | end |
231 | 232 |
|
232 | | -local preview_config = require('fff.config').get().preview |
| 233 | +local preview_config = conf.get().preview |
233 | 234 | if preview_config then preview.setup(preview_config) end |
234 | 235 |
|
235 | 236 | M.state = { |
@@ -575,7 +576,7 @@ function M.focus_input_win() |
575 | 576 | end |
576 | 577 |
|
577 | 578 | function M.toggle_debug() |
578 | | - local config_changed = require('fff.config').toggle_debug() |
| 579 | + local config_changed = conf.toggle_debug() |
579 | 580 | if config_changed then |
580 | 581 | local current_query = M.state.query |
581 | 582 | local current_items = M.state.items |
|
758 | 759 | function M.render_list() |
759 | 760 | if not M.state.active then return end |
760 | 761 |
|
761 | | - local config = require('fff.config').get() |
| 762 | + local config = conf.get() |
762 | 763 | local items = M.state.filtered_items |
763 | 764 | local max_path_width = config.ui and config.ui.max_path_width or 80 |
764 | 765 | local debug_enabled = config and config.debug and config.debug.show_scores |
@@ -1235,7 +1236,7 @@ function M.open(opts) |
1235 | 1236 | end |
1236 | 1237 | end |
1237 | 1238 |
|
1238 | | - local config = require('fff.config').get() |
| 1239 | + local config = conf.get() |
1239 | 1240 | M.state.config = vim.tbl_deep_extend('force', config or {}, opts or {}) |
1240 | 1241 |
|
1241 | 1242 | if not M.create_ui() then |
|
0 commit comments