added fzf-thumb script. config edits. more fugitive setup. telescope rg setup. disabled auto dapui.

This commit is contained in:
iceyrazor 2025-06-20 17:08:09 -05:00
parent 8c809c40db
commit 3252a201c1
4 changed files with 77 additions and 17 deletions

View File

@ -1,18 +1,5 @@
local ok, dap = pcall(require, 'dap') local ok, dap = pcall(require, 'dap')
if ok then if ok then
vim.keymap.set("n", "<Leader>dl", function() dap.step_into() end)
vim.keymap.set("n", "<Leader>dj", function() dap.step_over() end)
vim.keymap.set("n", "<Leader>dk", function() dap.step_out() end)
vim.keymap.set("n", "<Leader>dc", function() dap.continue() end)
vim.keymap.set("n", "<Leader>db", function() dap.toggle_breakpoint() end)
vim.keymap.set("n", "<Leader>db>", function()
dap.set_breakpoint(vim.fn.input('Breakpoint condition: '))
end)
vim.keymap.set("n", "<Leader>dd", function() dap.terminate() end)
vim.keymap.set("n", "<Leader>dr", function() dap.run_last() end)
--vim.keymap.set("n", "<Leader>dt", "<cmd>lua vim.cmd('RustLsp testables')<Cr>")
-- vim.api.nvim_set_hl(namespace, 'DapBreakpoint', { fg='#993939', bg='#31353f' }) -- vim.api.nvim_set_hl(namespace, 'DapBreakpoint', { fg='#993939', bg='#31353f' })
-- vim.api.nvim_set_hl(namespace, 'DapLogPoint', { fg='#61afef', bg='#31353f' }) -- vim.api.nvim_set_hl(namespace, 'DapLogPoint', { fg='#61afef', bg='#31353f' })
-- vim.api.nvim_set_hl(namespace, 'DapStopped', { fg='#98c379', bg='#31353f' }) -- vim.api.nvim_set_hl(namespace, 'DapStopped', { fg='#98c379', bg='#31353f' })
@ -41,6 +28,21 @@ if ok then
local ok, dapui = pcall(require, 'dapui') local ok, dapui = pcall(require, 'dapui')
if ok then if ok then
dapui.setup() dapui.setup()
vim.keymap.set("n", "<Leader>dl", function() dap.step_into() end)
vim.keymap.set("n", "<Leader>dj", function() dap.step_over() end)
vim.keymap.set("n", "<Leader>dk", function() dap.step_out() end)
vim.keymap.set("n", "<Leader>dc", function() dap.continue() end)
vim.keymap.set("n", "<Leader>db", function() dap.toggle_breakpoint() end)
vim.keymap.set("n", "<Leader>dB", function()
dap.set_breakpoint(vim.fn.input('Breakpoint condition: '))
end)
vim.keymap.set("n", "<Leader>dd", function() dap.terminate() end)
vim.keymap.set("n", "<Leader>dr", function() dap.run_last() end)
--vim.keymap.set("n", "<Leader>dt", "<cmd>lua vim.cmd('RustLsp testables')<Cr>")
vim.keymap.set("n", "<Leader>ds", function() dapui.toggle() end)
--[[
dap.listeners.before.attach.dapui_config = function() dap.listeners.before.attach.dapui_config = function()
dapui.open() dapui.open()
end end
@ -53,6 +55,7 @@ if ok then
dap.listeners.before.event_exited.dapui_config = function() dap.listeners.before.event_exited.dapui_config = function()
dapui.close() dapui.close()
end end
]]--
end end
dap.configurations.rust = { dap.configurations.rust = {

View File

@ -1,6 +1,5 @@
local ok, _ = pcall(require, 'telescope') local ok, telescope = pcall(require, 'telescope')
if ok then if ok then
local telescope = require('telescope')
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
local action = require('telescope.actions') local action = require('telescope.actions')
telescope.setup{ telescope.setup{
@ -11,8 +10,21 @@ if ok then
["q"] = action.close, ["q"] = action.close,
} }
} }
} },
pickers = {
find_files = {
find_command = {
"rg",
"--files",
"--hidden",
"--ignore-vcs",
"--no-ignore",
"-g", "!**/.git/*",
},
},
},
} }
--[[
if string.find(vim.loop.cwd(),"iceys%-linux%-stuffs") then if string.find(vim.loop.cwd(),"iceys%-linux%-stuffs") then
telescope.setup{ telescope.setup{
pickers = { pickers = {
@ -22,6 +34,7 @@ if ok then
} }
} }
end end
]]--
-- vim.keymap.set('n', '<leader>pf', "<cmd>Telescope find_files initial_mode=normal<cr>", {}) -- vim.keymap.set('n', '<leader>pf', "<cmd>Telescope find_files initial_mode=normal<cr>", {})
-- sort_mru=true sort by most recently used -- sort_mru=true sort by most recently used
-- sort_lastused=true -- sort_lastused=true
@ -40,5 +53,7 @@ if ok then
local word = vim.fn.expand("<cWORD>") local word = vim.fn.expand("<cWORD>")
builtin.grep_string({ search = word }) builtin.grep_string({ search = word })
end) end)
vim.keymap.set('n', '<leadere>pg', builtin.git_files, {}) vim.keymap.set('n', '<leader>gg', builtin.git_files, {})
vim.keymap.set('n', '<leader>gs', builtin.git_status, {})
vim.keymap.set('n', '<leader>gm', builtin.git_commits, {})
end end

25
env/.local/bin/scripts/fzf-thumb vendored Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
FZF_PREVIEW_LINES=50
FZF_PREVIEW_COLUMN=50
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
Preview_file="$script_dir/preview-image-typed.sh"
[ "$1" ] && view_dir="$1"
if [ ! "$view_dir" ]; then
echo NO DIR
exit 1
fi
cd "$view_dir"
while :; do
open_file=$(fzf --preview "$Preview_file {} $FZF_PREVIEW_LINES $FZF_PREVIEW_COLUMN")
if [ "$open_file" ]; then
vlc "$open_file" & disown
else
break
fi
done

17
env/.local/bin/scripts/preview-image-typed.sh vendored Executable file
View File

@ -0,0 +1,17 @@
preview() {
# chafa "$@" -f sixel -s "$(($2-2))x$3" | sed 's/#/\n#/g'
chafa "$1" --clear -f iterm -s $2x$3
}
thumbnail="/tmp/thumbnail.png"
file="$1"; shift
case "$file" in
*.avi|*.gif|*.mp4|*.mkv|*.webm|*.mov)
ffmpegthumbnailer -i "$file" -s 0 -q 5 -o "/tmp/thumbnail.png"
preview "$thumbnail" "$@"
;;
*)
preview "$file" "$@"
esac