diff --git a/Taskfile.yaml b/Taskfile.yaml index ec09de0..80a4b31 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -6,12 +6,12 @@ tasks: - install build: cmds: - - nix build + - nix build |& nom aliases: - b install: cmds: - - nix profile upgrade --impure 0 + - nix profile upgrade --impure 0 |& nom aliases: - i run: diff --git a/nix/sources.json b/nix/sources.json index f49d92a..0f29f30 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -485,25 +485,12 @@ "rev": "580b6c48651cabb63455e97d7e131ed557b8c7e2", "type": "git" }, - "telescope-fzy-native.nvim": { - "branch": "master", - "repo": "git@github.com:nvim-telescope/telescope-fzy-native.nvim", - "rev": "282f069504515eec762ab6d6c89903377252bf5b", - "submodules": true, - "type": "git" - }, "telescope-github.nvim": { "branch": "master", "repo": "git@github.com:willruggiano/telescope-github.nvim", "rev": "476952cf96e60efca4c230e86cf866835dfef236", "type": "git" }, - "telescope-project.nvim": { - "branch": "master", - "repo": "git@github.com:nvim-telescope/telescope-project.nvim", - "rev": "fa081e35ba7397e5147a51ece693aa3afda167fc", - "type": "git" - }, "telescope-symbols.nvim": { "branch": "master", "repo": "git@github.com:nvim-telescope/telescope-symbols.nvim", diff --git a/plugins/spec.nix b/plugins/spec.nix index 9f71675..bc2bb0b 100644 --- a/plugins/spec.nix +++ b/plugins/spec.nix @@ -570,15 +570,6 @@ in rec { buildPhase = ""; }; }; - telescope-fzy-native = { - src = sources."telescope-fzy-native.nvim"; - dependencies = { - inherit fzy-lua-native; - }; - }; - telescope-project = { - src = sources."telescope-project.nvim"; - }; telescope-symbols = { src = sources."telescope-symbols.nvim"; }; diff --git a/plugins/telescope.lua b/plugins/telescope.lua index 0014fbc..2bbce63 100644 --- a/plugins/telescope.lua +++ b/plugins/telescope.lua @@ -1,32 +1,8 @@ return function() local telescope = require "telescope" local actions = require "telescope.actions" - local action_state = require "telescope.actions.state" local themes = require "telescope.themes" - local set_prompt_to_entry_value = function(prompt_bufnr) - local entry = action_state.get_selected_entry() - if not entry or not type(entry) == "table" then - return - end - - action_state.get_current_picker(prompt_bufnr):reset_prompt(entry.ordinal) - end - - local common_dirs = { - ["~/dev"] = "dev", - ["~/notes"] = "notes", - ["~/src"] = "src", - } - local project_dirs = {} - for dir, _ in pairs(common_dirs) do - ---@diagnostic disable-next-line: missing-parameter - dir = vim.fn.expand(dir) - if vim.fn.isdirectory(dir) == 1 then - table.insert(project_dirs, dir) - end - end - local default_theme = themes.get_ivy { color_devicons = true, layout_config = { preview_cutoff = 150 }, @@ -41,9 +17,13 @@ return function() defaults = vim.tbl_deep_extend("force", default_theme, { mappings = { i = { + [""] = actions.close, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = false, + [""] = false, [""] = actions.select_horizontal, [""] = false, - [""] = set_prompt_to_entry_value, }, }, @@ -59,16 +39,14 @@ return function() typescript = { "javascript", "typescript" }, }, }, - fzf = { fuzzy = true, override_generic_sorter = true, override_file_sorter = true, case_mode = "smart_case", }, - - project = { - base_dirs = project_dirs, + smart_open = { + match_algorithm = "fzf", }, }, @@ -85,7 +63,6 @@ return function() telescope.load_extension "docsets" telescope.load_extension "fzf" - telescope.load_extension "project" telescope.load_extension "smart_open" telescope.load_extension "ui-select" @@ -103,24 +80,12 @@ return function() end, { desc = "Buffers" }, }, - ["e"] = { - function() - require("telescope.builtin").git_files() - end, - { desc = "Git files" }, - }, ["o"] = { function() require("telescope").extensions.smart_open.smart_open() end, { desc = "Open Anything™" }, }, - ["p"] = { - function() - require("telescope").extensions.project.project {} - end, - { desc = "Projects" }, - }, ["k"] = { function() vim.ui.input({ prompt = "Query > " }, function(pattern) diff --git a/plugins/toggleterm.lua b/plugins/toggleterm.lua index e0667e2..eaf34db 100644 --- a/plugins/toggleterm.lua +++ b/plugins/toggleterm.lua @@ -8,6 +8,6 @@ return function() local nnoremap = require("bombadil.lib.keymap").nnoremap nnoremap("", function() - toggleterm.toggle_command("size=20", vim.api.nvim_get_current_win()) + toggleterm.toggle_command("size=20", vim.api.nvim_get_current_tabpage()) end, { desc = "Toggle terminal" }) end