Compare commits
10 Commits
a13fb731cc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e0e3005c5 | |||
| 658470585f | |||
| 6fa4bc2808 | |||
| 692dfc6f02 | |||
| caaff2aee3 | |||
| ebd2e1259a | |||
| b75940f7b0 | |||
| 3833360469 | |||
| 6245f72e58 | |||
| 1fb3de5641 |
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
nushell/history.txt
|
||||||
|
# Ignore application history files
|
||||||
|
**/history.txt
|
||||||
|
**/history.db
|
||||||
|
|
||||||
|
# Ignore shell history files
|
||||||
|
.zsh_history
|
||||||
|
.bash_history
|
||||||
12
.zshrc
12
.zshrc
@ -1,5 +1,9 @@
|
|||||||
export PATH="$HOME/.cargo/bin:$HOME/.atuin/bin:$HOME/.local/bin:$HOME/.fzf/bin:$PATH"
|
export PATH="$HOME/.cargo/bin:$HOME/.atuin/bin:$HOME/.local/bin:$HOME/.fzf/bin:$PATH"
|
||||||
|
|
||||||
|
export OPENAI_API_KEY="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"
|
||||||
|
|
||||||
|
export TAVILY_API_KEY="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"
|
||||||
|
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
export VISUAL="nvim"
|
export VISUAL="nvim"
|
||||||
|
|
||||||
@ -69,3 +73,11 @@ source <(carapace-bin _carapace zsh)
|
|||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
alias cat='batcat --color=always --paging=never'
|
alias cat='batcat --color=always --paging=never'
|
||||||
|
|
||||||
|
export ANDROID_HOME=$HOME/android-sdk
|
||||||
|
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
|
||||||
|
# Source ESP-IDF environment
|
||||||
|
# IMPORTANT: Adjust path if your ESP-IDF installation moves
|
||||||
|
if [ -d "/home/sam/esp/esp-idf" ]; then
|
||||||
|
. "/home/sam/esp/esp-idf/export.sh"
|
||||||
|
fi
|
||||||
|
|||||||
@ -4,9 +4,10 @@
|
|||||||
echo "--- Starting Environment Setup ---"
|
echo "--- Starting Environment Setup ---"
|
||||||
|
|
||||||
# 1. Install core packages with apt
|
# 1. Install core packages with apt
|
||||||
|
# Added: xclip, jq, pandoc
|
||||||
echo "--> Installing core packages with apt..."
|
echo "--> Installing core packages with apt..."
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y build-essential curl git zsh ripgrep btop bat zoxide eza fuse3 sshfs gh
|
sudo apt install -y build-essential curl git zsh ripgrep btop bat zoxide eza fuse3 sshfs gh xclip jq pandoc
|
||||||
|
|
||||||
# 2. Install Oh My Zsh and required plugins
|
# 2. Install Oh My Zsh and required plugins
|
||||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||||
@ -46,6 +47,3 @@ if ! command -v lazygit &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "--- Software installation complete! ---"
|
echo "--- Software installation complete! ---"
|
||||||
echo "Next steps:"
|
|
||||||
echo "1. Run './manage_configs.sh' to symlink your configuration files."
|
|
||||||
echo "2. Log out and log back in for all changes to take effect."
|
|
||||||
|
|||||||
@ -2,28 +2,30 @@
|
|||||||
|
|
||||||
# A script to REMOVE old broken links and CREATE correct new ones.
|
# A script to REMOVE old broken links and CREATE correct new ones.
|
||||||
|
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status.
|
||||||
|
|
||||||
DOTFILES_DIR="$HOME/dotfiles"
|
DOTFILES_DIR="$HOME/dotfiles"
|
||||||
CONFIG_DIR="$HOME/.config"
|
CONFIG_DIR="$HOME/.config"
|
||||||
|
|
||||||
# List of all config DIRECTORIES to be linked into ~/.config
|
# List of all config DIRECTORIES to be linked into ~/.config
|
||||||
CONFIG_DIRS=(
|
CONFIG_DIRS=(
|
||||||
"atuin" "borg" "btop" "carapace" "gh" "ghostty"
|
"atuin" "borg" "btop" "carapace" "gh" "ghostty"
|
||||||
"kitty" "lazygit" "nushell" "nvim" "zellij"
|
"kitty" "lazygit" "nushell" "nvim" "zellij"
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "--- Starting to fix symbolic links ---"
|
echo "--- Starting to fix symbolic links ---"
|
||||||
|
|
||||||
# --- 1. Fix links for directories inside ~/.config ---
|
# --- 1. Fix links for directories inside ~/.config ---
|
||||||
for dir in "${CONFIG_DIRS[@]}"; do
|
for dir in "${CONFIG_DIRS[@]}"; do
|
||||||
SOURCE_PATH="$DOTFILES_DIR/$dir"
|
SOURCE_PATH="$DOTFILES_DIR/$dir"
|
||||||
LINK_PATH="$CONFIG_DIR/$dir"
|
LINK_PATH="$CONFIG_DIR/$dir"
|
||||||
|
|
||||||
echo "-> Processing $dir..."
|
echo "-> Processing $dir..."
|
||||||
# Remove any existing file or broken link at the destination
|
# Remove any existing file, directory, or broken link at the destination
|
||||||
rm -rf "$LINK_PATH"
|
rm -rf "$LINK_PATH"
|
||||||
# Create the new, correct symlink
|
# Create the new, correct symlink. -T prevents nesting.
|
||||||
ln -s "$SOURCE_PATH" "$LINK_PATH"
|
ln -sT "$SOURCE_PATH" "$LINK_PATH"
|
||||||
echo " Linked $SOURCE_PATH -> $LINK_PATH"
|
echo " Linked $SOURCE_PATH -> $LINK_PATH"
|
||||||
done
|
done
|
||||||
|
|
||||||
# --- 2. Fix link for starship.toml file in ~/.config ---
|
# --- 2. Fix link for starship.toml file in ~/.config ---
|
||||||
@ -31,7 +33,7 @@ SOURCE_PATH_STARSHIP="$DOTFILES_DIR/starship.toml"
|
|||||||
LINK_PATH_STARSHIP="$CONFIG_DIR/starship.toml"
|
LINK_PATH_STARSHIP="$CONFIG_DIR/starship.toml"
|
||||||
echo "-> Processing starship.toml..."
|
echo "-> Processing starship.toml..."
|
||||||
rm -f "$LINK_PATH_STARSHIP"
|
rm -f "$LINK_PATH_STARSHIP"
|
||||||
ln -s "$SOURCE_PATH_STARSHIP" "$LINK_PATH_STARSHIP"
|
ln -sT "$SOURCE_PATH_STARSHIP" "$LINK_PATH_STARSHIP"
|
||||||
echo " Linked $SOURCE_PATH_STARSHIP -> $LINK_PATH_STARSHIP"
|
echo " Linked $SOURCE_PATH_STARSHIP -> $LINK_PATH_STARSHIP"
|
||||||
|
|
||||||
# --- 3. Fix link for .zshrc file in ~ ---
|
# --- 3. Fix link for .zshrc file in ~ ---
|
||||||
@ -39,7 +41,7 @@ SOURCE_PATH_ZSHRC="$DOTFILES_DIR/.zshrc"
|
|||||||
LINK_PATH_ZSHRC="$HOME/.zshrc"
|
LINK_PATH_ZSHRC="$HOME/.zshrc"
|
||||||
echo "-> Processing .zshrc..."
|
echo "-> Processing .zshrc..."
|
||||||
rm -f "$LINK_PATH_ZSHRC"
|
rm -f "$LINK_PATH_ZSHRC"
|
||||||
ln -s "$SOURCE_PATH_ZSHRC" "$LINK_PATH_ZSHRC"
|
ln -sT "$SOURCE_PATH_ZSHRC" "$LINK_PATH_ZSHRC"
|
||||||
echo " Linked $SOURCE_PATH_ZSHRC -> $LINK_PATH_ZSHRC"
|
echo " Linked $SOURCE_PATH_ZSHRC -> $LINK_PATH_ZSHRC"
|
||||||
|
|
||||||
echo "--- All links have been reset correctly. ---"
|
echo "--- All links have been reset correctly. ---"
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
# This file is for environment variables only.
|
# This file is for environment variables only.
|
||||||
|
let-env OPENAI_API_KEY = "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"
|
||||||
|
|
||||||
|
let-env TAVILY_API_KEY="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"
|
||||||
|
|
||||||
# 1. Add binary paths to the PATH environment variable.
|
# 1. Add binary paths to the PATH environment variable.
|
||||||
# We prepend so they are found before system defaults.
|
# We prepend so they are found before system defaults.
|
||||||
@ -8,5 +11,11 @@ $env.PATH = ($env.PATH |
|
|||||||
prepend '/snap/bin'
|
prepend '/snap/bin'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 2. Source the Cargo environment to add its bin directory to the PATH.
|
# 2. Source the Cargo environment to add its bin directory to the PATH.
|
||||||
source $"($nu.home-path)/.cargo/env.nu"
|
source $"($nu.home-path)/.cargo/env.nu"
|
||||||
|
|
||||||
|
$env.ANDROID_HOME = ($env.HOME | path join "android-sdk")
|
||||||
|
$env.PATH = ($env.PATH | prepend ($env.ANDROID_HOME | path join "cmdline-tools" "latest" "bin") ($env.ANDROID_HOME | path join "platform-tools"))
|
||||||
|
|||||||
@ -1,70 +0,0 @@
|
|||||||
mv ~/.config/nushell ~/dotfiles/
|
|
||||||
ln -s ~/dotfiles/nushell ~/.config/nushell
|
|
||||||
cd ~/dotfiles
|
|
||||||
ls
|
|
||||||
lazygit
|
|
||||||
nvim ~/dotfiles/manage_configs.sh
|
|
||||||
chmod +x ~/dotfiles/manage_configs.sh
|
|
||||||
~/dotfiles/manage_configs.sh
|
|
||||||
lazygit
|
|
||||||
ssh -vT git@gitea.lab.audasmedia.com.au
|
|
||||||
nvim ~/.ssh/config
|
|
||||||
chmod 600 ~/.ssh/config
|
|
||||||
ssh -vT git@gitea.lab.audasmedia.com.au
|
|
||||||
nvim ~/.ssh/config
|
|
||||||
lazygit
|
|
||||||
cat ~/.ssh/id_ed25519.pub
|
|
||||||
sudo su - git
|
|
||||||
git remote -v
|
|
||||||
GIT_SSH_COMMAND="ssh -v" git push
|
|
||||||
git remote set-url origin ssh://git@gitea.lab.audasmedia.com.au:2222/sam/dotfiles.git
|
|
||||||
git branch -m master main
|
|
||||||
git push --set-upstream origin main
|
|
||||||
lazygit
|
|
||||||
nvim ~/dotfiles/install.sh
|
|
||||||
chmod +x ~/dotfiles/install.sh
|
|
||||||
lazygit
|
|
||||||
ls
|
|
||||||
yazi
|
|
||||||
nvim
|
|
||||||
yazi
|
|
||||||
atuin
|
|
||||||
dua
|
|
||||||
nvim install.sh
|
|
||||||
atuin import zsh
|
|
||||||
zellij
|
|
||||||
atuin import zsh
|
|
||||||
<\n> atuin search --interactive
|
|
||||||
yazi ~/.config
|
|
||||||
yazi ~/dotfiles/
|
|
||||||
atuin status
|
|
||||||
atuin user current
|
|
||||||
atuin login
|
|
||||||
atuin status
|
|
||||||
atuin import zsh
|
|
||||||
yazi ~/.config
|
|
||||||
yazi ~/dotfiles/.config
|
|
||||||
yazi ~/dotfiles
|
|
||||||
yazi ~/.config
|
|
||||||
yazi ~/dotfiles
|
|
||||||
rm ~/.config/nvim
|
|
||||||
~/dotfiles/fix_links.sh
|
|
||||||
cd ~/dotfiles
|
|
||||||
lazygit
|
|
||||||
rm ~/dotfiles/manage_configs.sh
|
|
||||||
mv ~/dotfiles/fix_links.sh ~/dotfiles/manage_configs.sh
|
|
||||||
lazygit
|
|
||||||
ssh sam@192.168.20.13
|
|
||||||
ssh sam@192.168.20.35
|
|
||||||
hostname
|
|
||||||
ssh sam@192.168.20.35
|
|
||||||
zellij
|
|
||||||
nvim ~/dotfiles/.zshrc
|
|
||||||
which atuin
|
|
||||||
cat ~/.zprofile
|
|
||||||
zsh -f -c 'echo $PATH'
|
|
||||||
ssh sam@192.168.20.35
|
|
||||||
ssh sam@192.168.20.13
|
|
||||||
nvim ~/dotfiles/.zshrc
|
|
||||||
atuin
|
|
||||||
cd ~/dotfiles
|
|
||||||
@ -1 +0,0 @@
|
|||||||
/home/sam/dotfiles/nushell
|
|
||||||
@ -1,38 +1,42 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "73813308abc2eaeff2bc0d3f2f79270c491be9d7" },
|
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
|
||||||
"catppuccin": { "branch": "main", "commit": "c89184526212e04feffbddda9d06b041a8fca416" },
|
"avante.nvim": { "branch": "main", "commit": "ca95e0386433da2077184719886fa658257261a3" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "234fc048de931a0e42ebcad675bf6559d75e23df" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "9d6f881a4047a51c7709223dcf24e967633c6523" },
|
"conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" },
|
||||||
"dracula.nvim": { "branch": "main", "commit": "041d923368d540a1e438989ce8f915628081a56a" },
|
"dracula.nvim": { "branch": "main", "commit": "ae752c13e95fb7c5f58da4b5123cb804ea7568ee" },
|
||||||
"everforest-nvim": { "branch": "main", "commit": "d2936185a6d266def29fd7b523d296384580ef08" },
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" },
|
"everforest-nvim": { "branch": "main", "commit": "557bce922401e247a596583679bc181d4d688554" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "27f1e119f3a7e6d11d435a59e3262e6affda1f83" },
|
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||||
"live-preview.nvim": { "branch": "main", "commit": "35ddc5a99499d1d2f4adefb7e92d0c537353fdec" },
|
"live-preview.nvim": { "branch": "main", "commit": "a1bb1b3a851df5276e53908276f5ae1d724d4812" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "155eac5d8609a2f110041f8ac3491664cc126354" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "48570d8372f63c9e9ba399a16606f9553034a9b2" },
|
"nvim-cmp": { "branch": "main", "commit": "106c4bcc053a5da783bf4a9d907b6f22485c2ea0" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "b38f7d30366d9169d0a623c4c85fbcf99d8d58bb" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "335a6044be16d7701001059cba9baa36fbeef422" },
|
"nvim-lint": { "branch": "master", "commit": "2536f1b18ea389e6b078b3a47a5e273c74a46a34" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "db8fef885009fdec0daeff3e5dda92e1f539611e" },
|
"nvim-lspconfig": { "branch": "master", "commit": "cc3d02065593d74b2fa7c0ff337c3e8b087fd788" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "87d096a39cb2d5d43e6771563575ff042a79f48b" },
|
"nvim-tree.lua": { "branch": "master", "commit": "1eda2569394f866360e61f590f1796877388cb8a" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
|
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||||
"onedark.nvim": { "branch": "master", "commit": "de495fabe171d48aed5525f002d14414efcecbb2" },
|
"onedark.nvim": { "branch": "master", "commit": "6c10964f91321c6a0f09bcc41dd64e7a6602bc4f" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
||||||
"telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" },
|
"telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "3a12a853ebf21ec1cce9a92290e3013f8ae75f02" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "4d159616aee17796c2c94d2f5f87d2ee1a3f67c7" },
|
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||||
"vim-markdown": { "branch": "master", "commit": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51" },
|
"vim-markdown": { "branch": "master", "commit": "1bc9d0cd8e1cc3e901b0a49c2b50a843f1c89397" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" }
|
"vimtex": { "branch": "master", "commit": "32bcb3922c20588e00de68f73c86312eda2141ad" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
vim.cmd("colorscheme catppuccin")
|
vim.cmd("colorscheme kanagawa-wave")
|
||||||
@ -5,3 +5,88 @@ vim.g.maplocalleader = " " -- Set the local leader key to the space bar.
|
|||||||
-- sam.options.lua
|
-- sam.options.lua
|
||||||
vim.opt.number = true -- Absolute numbers on all lines
|
vim.opt.number = true -- Absolute numbers on all lines
|
||||||
vim.opt.relativenumber = true -- Relative numbers (hybrid when both enabled)
|
vim.opt.relativenumber = true -- Relative numbers (hybrid when both enabled)
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Clipboard Settings (Added)
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
-- Sync with system clipboard
|
||||||
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
-- OSC 52 Support for SSH (Copy from Remote Nvim -> Local Computer)
|
||||||
|
if vim.env.SSH_TTY then
|
||||||
|
vim.g.clipboard = {
|
||||||
|
name = 'OSC 52',
|
||||||
|
copy = {
|
||||||
|
['+'] = require('vim.ui.clipboard.osc52').copy('+'),
|
||||||
|
['*'] = require('vim.ui.clipboard.osc52').copy('*'),
|
||||||
|
},
|
||||||
|
paste = {
|
||||||
|
['+'] = require('vim.ui.clipboard.osc52').paste('+'),
|
||||||
|
['*'] = require('vim.ui.clipboard.osc52').paste('*'),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Search Settings
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
vim.opt.hlsearch = true -- Highlight all matches on search
|
||||||
|
vim.opt.incsearch = true -- Show search results incrementally as you type
|
||||||
|
vim.opt.ignorecase = true -- Ignore case in search patterns
|
||||||
|
vim.opt.smartcase = true -- Override ignorecase if search pattern contains uppercase letters
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Essential Keybindings
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
-- Set a timeout for which-key to respond (in milliseconds)
|
||||||
|
vim.opt.timeoutlen = 300
|
||||||
|
|
||||||
|
-- A helper function to make setting keymaps easier
|
||||||
|
local keymap = function(mode, lhs, rhs, opts)
|
||||||
|
local options = { noremap = true, silent = true }
|
||||||
|
if opts then
|
||||||
|
options = vim.tbl_extend("force", options, opts)
|
||||||
|
end
|
||||||
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
group = vim.api.nvim_create_augroup("VimtexCompile", { clear = true }),
|
||||||
|
pattern = "*.tex",
|
||||||
|
callback = function()
|
||||||
|
vim.cmd("VimtexCompile")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- --- General ---
|
||||||
|
-- Save the current file
|
||||||
|
keymap("n", "<leader>w", ":w<CR>", { desc = "Write (Save) File" })
|
||||||
|
|
||||||
|
-- Quit the current buffer/window
|
||||||
|
keymap("n", "<leader>q", ":q<CR>", { desc = "Quit Window" })
|
||||||
|
|
||||||
|
-- --- Window Management (Splits) ---
|
||||||
|
-- Split window vertically
|
||||||
|
keymap("n", "<leader>sv", "<C-w>v", { desc = "Split Vertically" })
|
||||||
|
|
||||||
|
-- Split window horizontally
|
||||||
|
keymap("n", "<leader>sh", "<C-w>s", { desc = "Split Horizontally" })
|
||||||
|
|
||||||
|
-- --- Navigation Between Splits ---
|
||||||
|
-- Move to the window below/above/left/right
|
||||||
|
keymap("n", "<C-j>", "<C-w>j", { desc = "Move to Window Below" })
|
||||||
|
keymap("n", "<C-k>", "<C-w>k", { desc = "Move to Window Above" })
|
||||||
|
keymap("n", "<C-h>", "<C-w>h", { desc = "Move to Window Left" })
|
||||||
|
keymap("n", "<C-l>", "<C-w>l", { desc = "Move to Window Right" })
|
||||||
|
|
||||||
|
-- --- Buffer Navigation ---
|
||||||
|
-- Go to the next buffer
|
||||||
|
keymap("n", "<S-l>", ":bnext<CR>", { desc = "Next Buffer" })
|
||||||
|
|
||||||
|
-- Go to the previous buffer
|
||||||
|
keymap("n", "<S-h>", ":bprevious<CR>", { desc = "Previous Buffer" })
|
||||||
|
vim.keymap.set({'n', 'i', 'v'}, '<F14>', '<C-V>', { desc = 'Enter Visual Block' })
|
||||||
|
vim.keymap.set({'n', 'i'}, '<F15>', 'V', { desc = 'Enter Visual Line' })
|
||||||
|
|||||||
70
nvim/lua/sam/plugins/avante.lua
Normal file
70
nvim/lua/sam/plugins/avante.lua
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
return {
|
||||||
|
"yetone/avante.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"folke/which-key.nvim", -- For keymaps
|
||||||
|
},
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("avante").setup({
|
||||||
|
provider = "openai",
|
||||||
|
providers = {
|
||||||
|
openai = {
|
||||||
|
api_key_name = "OPENAI_API_KEY",
|
||||||
|
endpoint = "https://api.openai.com/v1",
|
||||||
|
model = "gpt-4o-mini", -- Your paid model
|
||||||
|
timeout = 30000,
|
||||||
|
extra_request_body = {
|
||||||
|
temperature = 0.1,
|
||||||
|
max_completion_tokens = 8192,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
behaviour = {
|
||||||
|
auto_suggestions = true, -- Inline completion
|
||||||
|
auto_set_highlight_group = true, -- Hints on hover
|
||||||
|
auto_apply_diff_after_generation = false, -- No auto-insert
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
normal = {
|
||||||
|
["gq"] = "AvanteAsk",
|
||||||
|
},
|
||||||
|
insert = {
|
||||||
|
["<C-g>"] = "AvanteToggleAutoSuggestions",
|
||||||
|
},
|
||||||
|
visual = {
|
||||||
|
["gq"] = "AvanteAsk",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hints = { enabled = true },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Your keymap style
|
||||||
|
local keymap = function(mode, lhs, rhs, opts)
|
||||||
|
local options = { noremap = true, silent = true }
|
||||||
|
if opts then options = vim.tbl_extend("force", options, opts) end
|
||||||
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||||
|
end
|
||||||
|
|
||||||
|
keymap("n", "<leader>ai", ":AvanteAsk<CR>", { desc = "Avante Chat" })
|
||||||
|
keymap("v", "<leader>ae", ":<C-U>AvanteAsk explain simply<CR>", { desc = "Explain Selected" })
|
||||||
|
keymap("v", "<leader>af", ":<C-U>AvanteAsk fix: optimize<CR>", { desc = "Fix Selected" })
|
||||||
|
keymap("i", "<C-Space>", "<cmd>AvanteToggleAutoSuggestions<CR>", { desc = "Toggle Inline" })
|
||||||
|
|
||||||
|
-- Which-key
|
||||||
|
vim.schedule(function()
|
||||||
|
local status_ok, wk = pcall(require, "which-key")
|
||||||
|
if status_ok then
|
||||||
|
wk.add({
|
||||||
|
{ "<leader>a", group = "AI (Avante)" },
|
||||||
|
{ "<leader>ai", "<cmd>AvanteAsk<CR>", desc = "Open Chat", mode = "n" },
|
||||||
|
{ "<leader>ae", desc = "Explain Selected", mode = "v" },
|
||||||
|
{ "<leader>af", desc = "Fix Selected", mode = "v" },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
@ -10,6 +10,11 @@ return {
|
|||||||
-- ADD THIS LINE to load the new extension
|
-- ADD THIS LINE to load the new extension
|
||||||
require("telescope").load_extension("themes")
|
require("telescope").load_extension("themes")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>f", builtin.find_files, { desc = "Find files" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" })
|
||||||
|
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Live grep" })
|
||||||
|
|
||||||
-- ADD THIS LINE to create the new keymap
|
-- ADD THIS LINE to create the new keymap
|
||||||
vim.keymap.set("n", "<leader>th", "<cmd>Telescope themes<cr>", { desc = "Switch Theme" })
|
vim.keymap.set("n", "<leader>th", "<cmd>Telescope themes<cr>", { desc = "Switch Theme" })
|
||||||
end,
|
end,
|
||||||
|
|||||||
15
nvim/lua/sam/plugins/vimtex.lua
Normal file
15
nvim/lua/sam/plugins/vimtex.lua
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-- In your plugins configuration file
|
||||||
|
return {
|
||||||
|
-- ... other plugins
|
||||||
|
|
||||||
|
{
|
||||||
|
"lervag/vimtex",
|
||||||
|
lazy = false, -- Or ft = "tex" to load it only for tex files
|
||||||
|
config = function()
|
||||||
|
-- Use Zathura as the PDF viewer
|
||||||
|
vim.g.vimtex_view_method = "zathura"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- ... other plugins
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user