dotfiles/.config/nvim/lua/plugins/editor.lua

76 lines
1.5 KiB
Lua
Raw Normal View History

2023-09-28 11:13:02 +02:00
return {
{
"folke/flash.nvim",
enabled = false,
},
2024-05-25 11:27:18 +02:00
2023-11-02 20:04:31 +01:00
{
2024-05-25 11:27:18 +02:00
"danielfalk/smart-open.nvim",
branch = "0.2.x",
dependencies = {
"kkharji/sqlite.lua",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
{ "nvim-telescope/telescope-fzy-native.nvim" },
},
config = function()
2024-05-25 11:27:18 +02:00
local util = require("lazyvim.util")
util.on_load("telescope.nvim", function()
local telescope = require("telescope")
telescope.load_extension("smart_open")
end)
end,
},
2024-05-25 11:27:18 +02:00
{
"telescope.nvim",
2024-05-27 19:42:59 +02:00
keys = {
{
"<leader><leader>",
function()
require("telescope").extensions.smart_open.smart_open({
filename_first = false,
})
end,
desc = "Telescope smart open",
},
},
2024-05-25 11:27:18 +02:00
opts = function(_, opts)
local actions = require("telescope.actions")
opts.defaults = {
layout_strategy = "horizontal",
layout_config = {
anchor = "top",
horizontal = {
prompt_position = "top",
mirror = false,
2024-06-11 22:48:15 +02:00
preview_width = 0.49,
2024-05-25 11:27:18 +02:00
-- preview_height = 0.5,
},
2024-05-25 11:27:18 +02:00
width = 0.9,
height = 0.9,
preview_cutoff = 10,
},
mappings = {
i = {
["<esc>"] = actions.close, -- <Esc> close popup
["<C-u>"] = false, -- <C-u> clear prompt
2024-05-27 19:42:59 +02:00
["<C-w>"] = false, -- <C-u> clear prompt
2023-11-02 20:04:31 +01:00
},
},
2024-06-11 22:48:15 +02:00
-- path_display = { "filename_first" },
-- previewer = false,
2024-05-25 11:27:18 +02:00
preview = {
2024-06-11 22:48:15 +02:00
-- hide_on_startup = true,
2024-05-25 11:27:18 +02:00
},
2024-05-27 19:42:59 +02:00
sorting_strategy = "ascending",
winblend = 0,
wrap_results = true,
2024-05-25 11:27:18 +02:00
}
end,
2023-11-02 20:04:31 +01:00
},
2024-06-11 22:48:15 +02:00
{
"natecraddock/telescope-zf-native.nvim",
},
2023-09-28 11:13:02 +02:00
}