LazyVim/lua/plugins/editor.lua
2025-01-02 17:22:48 +01:00

81 lines
1.5 KiB
Lua

return {
{
"folke/flash.nvim",
opts = {
modes = {
search = { enabled = false },
},
},
},
{
"MagicDuck/grug-far.nvim",
keys = {
{
"<leader>sw",
function()
require('grug-far').open({
prefills = {
flags = '-w',
search = vim.fn.expand("<cword>"),
},
startInInsertMode = false,
transient = true,
})
end,
desc = "Grug: word\\cursor",
},
},
opts = {
history = {
autoSave = {
enabled = false, -- trumps all other settings below
onBufDelete = false,
onReplace = true,
onSyncAll = true,
},
maxHistoryLines = 1000,
},
searchOnInsertLeave = true,
},
},
{
"Darazaki/indent-o-matic",
event = "LazyFile",
opts = { max_lines = 100 },
},
{
"nvim-neo-tree/neo-tree.nvim",
keys = {
{
"<leader>E",
function()
require("neo-tree.command").execute({action="focus", reveal=true})
end,
desc = "NeoTree: reveal file",
},
},
opts = {
event_handlers = {
{
event = "file_opened",
handler = function() --auto close
require("neo-tree.command").execute({ action = "close" })
end,
},
},
filesystem = {
bind_to_cwd = false,
follow_current_file = {
enabled = false,
leave_dirs_open = true,
},
},
},
},
}