diff --git a/modules/programs/cli/diffnav.nix b/modules/programs/cli/diffnav.nix index b4c17a6..0e18211 100644 --- a/modules/programs/cli/diffnav.nix +++ b/modules/programs/cli/diffnav.nix @@ -30,10 +30,19 @@ programs = { git.iniContent.pager.diff = getExe diffnavPager; - jujutsu.settings.ui = { - diff-formatter = ":git"; - pager = getExe diffnavPager; - }; + jujutsu.settings."--scope" = [ + { + "--when".commands = [ + "diff" + "show" + ]; + + ui = { + diff-formatter = ":git"; + pager = getExe diffnavPager; + }; + } + ]; }; }; } diff --git a/modules/programs/tui/neovim/components/dashboard.nix b/modules/programs/tui/neovim/components/dashboard.nix index 3b64135..a66e4af 100644 --- a/modules/programs/tui/neovim/components/dashboard.nix +++ b/modules/programs/tui/neovim/components/dashboard.nix @@ -156,11 +156,11 @@ ''; preset = { - # Route dashboard pick actions through Telescope to keep the normal layout. + # Route dashboard pickers through the shared Telescope entry point. pick = mkLuaInline '' function(cmd, opts) cmd = cmd == "files" and "find_files" or cmd - return require("telescope.builtin")[cmd](opts or {}) + return _G.telescope_pick(cmd, opts) end ''; @@ -171,7 +171,7 @@ icon = " "; key = "f"; desc = "Find File"; - action = ":Telescope find_files"; + action = ":lua Snacks.dashboard.pick('files')"; text = mkLuaInline '' { { " ", hl = "SnacksDashboardIcon" }, diff --git a/modules/programs/tui/neovim/components/telescope.nix b/modules/programs/tui/neovim/components/telescope.nix index 6500bad..19ef0f0 100644 --- a/modules/programs/tui/neovim/components/telescope.nix +++ b/modules/programs/tui/neovim/components/telescope.nix @@ -9,6 +9,15 @@ colors = config.lib.stylix.colors.withHashtag; in { programs.nvf.settings.vim.luaConfigPreSnippets = [ + # Keep every Telescope entry point on the same initialized path. + '' + function _G.telescope_pick(cmd, opts) + require("lz.n").trigger_load("telescope") + require("lz.n").trigger_load("telescope-all-recent.nvim") + return require("telescope.builtin")[cmd](opts or {}) + end + '' + # Install Telescope as the global vim.ui.select provider after UI startup. '' vim.api.nvim_create_autocmd("User", { @@ -43,6 +52,12 @@ }; keymaps = [ + { + key = "ff"; + mode = "n"; + action = "lua _G.telescope_pick('find_files')"; + desc = "Find files [Telescope]"; + } { key = "fn"; mode = "n"; @@ -65,6 +80,8 @@ telescope = { enable = true; + mappings.findFiles = null; + extensions = [ # keep-sorted start block=yes newline_separated=yes {