1
Fork 0
This commit is contained in:
Matei Adriel 2022-12-09 02:32:25 +01:00
parent 811660e30a
commit 01e4fe7095
22 changed files with 102 additions and 122 deletions
dotfiles/neovim/lua/my/plugins

View file

@ -19,17 +19,13 @@ local keybinds = {
{ "<Leader>fp", find_files_by_extension("purs"), "Find purescript files" },
{ "<Leader>d", "diagnostics", "Diagnostics" },
{ "<C-F>", "live_grep", "Search in project" },
{ "<Leader>t", "builtin", "Show builtin pickers" },
{ "<Leader>t", "builtin", "Show builtin pickers" }
}
local chords = {
{ "jp", "file_browser" }
}
local chords = { { "jp", "file_browser" } }
local function mkAction(action)
if not string.find(action, "theme=") then
action = with_theme(action, defaultTheme)
end
if not string.find(action, "theme=") then action = with_theme(action, defaultTheme) end
return ":Telescope " .. action .. "<cr>"
end
@ -39,9 +35,7 @@ local function setupKeybinds()
vim.keymap.set("n", mapping[1], mkAction(mapping[2]), { desc = mapping[3] })
end
for _, mapping in pairs(chords) do
arpeggio.chord("n", mapping[1], mkAction(mapping[2]))
end
for _, mapping in pairs(chords) do arpeggio.chord("n", mapping[1], mkAction(mapping[2])) end
end
function M.setup()
@ -50,11 +44,7 @@ function M.setup()
local settings = {
defaults = { mappings = { i = { ["<C-h>"] = "which_key" } } },
pickers = { find_files = { hidden = true } },
extensions = {
file_browser = {
path = "%:p:h"
}
}
extensions = { file_browser = { path = "%:p:h" } }
}
require("telescope").setup(settings)