feat: remove old home script, update noice+telescope

This commit is contained in:
2024-01-08 11:10:53 +02:00
parent deedc73bb1
commit 11d05e6702
7 changed files with 45 additions and 164 deletions

View File

@@ -1,25 +1,29 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
background_colour = "#000000",
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
config = function()
require('noice').setup {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
},
-- you can enable a preset for easier configuration
-- presets = {
-- -- bottom_search = true, -- use a classic bottom cmdline for search
-- -- command_palette = true, -- position the cmdline and popupmenu together
-- long_message_to_split = true, -- long messages will be sent to a split
-- inc_rename = false, -- enables an input dialog for inc-rename.nvim
-- -- lsp_doc_border = false, -- add a border to hover docs and signature help
-- },
},
-- you can enable a preset for easier configuration
-- presets = {
-- -- bottom_search = true, -- use a classic bottom cmdline for search
-- -- command_palette = true, -- position the cmdline and popupmenu together
-- long_message_to_split = true, -- long messages will be sent to a split
-- inc_rename = false, -- enables an input dialog for inc-rename.nvim
-- -- lsp_doc_border = false, -- add a border to hover docs and signature help
-- },
}
require("notify").setup({
background_colour = "#000000",
})
end,
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",

View File

@@ -78,6 +78,7 @@ vim.defer_fn(function()
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
vim.keymap.set('n', '<leader>st', "<Cmd>Telescope<CR>", { desc = '[S]earch [T]elescope Pickers' })
vim.keymap.set('n', '<leader>sq', "<Cmd>Telescope quickfix<CR>", { desc = '[S]earch [Q]uickfix' })
vim.keymap.set('n', '<leader>sn', '<Cmd>NoiceTelescope<CR>', { desc = '[S]earch [N]otifications' })
pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'media_files')
require('telescope').setup {

View File

@@ -27,7 +27,6 @@ end ]]
-- This is where you actually apply your config choices
config.font = wezterm.font_with_fallback({
{ family = "MesloLGS Nerd Font", weight = "Medium" },
{ family = "FiraCode Nerd Font", weight = "Medium", harfbuzz_features = { 'zero' } },
-- <built-in>, BuiltIn
@@ -94,8 +93,28 @@ config.keys = {
{ key = "9", mods = "CMD", action = act { SendString = "\x029" } },
{ key = "0", mods = "CMD", action = act { SendString = "\x020" } },
-- Previous/Next tmux window: Cmd+Shift+{/}
{ key = "[", mods = "CMD|SHIFT", action = act { SendString = "\x02p" } },
{ key = "]", mods = "CMD|SHIFT", action = act { SendString = "\x02n" } },
-- { key = "[", mods = "CMD|SHIFT", action = act { SendString = "\x02p" } },
-- { key = "]", mods = "CMD|SHIFT", action = act { SendString = "\x02n" } },
{ key = "[", mods = "CMD", action = act { SendString = "\x02p" } },
{ key = "]", mods = "CMD", action = act { SendString = "\x02n" } },
--
-- { key = "phys:[", mods = "CMD|SHIFT", action = act { SendString = "\x02p" } },
-- { key = "phys:]", mods = "CMD|SHIFT", action = act { SendString = "\x02n" } },
-- { key = "phys:{", mods = "CMD|SHIFT", action = act { SendString = "\x02p" } },
-- { key = "phys:}", mods = "CMD|SHIFT", action = act { SendString = "\x02n" } },
-- { key = "phys:[", mods = "CMD", action = act { SendString = "\x02p" } },
-- { key = "phys:]", mods = "CMD", action = act { SendString = "\x02n" } },
-- { key = "phys:{", mods = "CMD", action = act { SendString = "\x02p" } },
-- { key = "phys:}", mods = "CMD", action = act { SendString = "\x02n" } },
-- { key = "raw:[", mods = "CMD|SHIFT", action = act { SendString = "\x02p" } },
-- { key = "raw:]", mods = "CMD|SHIFT", action = act { SendString = "\x02n" } },
-- { key = "raw:{", mods = "CMD|SHIFT", action = act { SendString = "\x02p" } },
-- { key = "raw:}", mods = "CMD|SHIFT", action = act { SendString = "\x02n" } },
-- { key = "raw:[", mods = "CMD", action = act { SendString = "\x02p" } },
-- { key = "raw:]", mods = "CMD", action = act { SendString = "\x02n" } },
-- { key = "raw:{", mods = "CMD", action = act { SendString = "\x02p" } },
-- { key = "raw:}", mods = "CMD", action = act { SendString = "\x02n" } },
--
-- Zoom - Cmd+Z
{ key = "z", mods = "CMD", action = act { SendString = "\x02z" } },
-- Kill the current pane/last window - Cmd+W

View File

@@ -14,16 +14,3 @@ dotfiles:
windows:
- .
- utils
# df:
# name: dotfiles
# root: ~/.dotfiles
# windows:
# - .
# - utils
#
# dotfiles:
# name: dotfiles
# root: ~/.dotfiles
# windows:
# - .
# - utils

1
.zshrc
View File

@@ -67,7 +67,6 @@ source "$DOTFILES/exports.sh" # must run before zsh_init
# echo 'Loading '$DOTFILES/aliases.sh
source "$DOTFILES/aliases.sh"
# echo 'Loading '$DOTFILES/scripts/home/home.sh
source "$DOTFILES/scripts/home/home.sh"
# echo 'Loading '$DOTFILES/zsh_init.sh
# source "$DOTFILES/zsh_init.sh"

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env zsh
# source $DOTFILES/plugins/colors.plugin.zsh
source "$DOTFILES/exports.sh"
source "$DOTFILES/functions.sh"
__home_print_help_arg() {
echo_yellow " $1\t$2"
}
__home_print_help() {
__home_prepare_dir -q
if [[ "$1" == "0" ]]; then
man -P less ./man_src/home.7
else
man ./man_src/home.7
fi
__home_revert_dir -q
}

View File

@@ -1,108 +0,0 @@
#!/usr/bin/env zsh
source $DOTFILES/scripts/home/_common.sh
home_old() {
if [[ $# -eq 0 ]]; then
echo_red "No command provided. Use -h for options."
return 0
fi
if [[ $# -gt 0 ]]; then
case "$1" in
git | g)
shift
git -C "$DOTFILES" $@
;;
status | s)
git -C "$DOTFILES" status
;;
fetch | f)
git -C "$DOTFILES" fetch
;;
push | p)
git -C "$DOTFILES" add .
if [[ $# -lt 2 ]]; then
git -C "$DOTFILES" commit
else
git -C "$DOTFILES" commit -m "$2"
fi
git -C "$DOTFILES" push
;;
pull | l)
shift
git -C "$DOTFILES" pull
# if [[ $? -eq 0 ]]; the
# reload-zsh
# fi
;;
reload-term(inal)? | rt)
reload-zsh
return 0
;;
reload-home | rh)
source $DOTFILES/scripts/home/home.sh
return 0
;;
install | i)
source $DOTFILES/install.sh
;;
m | mushclient)
shift
mush $@
;;
workflows | w)
shift
pushd $DOTFILES
source $DOTFILES/scripts/home/workflows.sh $@
popd
;;
brew | b)
if is_linux; then
echo_red "Brew is not supported on Linux"
return 1
fi
shift
sub="$1"
case $sub in
d | dump)
pushd $DOTFILES
brew bundle dump -f --describe
popd
;;
r | restore)
pushd $DOTFILES
brew bundle
popd
;;
*) # unknown option
echo_red "No command or invalid command supplied."
__home_print_help 0
return 1
;;
esac
;;
help | -h | h)
shift
__home_print_help $@
return 0
;;
*) # unknown option
echo_red "No command or invalid command supplied."
__home_print_help 0
return 1
;;
esac
fi
}
rhome() {
# echo "Reloading zsh"
# home reload
echo "Reloading home"
home rh
if [[ $# -gt 0 ]]; then
echo "Running \`home $@\`"
home $@
fi
}