Creating dotfiles for terminals
dot files for terminals a
This commit is contained in:
71
.zshrc
Normal file
71
.zshrc
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export VISUAL="nvim"
|
||||||
|
|
||||||
|
|
||||||
|
# This must be at the top for Powerlevel10k Instant Prompt to work.
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# === Oh My Zsh Configuration ===
|
||||||
|
# Path to your Oh My Zsh installation.
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
|
# Set the Powerlevel10k theme.
|
||||||
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
|
|
||||||
|
# Which plugins would you like to load?
|
||||||
|
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||||
|
|
||||||
|
|
||||||
|
# === Custom PATH Configuration ===
|
||||||
|
# This is the most critical fix. We set the PATH *before* sourcing Oh My Zsh.
|
||||||
|
# This ensures all custom commands are available to the shell and plugins.
|
||||||
|
export PATH="$HOME/.local/bin:$HOME/.fzf/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
# === Source Oh My Zsh ===
|
||||||
|
# This line loads the Oh My Zsh framework. All customisations must come after this.
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
|
||||||
|
# === Custom Tool Configuration ===
|
||||||
|
# All your custom tools are configured here, after OMZ has loaded.
|
||||||
|
|
||||||
|
# 1. Bat (Better Cat)
|
||||||
|
# On Debian/Ubuntu, the binary is often 'batcat'. If 'bat' is not found,
|
||||||
|
# change this alias to 'batcat'.
|
||||||
|
alias cat='bat --color=always --paging=never'
|
||||||
|
|
||||||
|
# 2. Eza Aliases (Modern replacement for 'ls')
|
||||||
|
alias ls='eza --icons --git'
|
||||||
|
alias ll='eza -l --icons --git'
|
||||||
|
alias la='eza -la --icons --git'
|
||||||
|
alias tree='eza --tree'
|
||||||
|
|
||||||
|
# 3. Zoxide (Smarter cd)
|
||||||
|
eval "$(zoxide init zsh)"
|
||||||
|
|
||||||
|
# 4. Atuin (Shell History)
|
||||||
|
# Your existing Atuin config.
|
||||||
|
eval "$(atuin init zsh)"
|
||||||
|
bindkey '^[[A' atuin-up-search # Up arrow
|
||||||
|
bindkey '^[[B' atuin-down-search # Down arrow
|
||||||
|
|
||||||
|
# 5. FZF (Fuzzy Finder)
|
||||||
|
# The official script handles keybindings (Ctrl+T) and completions.
|
||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|
||||||
|
# 6. Carapace (Completion Engine)
|
||||||
|
# This will now work because the PATH is set correctly above.
|
||||||
|
source <(carapace-bin _carapace zsh)
|
||||||
|
|
||||||
|
|
||||||
|
# === Load Powerlevel10k Theme ===
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
# This must be the very last thing in your .zshrc
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
|
alias cat='batcat --color=always --paging=never'
|
||||||
102
nushell/atuin.nu
Normal file
102
nushell/atuin.nu
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Source this in your ~/.config/nushell/config.nu
|
||||||
|
$env.ATUIN_SESSION = (atuin uuid)
|
||||||
|
hide-env -i ATUIN_HISTORY_ID
|
||||||
|
|
||||||
|
# Magic token to make sure we don't record commands run by keybindings
|
||||||
|
let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)"
|
||||||
|
|
||||||
|
let _atuin_pre_execution = {||
|
||||||
|
if ($nu | get -o history-enabled) == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let cmd = (commandline)
|
||||||
|
if ($cmd | is-empty) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if not ($cmd | str starts-with $ATUIN_KEYBINDING_TOKEN) {
|
||||||
|
$env.ATUIN_HISTORY_ID = (atuin history start -- $cmd)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let _atuin_pre_prompt = {||
|
||||||
|
let last_exit = $env.LAST_EXIT_CODE
|
||||||
|
if 'ATUIN_HISTORY_ID' not-in $env {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
with-env { ATUIN_LOG: error } {
|
||||||
|
do { atuin history end $'--exit=($last_exit)' -- $env.ATUIN_HISTORY_ID } | complete
|
||||||
|
|
||||||
|
}
|
||||||
|
hide-env ATUIN_HISTORY_ID
|
||||||
|
}
|
||||||
|
|
||||||
|
def _atuin_search_cmd [...flags: string] {
|
||||||
|
let nu_version = do {
|
||||||
|
let version = version
|
||||||
|
let major = $version.major?
|
||||||
|
if $major != null {
|
||||||
|
# These members are only available in versions > 0.92.2
|
||||||
|
[$major $version.minor $version.patch]
|
||||||
|
} else {
|
||||||
|
# So fall back to the slower parsing when they're missing
|
||||||
|
$version.version | split row '.' | into int
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[
|
||||||
|
$ATUIN_KEYBINDING_TOKEN,
|
||||||
|
([
|
||||||
|
`with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`,
|
||||||
|
(if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
|
||||||
|
(if $nu_version.1 >= 92 { '(run-external atuin search' } else { '(run-external --redirect-stderr atuin search' }),
|
||||||
|
($flags | append [--interactive] | each {|e| $'"($e)"'}),
|
||||||
|
(if $nu_version.1 >= 92 { ' e>| str trim)' } else {' | complete | $in.stderr | str substring ..-1)'}),
|
||||||
|
`}`,
|
||||||
|
] | flatten | str join ' '),
|
||||||
|
] | str join "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
$env.config = ($env | default {} config).config
|
||||||
|
$env.config = ($env.config | default {} hooks)
|
||||||
|
$env.config = (
|
||||||
|
$env.config | upsert hooks (
|
||||||
|
$env.config.hooks
|
||||||
|
| upsert pre_execution (
|
||||||
|
$env.config.hooks | get -o pre_execution | default [] | append $_atuin_pre_execution)
|
||||||
|
| upsert pre_prompt (
|
||||||
|
$env.config.hooks | get -o pre_prompt | default [] | append $_atuin_pre_prompt)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
$env.config = ($env.config | default [] keybindings)
|
||||||
|
|
||||||
|
$env.config = (
|
||||||
|
$env.config | upsert keybindings (
|
||||||
|
$env.config.keybindings
|
||||||
|
| append {
|
||||||
|
name: atuin
|
||||||
|
modifier: control
|
||||||
|
keycode: char_r
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: { send: executehostcommand cmd: (_atuin_search_cmd) }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
$env.config = (
|
||||||
|
$env.config | upsert keybindings (
|
||||||
|
$env.config.keybindings
|
||||||
|
| append {
|
||||||
|
name: atuin
|
||||||
|
modifier: none
|
||||||
|
keycode: up
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
until: [
|
||||||
|
{send: menuup}
|
||||||
|
{send: executehostcommand cmd: (_atuin_search_cmd '--shell-up-key-binding') }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
31
nushell/carapace.nu
Normal file
31
nushell/carapace.nu
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
$env.PATH = ($env.PATH | split row (char esep) | prepend "/home/sam/.config/carapace/bin")
|
||||||
|
|
||||||
|
def --env get-env [name] { $env | get $name }
|
||||||
|
def --env set-env [name, value] { load-env { $name: $value } }
|
||||||
|
def --env unset-env [name] { hide-env $name }
|
||||||
|
|
||||||
|
let carapace_completer = {|spans|
|
||||||
|
# if the current command is an alias, get it's expansion
|
||||||
|
let expanded_alias = (scope aliases | where name == $spans.0 | $in.0?.expansion?)
|
||||||
|
|
||||||
|
# overwrite
|
||||||
|
let spans = (if $expanded_alias != null {
|
||||||
|
# put the first word of the expanded alias first in the span
|
||||||
|
$spans | skip 1 | prepend ($expanded_alias | split row " " | take 1)
|
||||||
|
} else {
|
||||||
|
$spans | skip 1 | prepend ($spans.0)
|
||||||
|
})
|
||||||
|
|
||||||
|
carapace $spans.0 nushell ...$spans
|
||||||
|
| from json
|
||||||
|
}
|
||||||
|
|
||||||
|
mut current = (($env | default {} config).config | default {} completions)
|
||||||
|
$current.completions = ($current.completions | default {} external)
|
||||||
|
$current.completions.external = ($current.completions.external
|
||||||
|
| default true enable
|
||||||
|
# backwards compatible workaround for default, see nushell #15654
|
||||||
|
| upsert completer { if $in == null { $carapace_completer } else { $in } })
|
||||||
|
|
||||||
|
$env.config = $current
|
||||||
|
|
||||||
44
nushell/config.nu
Normal file
44
nushell/config.nu
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# === Environment and Alias Setup ===
|
||||||
|
$env.PATH = ($env.PATH | prepend '~/.fzf/bin' | prepend '~/.local/bin' | prepend '/snap/bin')
|
||||||
|
source $"($nu.home-path)/.cargo/env.nu"
|
||||||
|
|
||||||
|
$env.EDITOR = "nvim"
|
||||||
|
$env.VISUAL = "nvim"
|
||||||
|
|
||||||
|
|
||||||
|
alias ls = eza --icons --git
|
||||||
|
alias ll = eza -l --icons --git
|
||||||
|
alias la = eza -la --icons --git
|
||||||
|
alias tree = eza --tree
|
||||||
|
alias carapace = carapace-bin
|
||||||
|
|
||||||
|
# === Source Application Scripts ===
|
||||||
|
source ~/.config/nushell/atuin.nu
|
||||||
|
source ~/.config/nushell/carapace.nu
|
||||||
|
source ~/.config/nushell/zoxide.nu
|
||||||
|
|
||||||
|
# === Configure Starship Prompt (Corrected Syntax) ===
|
||||||
|
# The modern syntax checks if the variable exists.
|
||||||
|
$env.PROMPT_COMMAND = {||
|
||||||
|
starship prompt --cmd-duration $env.CMD_DURATION_MS?
|
||||||
|
}
|
||||||
|
$env.PROMPT_COMMAND_RIGHT = {|| starship prompt --right }
|
||||||
|
|
||||||
|
# === Define Final Keybindings ===
|
||||||
|
$env.config = ($env.config |
|
||||||
|
update keybindings (
|
||||||
|
$env.config.keybindings
|
||||||
|
| where name != 'history-menu'
|
||||||
|
| where name != 'history-search-backward'
|
||||||
|
| append {
|
||||||
|
name: fzf-file-widget
|
||||||
|
modifier: control
|
||||||
|
keycode: char_t
|
||||||
|
mode: [emacs, vi_normal, vi_insert]
|
||||||
|
event: {
|
||||||
|
send: executehostcommand
|
||||||
|
cmd: $"commandline edit (fzf)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
12
nushell/env.nu
Normal file
12
nushell/env.nu
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# This file is for environment variables only.
|
||||||
|
|
||||||
|
# 1. Add binary paths to the PATH environment variable.
|
||||||
|
# We prepend so they are found before system defaults.
|
||||||
|
$env.PATH = ($env.PATH |
|
||||||
|
prepend '~/.fzf/bin' |
|
||||||
|
prepend '~/.local/bin' |
|
||||||
|
prepend '/snap/bin'
|
||||||
|
)
|
||||||
|
|
||||||
|
# 2. Source the Cargo environment to add its bin directory to the PATH.
|
||||||
|
source $"($nu.home-path)/.cargo/env.nu"
|
||||||
737
nushell/history.txt
Normal file
737
nushell/history.txt
Normal file
@ -0,0 +1,737 @@
|
|||||||
|
/usr/bin/vim ~/.config/ghostty/config
|
||||||
|
/usr/bin/vim ~/.config/nushell/env.nu
|
||||||
|
/usr/bin/vim ~/.config/ghostty/config
|
||||||
|
atuin init nu | save --force ~/.config/nushell/atuin.nu
|
||||||
|
vim ~/.config/nushell/env.nu
|
||||||
|
ps
|
||||||
|
vim ~/.config/nushell/env.nu
|
||||||
|
vim ~/.config/nushell/atuin.nu
|
||||||
|
vim ~/.config/nushell/env.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
vim ~/.config/nushell/env.nu
|
||||||
|
which atuin
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
atuin init nu | save --force ~/.config/nushell/atuin.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
atuin init nu | save --force ~/.config/nushell/atuin.nu
|
||||||
|
ps
|
||||||
|
sudo apt install zellij
|
||||||
|
cd ~
|
||||||
|
<\n> wget https://github.com/zellij-project/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz
|
||||||
|
cargo
|
||||||
|
(type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)) \<\n>&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \<\n>&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \<\n>&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \<\n>&& sudo apt update \<\n>&& sudo apt install gh -y
|
||||||
|
bash -c '(type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)) && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y'
|
||||||
|
<\n> gh extension install gennaro-tedesco/gh-zellij
|
||||||
|
gh extension install gennaro-tedesco/gh-zellij
|
||||||
|
gh auth login
|
||||||
|
ssh-keygen -t ed25519 -C "samuelrolfe@gmail.com"
|
||||||
|
ls -al ~/.ssh/*.pub
|
||||||
|
gh ssh-key add ~/.ssh/id_ed25519.pub
|
||||||
|
gh auth login
|
||||||
|
gh extension install gennaro-tedesco/gh-zellij
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
source $"($nu.home-path)/.cargo/env.nu"
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
cargo install --locked zellij
|
||||||
|
zellij
|
||||||
|
ls
|
||||||
|
pwd
|
||||||
|
cx
|
||||||
|
zellij
|
||||||
|
wget https://github.com/rsteube/carapace-bin/releases/latest/download/carapace-bin_linux_amd64.tar.gz
|
||||||
|
curl -fsSL https://carapace-sh.github.io/install.sh | sh
|
||||||
|
# We will use curl since we know it's installed.<\n># The -L flag follows redirects, and -o saves the file.<\n>curl -L https://github.com/rsteube/carapace-bin/releases/latest/download/carapace-bin_linux_amd64.tar.gz -o carapace.tar.gz
|
||||||
|
tar -xzf carapace.tar.gz
|
||||||
|
curl -L https://github.com/rsteube/carapace-bin/releases/latest/download/carapace-bin_linux_amd64.tar.gz -o carapace.tar.gz
|
||||||
|
tar -xzf carapace.tar.gz
|
||||||
|
file carapace.tar.gz
|
||||||
|
rm carapace.tar.gz
|
||||||
|
wget -O carapace.tar.gz https://github.com/rsteube/carapace-bin/releases/latest/download/carapace-bin_linux_amd64.tar.gz
|
||||||
|
rm -f carapace.tar.gz
|
||||||
|
wget -O carapace.tar.gz https://github.com/carapace-sh/carapace-bin/releases/latest/download/carapace-bin_linux_amd64.tar.gz
|
||||||
|
curl -L https://github.com/carapace-sh/carapace-bin/releases/download/v1.5.0/carapace-bin_1.5.0_linux_amd64.tar.gz
|
||||||
|
curl -L https://github.com/carapace-sh/carapace-bin/releases/download/v1.5.0/carapace-bin_1.5.0_linux_amd64.tar.gz -o carapace.tar.gz
|
||||||
|
tar -xzf carapace.tar.gz
|
||||||
|
mv carapace-bin ~/.local/bin/
|
||||||
|
ls
|
||||||
|
mv carapace ~/.local/bin/carapace-bin
|
||||||
|
ls
|
||||||
|
carapace-bin --version
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
--help
|
||||||
|
mkdir --help
|
||||||
|
mkdir ~/.local/bin
|
||||||
|
mv carapace ~/.local/bin/carapace-bin
|
||||||
|
carapace-bin _carapace nushell | save --force ~/.config/nushell/carapace.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
zellij
|
||||||
|
carapace
|
||||||
|
cara
|
||||||
|
ls ~/.config/nushell/
|
||||||
|
vim vim ~/.config/nushell/config.nu
|
||||||
|
carapace-bin _carapace nushell | save --force ~/.config/nushell/carapace.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
vim ~/.config/nushell/carapace.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
carapace --style
|
||||||
|
carapace
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
carapace
|
||||||
|
carapace --style
|
||||||
|
zellij --theme "catppuccin-macchiato"
|
||||||
|
zeillij options
|
||||||
|
zellij options
|
||||||
|
vim ~/.config/zellij/themes
|
||||||
|
zellij --t
|
||||||
|
zellij
|
||||||
|
mkdir ~/.config/zellij/themes
|
||||||
|
zellij
|
||||||
|
vim ~/.config/zellij/themes
|
||||||
|
rm ~/.config/zellij/themes
|
||||||
|
mkdir ~/.config/zellij/themes
|
||||||
|
vim ~/.config/zellij/config.kdl
|
||||||
|
carapace
|
||||||
|
zellij
|
||||||
|
carapace
|
||||||
|
carapace --list
|
||||||
|
<\n> curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
||||||
|
zoxide --version
|
||||||
|
ls
|
||||||
|
zoxide init nushell | save --force ~/.config/nushell/zoxide.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
ls
|
||||||
|
pwd
|
||||||
|
cd ~/dev/ghostty
|
||||||
|
cd Downloads
|
||||||
|
cd /Documents
|
||||||
|
ls
|
||||||
|
cd ../
|
||||||
|
ls
|
||||||
|
cd /Documents
|
||||||
|
cd Documents
|
||||||
|
cd ../
|
||||||
|
vim ~/.config/nushell/zoxide.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
z D
|
||||||
|
z Dow
|
||||||
|
z h
|
||||||
|
z /
|
||||||
|
z ~
|
||||||
|
z
|
||||||
|
ls
|
||||||
|
sudo mkdir -p /etc/apt/keyrings
|
||||||
|
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install eza
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
ls
|
||||||
|
ll
|
||||||
|
tree
|
||||||
|
ll
|
||||||
|
z dev
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
z
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
rm carapace.tar.gz
|
||||||
|
vim README.md
|
||||||
|
rm README.md
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
zellij
|
||||||
|
z Pictures
|
||||||
|
z
|
||||||
|
z Desktop/
|
||||||
|
z
|
||||||
|
z .config/
|
||||||
|
eza
|
||||||
|
z
|
||||||
|
sudo apt install fzf
|
||||||
|
cargo install fzf-nu
|
||||||
|
cargo install --git https://github.com/j-n-n/fzf-nu
|
||||||
|
cargo install --git git@github.com:j-n-n/fzf-nu.git
|
||||||
|
cargo install --git ssh://git@github.com:j-n-n/fzf-nu.git
|
||||||
|
cargo install --git ssh://git@github.com/j-n-n/fzf-nu.git
|
||||||
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||||
|
~/.fzf/install
|
||||||
|
cargo install --git https://github.com/j-n-n/fzf-nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
fzf
|
||||||
|
fzf --help
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
ll
|
||||||
|
eza -l
|
||||||
|
ll
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
atuin init nu | save --force ~/.config/nushell/atuin.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
atuin init nu | save --force ~/.config/nushell/atuin.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
sed -i 's/get -i/get -o/g' ~/.config/nushell/atuin.nu
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
la
|
||||||
|
tree
|
||||||
|
fzf --help
|
||||||
|
zellij
|
||||||
|
ps
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
vim ~/.config/nushell/env.nu
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
ps
|
||||||
|
eza -l
|
||||||
|
cx
|
||||||
|
eza | fzf
|
||||||
|
eza | fzf | vim
|
||||||
|
zellij
|
||||||
|
tree
|
||||||
|
cd ~/Downloads
|
||||||
|
<\n> wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
|
||||||
|
mkdir -p ~/.local/share/fonts
|
||||||
|
mkdir ~/.local/share/fonts
|
||||||
|
unzip JetBrainsMono.zip -d ~/.local/share/fonts/JetBrainsMonoNerdFont
|
||||||
|
<\n> fc-cache -fv
|
||||||
|
- <\n> vim ~/.config/ghostty/config
|
||||||
|
vim ~/.config/ghostty/config
|
||||||
|
tree
|
||||||
|
tree -L2
|
||||||
|
z Templates
|
||||||
|
z
|
||||||
|
z Sam
|
||||||
|
z /Documents
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
z Sam
|
||||||
|
ls
|
||||||
|
vim terminal_set_up.text
|
||||||
|
vim terminal_set_up.text
|
||||||
|
rm ~/.vim/swapfiles/%home%sam%Documents%Sam%terminal_set_up.text.swp
|
||||||
|
vim terminal_set_up.text
|
||||||
|
z
|
||||||
|
vim ~/.zshrc
|
||||||
|
z /Documents/Sam
|
||||||
|
vim terminal_set_up.text
|
||||||
|
z
|
||||||
|
vim ~/.zshrc
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install bat
|
||||||
|
vim ~/.zshrc
|
||||||
|
carapace
|
||||||
|
cargo install starship --locked
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
z zshrc
|
||||||
|
vim ~/.zshrc
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
z zshrc
|
||||||
|
z Desktop/
|
||||||
|
z
|
||||||
|
starship
|
||||||
|
z Documents
|
||||||
|
z sam
|
||||||
|
bat facebook_cricket_gear.tex
|
||||||
|
bat
|
||||||
|
vim ~/.zshrc
|
||||||
|
z sam
|
||||||
|
bat facebook_cricket_gear.tex
|
||||||
|
cat ~/.zshrc
|
||||||
|
Bat
|
||||||
|
fzf
|
||||||
|
fzf
|
||||||
|
fzf test
|
||||||
|
fzf
|
||||||
|
carapace
|
||||||
|
git clone git@github.com:BurntSushi/ripgrep.git
|
||||||
|
cd ripgrep
|
||||||
|
cargo fetch
|
||||||
|
cd ..
|
||||||
|
rm -rf ripgrep
|
||||||
|
vim ~/.zshrc
|
||||||
|
batcat
|
||||||
|
batcat facebook_cricket_gear.tex
|
||||||
|
Starship
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
bat facebook_cricket_gear.tex
|
||||||
|
batcat facebook_cricket_gear.tex
|
||||||
|
starship
|
||||||
|
zellij
|
||||||
|
vim ~/.config/zellij/config.kdl
|
||||||
|
echo $SHELL
|
||||||
|
zellij
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
batcat
|
||||||
|
batcat ~/.config/nushell/config.nu
|
||||||
|
batcat ~/.zshrc
|
||||||
|
vim ~/.zshrc
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
z sam
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
vim terminal_set_up.text
|
||||||
|
batcat terminal_set_up.text
|
||||||
|
vim terminal_set_up.text
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
z
|
||||||
|
- <\n> vim ~/.config/ghostty/config
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
zellij
|
||||||
|
zu
|
||||||
|
vim ~/.zshrc
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
tree -L2
|
||||||
|
tree | fzf
|
||||||
|
zellij
|
||||||
|
set -o vi
|
||||||
|
exit
|
||||||
|
nvim
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install neovim
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/colorscheme.lua
|
||||||
|
nvim
|
||||||
|
~/.config/nvim/lua/sam/options.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/options.lua
|
||||||
|
vim ~/.config/nvim/init.lua
|
||||||
|
vim /.config/nvim/lua/sam/plugins/icons.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/icons.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/filetree.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lualine.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/treesitter.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/mason.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
rm -rf ~/.local/share/nvim/lazy
|
||||||
|
rm -rf ~/.local/share/nvim/mason
|
||||||
|
rm ~/.config/nvim/lua/sam/plugins/mason.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
rm -rf ~/.local/share/nvim/lazy
|
||||||
|
rm -rf ~/.local/share/nvim/mason
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
rm -rf ~/.local/share/nvim/lazy
|
||||||
|
rm -rf ~/.local/share/nvim/mason
|
||||||
|
/.config/nvim/lua/sam/plugins/cmp.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/cmp.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/telescope.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
sudo apt remove neovim
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||||
|
sudo apt install neovim
|
||||||
|
nvim --version
|
||||||
|
apt-cache policy neovim
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||||
|
sudo apt update
|
||||||
|
apt-cache policy neovim
|
||||||
|
curl -LO https://github.com/neovim/neovim/releases/download/v0.11.4/nvim-linux-x86_64.appimage
|
||||||
|
chmod u+x nvim-linux-x86_64.appimage
|
||||||
|
sudo mv nvim-linux-x86_64.appimage /usr/local/bin/nvim
|
||||||
|
nvim --version
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/gitsigns.lua
|
||||||
|
nvim
|
||||||
|
fzf
|
||||||
|
zellij
|
||||||
|
nvim
|
||||||
|
ll ~/.config/nvim/lua/sam/plugins/
|
||||||
|
ls
|
||||||
|
z D
|
||||||
|
z sam
|
||||||
|
ll
|
||||||
|
vim terminal_set_up.text
|
||||||
|
lm
|
||||||
|
ll
|
||||||
|
zellij
|
||||||
|
vim terminal_set_up.text
|
||||||
|
z sam
|
||||||
|
vim terminal_set_up.text
|
||||||
|
vim ~/.config/starship.toml
|
||||||
|
starship config > ~/.config/starship.toml
|
||||||
|
vim ~/.config/starship.toml
|
||||||
|
starship config
|
||||||
|
starship
|
||||||
|
vim ~/.config/nushell/config.nu
|
||||||
|
batcat ~/.config/nushell/config.nu
|
||||||
|
vim ~/.zshrc
|
||||||
|
batcat ~/.zshrc
|
||||||
|
batcat --plain ~/.config/nushell/config.nu
|
||||||
|
batcat --plain ~/.zshrc
|
||||||
|
vim ~/.zshrc
|
||||||
|
batcat ~/.zshrc
|
||||||
|
batcat -p ~/.zshrc
|
||||||
|
xclip
|
||||||
|
batcat -p ~/.zshrc | xclip -selection clipboard
|
||||||
|
vim vim ~/.config/nushell/config.nu
|
||||||
|
vim ~/.config/nushell/carapace.nu
|
||||||
|
batcat -p ~/.config/nushell/carapace.nu
|
||||||
|
vim ~/.config/nushell/carapace.nu
|
||||||
|
vim ~/.config/nushell/zoxide.nu
|
||||||
|
batcat -p ~/.config/nushell/zoxide.nu
|
||||||
|
batcat -p ~/.config/nushell/zoxide.nu | xclip -selection clipboard
|
||||||
|
vim ~/.config/starship.toml
|
||||||
|
z sam
|
||||||
|
ls
|
||||||
|
vim terminal_set_up.text
|
||||||
|
ip -a
|
||||||
|
ip a
|
||||||
|
carapace
|
||||||
|
z sam
|
||||||
|
ll
|
||||||
|
nvim terminal_set_up.text
|
||||||
|
mkdir ~/Vorta-Mount
|
||||||
|
xrandr
|
||||||
|
nvidia-smi
|
||||||
|
sudo ubuntu-drivers devices<\n>
|
||||||
|
lspci -nnk | grep -i vga -A3<\n>
|
||||||
|
glxinfo | grep "OpenGL renderer"<\n>
|
||||||
|
nvim ~/.config/monitors.xml
|
||||||
|
lsmod | grep nvidia<\n>
|
||||||
|
sudo modprobe nvidia<\n>
|
||||||
|
dmesg | grep -i nvidia<\n>
|
||||||
|
sudo dmesg | grep -i nvidia<\n>
|
||||||
|
dkms status<\n>
|
||||||
|
cat /etc/modprobe.d/nvidia-drm.conf<\n>
|
||||||
|
dpkg -l | grep nvidia<\n>
|
||||||
|
uname -r<\n>
|
||||||
|
find /lib/modules/$(uname -r)/ -type f -name '*nvidia*'<\n>
|
||||||
|
$sysinfo os.kernel<\n>
|
||||||
|
uname -a
|
||||||
|
sudo apt install dkms<\n>
|
||||||
|
sudo dkms build nvidia/575.64.03
|
||||||
|
sudo dkms install nvidia/575.64.03
|
||||||
|
sudo dkms status
|
||||||
|
sudo apt-get purge nvidia*
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install nvidia-driver-575
|
||||||
|
nvidia-smi
|
||||||
|
dmesg | grep -i nvidia<\n>
|
||||||
|
sudo dmesg | grep -i nvidia<\n>
|
||||||
|
lsmod | grep nvidia
|
||||||
|
sudo modprobe nvidia
|
||||||
|
ll
|
||||||
|
z sam
|
||||||
|
ll
|
||||||
|
ls
|
||||||
|
tree
|
||||||
|
vmtext
|
||||||
|
ll
|
||||||
|
nvim facebook_cricket_gear.tex
|
||||||
|
ls ~/.vim/plugged/
|
||||||
|
which zathura
|
||||||
|
nvim facebook_cricket_gear.tex
|
||||||
|
pws
|
||||||
|
z sam
|
||||||
|
nvim facebook_cricket_gear.tex
|
||||||
|
ls
|
||||||
|
nvim notes_GPS_tracker_mobile.txt
|
||||||
|
nvim test_text.txt
|
||||||
|
ls
|
||||||
|
nvim react_test.js
|
||||||
|
nvim test_text.txt
|
||||||
|
nvim react_test.js
|
||||||
|
nvim
|
||||||
|
nvim ~/.vimrc
|
||||||
|
ll ~/.config/nvim/lua/sam/plugins/
|
||||||
|
ll ~/.config/nvim/
|
||||||
|
vim ~/.config/nvim/init.lua
|
||||||
|
ll ~/.config/nvim/lua
|
||||||
|
ll ~/.config/nvim/lua/sam
|
||||||
|
nvim ~/.config/nvim/lua/sam/lazy.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/options.lua
|
||||||
|
ll ~/.config/nvim/
|
||||||
|
nvim ~/.config/nvim/lazy-lock.json
|
||||||
|
ll ~/.config/nvim/
|
||||||
|
vim ~/.config/nvim/init.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/lazy.lua<\n>
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
neovim
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
z sam
|
||||||
|
test_readme.md
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim
|
||||||
|
nvim test_readme.md
|
||||||
|
test_readme.md
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim test_text.txt
|
||||||
|
nvim test_readme.md
|
||||||
|
pandoc test_readme.md -o test.html --standalone --self-contained
|
||||||
|
open test.html
|
||||||
|
xdg-open test.html
|
||||||
|
nvim test_readme.md
|
||||||
|
pandoc test_readme.md -o test.html --standalone --self-contained
|
||||||
|
xdg-open test.html
|
||||||
|
nvim test_readme.md
|
||||||
|
ll
|
||||||
|
nvim test.html
|
||||||
|
nvim
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim
|
||||||
|
nvim test.html
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
ll
|
||||||
|
z
|
||||||
|
z sam
|
||||||
|
ll
|
||||||
|
ll ~/.config/nvim/lua/sam/plugins/
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
grep -r "lspconfig\|framework" ~/.config/nvim/lua/sam/plugins/
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/markdown.lua
|
||||||
|
nvim test.html
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/mason-tools.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
nvim test.html
|
||||||
|
z sam
|
||||||
|
ls
|
||||||
|
nvim test_readme.md
|
||||||
|
nvim test.html
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim
|
||||||
|
nvim test.html
|
||||||
|
ls
|
||||||
|
nvim test_1.html
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim test_1.html
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
z sam
|
||||||
|
nvim test_1.html
|
||||||
|
nvim westyck_forsale.html
|
||||||
|
vimtutor
|
||||||
|
nvim
|
||||||
|
ll
|
||||||
|
nvim test.json
|
||||||
|
nvim react_test.js
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/init.vim
|
||||||
|
vim ~/.config/nvim/init.lua
|
||||||
|
nvim westyck_forsale.html
|
||||||
|
ll
|
||||||
|
nvim test_r
|
||||||
|
nvim test_readme.md
|
||||||
|
help rename
|
||||||
|
mv test_text.txt facebook_sale.txt
|
||||||
|
nvim facebook_sale.txt
|
||||||
|
ll
|
||||||
|
mv test_readme.md facebook_sales.md
|
||||||
|
nvim facebook_sales.md
|
||||||
|
nvim ~/.config/nvim/lua/sam/options.lua
|
||||||
|
nvim facebook_sales.md
|
||||||
|
fg
|
||||||
|
ll
|
||||||
|
nvim facebook_sales.md
|
||||||
|
zellij --help
|
||||||
|
nvim facebook_sales.md
|
||||||
|
zellij
|
||||||
|
ll
|
||||||
|
nvim
|
||||||
|
cargo install --locked yazi-fm<\n>
|
||||||
|
yazi
|
||||||
|
zellij
|
||||||
|
ls -a ~/
|
||||||
|
nvim .bashrc
|
||||||
|
ls
|
||||||
|
ls -a
|
||||||
|
rm .bashrc
|
||||||
|
nvim ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
nvim ~/.zshrc
|
||||||
|
source ~/.zshrc
|
||||||
|
nvim ~/.config/nushell/config.nu
|
||||||
|
nvim ~/.config/nushell/env.nu
|
||||||
|
source ~/.config/nushell/config.nu
|
||||||
|
yazi
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
zellij
|
||||||
|
$env.SHELL
|
||||||
|
echo $SHELL
|
||||||
|
echo $TERM
|
||||||
|
infocmp xterm-ghostty > ghostty.terminfo<\n>
|
||||||
|
echo $TERM | cat -v
|
||||||
|
echo $env.TERM | cat -v<\n>
|
||||||
|
infocmp "xterm-ghostty" > ghostty.terminfo
|
||||||
|
scp ghostty.terminfo sam@192.168.20.35:/tmp/<\n>
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
ssh sam@192.168.20.35 bash --noprofile --norc
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
ls
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
fzf
|
||||||
|
cargo install tealdeer
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
cargo install tealdeer
|
||||||
|
tldr --update
|
||||||
|
cargo install tealdeer
|
||||||
|
tldr --update
|
||||||
|
ip a
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
ip a
|
||||||
|
zellij
|
||||||
|
tldr tar
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
cargo install tealdeer
|
||||||
|
exit
|
||||||
|
cargo install navi
|
||||||
|
navi
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
yazi
|
||||||
|
zellij
|
||||||
|
fzf plugins
|
||||||
|
ll ~/.config/nvim/lua/sam/plugins/
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install ripgrep
|
||||||
|
sudo add-apt-repository ppa:lazygit-team/release
|
||||||
|
sudo apt install btop
|
||||||
|
cargo install dua-cli
|
||||||
|
btop
|
||||||
|
cargo install dua-cli
|
||||||
|
z sam
|
||||||
|
ll
|
||||||
|
zellij
|
||||||
|
yazi
|
||||||
|
sudo add-apt-repository --remove ppa:lazygit-team/release
|
||||||
|
sudo apt update
|
||||||
|
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \<\n>grep -Po '"tag_name": *"v\K[^"]*')
|
||||||
|
dua
|
||||||
|
ssh sam@192.168.20.35
|
||||||
|
rg test
|
||||||
|
ssh sam@192.168.20.13
|
||||||
|
which rg
|
||||||
|
btop
|
||||||
|
dua
|
||||||
|
rg init.lua
|
||||||
|
exit
|
||||||
|
exit
|
||||||
|
zellij
|
||||||
|
exot
|
||||||
|
host
|
||||||
|
host -a
|
||||||
|
hostname
|
||||||
|
rg init.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/options.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
yazi
|
||||||
|
yazi ~/.config
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/init.lua
|
||||||
|
ls ~/.config/nvim/lua/sam/plugins
|
||||||
|
cd ../
|
||||||
|
ls
|
||||||
|
cd ~
|
||||||
|
ls ~/.config/nvim/lua/sam/
|
||||||
|
ls ~/.config/nvim/lua
|
||||||
|
ls ~/.config/
|
||||||
|
vim ~/.config/nvim/lua/sam/lazy.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lsp.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/lint.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/dap.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/comment.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/autopairs.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim
|
||||||
|
<\n> rm ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
rm ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim
|
||||||
|
cat ~/.config/nvim/init.lua
|
||||||
|
cat ~/.config/nvim/lua/sam/options.lua
|
||||||
|
vim ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim vim ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/
|
||||||
|
ls ~/.config/nvim/lua/sam/plugins
|
||||||
|
nvim vim ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim
|
||||||
|
nvim vim ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/lazy.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/lazy.lua
|
||||||
|
nvim /.config/nvim/lua/sam/plugins/theme-catppuccin.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-catppuccin.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-tokyonight.lua
|
||||||
|
nvim vim ~/.config/nvim/lua/sam/plugins/telescope.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/init.lua
|
||||||
|
rg init.lua
|
||||||
|
nvim ~/.config/nvim/init.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/colorscheme.lua
|
||||||
|
rm ~/.config/nvim/lua/sam/plugins/theme-switcher.lua
|
||||||
|
nvim
|
||||||
|
ls~/.config/nvim/lua/sam/plugins/
|
||||||
|
ls ~/.config/nvim/lua/sam/plugins/
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/telescope.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/telescope.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/telescope-addons.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/telescope.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-gruvbox.lua
|
||||||
|
nvim
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-dracula.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-kanagawa.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-everforest.lua
|
||||||
|
nvim ~/.config/nvim/lua/sam/plugins/theme-onedark.lua
|
||||||
|
nvim
|
||||||
|
cd Documents
|
||||||
|
^mkdir ~/dotfiles
|
||||||
|
mkdir ~/dotfiles
|
||||||
|
cd ~/dotfiles
|
||||||
|
git init
|
||||||
|
git remote add origin git@gitea.lab.audasmedia.com.au:sam/dotfiles.git
|
||||||
|
echo ".DS_Store" > .gitignore
|
||||||
|
echo "*.swp" >> .gitignore
|
||||||
|
cp ~/.zshrc ~/.zshrc.bak
|
||||||
|
mv ~/.zshrc ~/dotfiles/
|
||||||
|
ln -s ~/dotfiles/.zshrc ~/.zshrc
|
||||||
|
cp -r ~/.config/nvim ~/.config/nvim.bak
|
||||||
|
mv ~/.config/nvim ~/dotfiles/
|
||||||
|
ln -s ~/dotfiles/nvim ~/.config/nvim
|
||||||
|
cp -r ~/.config/nushell ~/.config/nushell.bak
|
||||||
70
nushell/zoxide.nu
Normal file
70
nushell/zoxide.nu
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# Code generated by zoxide. DO NOT EDIT.
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Hook configuration for zoxide.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Initialize hook to add new entries to the database.
|
||||||
|
export-env {
|
||||||
|
$env.config = (
|
||||||
|
$env.config?
|
||||||
|
| default {}
|
||||||
|
| upsert hooks { default {} }
|
||||||
|
| upsert hooks.env_change { default {} }
|
||||||
|
| upsert hooks.env_change.PWD { default [] }
|
||||||
|
)
|
||||||
|
let __zoxide_hooked = (
|
||||||
|
$env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } }
|
||||||
|
)
|
||||||
|
if not $__zoxide_hooked {
|
||||||
|
$env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append {
|
||||||
|
__zoxide_hook: true,
|
||||||
|
code: {|_, dir| zoxide add -- $dir}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Jump to a directory using only keywords.
|
||||||
|
def --env --wrapped __zoxide_z [...rest: string] {
|
||||||
|
let path = match $rest {
|
||||||
|
[] => {'~'},
|
||||||
|
[ '-' ] => {'-'},
|
||||||
|
[ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
|
||||||
|
_ => {
|
||||||
|
zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cd $path
|
||||||
|
}
|
||||||
|
|
||||||
|
# Jump to a directory using interactive search.
|
||||||
|
def --env --wrapped __zoxide_zi [...rest:string] {
|
||||||
|
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
|
||||||
|
}
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
|
#
|
||||||
|
|
||||||
|
alias z = __zoxide_z
|
||||||
|
alias zi = __zoxide_zi
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
#
|
||||||
|
# Add this to your env file (find it by running `$nu.env-path` in Nushell):
|
||||||
|
#
|
||||||
|
# zoxide init nushell | save -f ~/.zoxide.nu
|
||||||
|
#
|
||||||
|
# Now, add this to the end of your config file (find it by running
|
||||||
|
# `$nu.config-path` in Nushell):
|
||||||
|
#
|
||||||
|
# source ~/.zoxide.nu
|
||||||
|
#
|
||||||
|
# Note: zoxide only supports Nushell v0.89.0+.
|
||||||
2
nvim/init.lua
Normal file
2
nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
require("sam.options")
|
||||||
|
require("sam.lazy")
|
||||||
38
nvim/lazy-lock.json
Normal file
38
nvim/lazy-lock.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "73813308abc2eaeff2bc0d3f2f79270c491be9d7" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "c89184526212e04feffbddda9d06b041a8fca416" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "9d6f881a4047a51c7709223dcf24e967633c6523" },
|
||||||
|
"dracula.nvim": { "branch": "main", "commit": "041d923368d540a1e438989ce8f915628081a56a" },
|
||||||
|
"everforest-nvim": { "branch": "main", "commit": "d2936185a6d266def29fd7b523d296384580ef08" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" },
|
||||||
|
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||||
|
"kanagawa.nvim": { "branch": "master", "commit": "27f1e119f3a7e6d11d435a59e3262e6affda1f83" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"live-preview.nvim": { "branch": "main", "commit": "35ddc5a99499d1d2f4adefb7e92d0c537353fdec" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "155eac5d8609a2f110041f8ac3491664cc126354" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "48570d8372f63c9e9ba399a16606f9553034a9b2" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "335a6044be16d7701001059cba9baa36fbeef422" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "db8fef885009fdec0daeff3e5dda92e1f539611e" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "87d096a39cb2d5d43e6771563575ff042a79f48b" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
|
||||||
|
"onedark.nvim": { "branch": "master", "commit": "de495fabe171d48aed5525f002d14414efcecbb2" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
||||||
|
"telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "4d159616aee17796c2c94d2f5f87d2ee1a3f67c7" },
|
||||||
|
"vim-markdown": { "branch": "master", "commit": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" }
|
||||||
|
}
|
||||||
1
nvim/lua/current-theme.lua
Normal file
1
nvim/lua/current-theme.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
vim.cmd("colorscheme catppuccin")
|
||||||
17
nvim/lua/sam/lazy.lua
Normal file
17
nvim/lua/sam/lazy.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/lazy.lua
|
||||||
|
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Tell lazy to load our plugin specs from the "plugins" directory
|
||||||
|
require("lazy").setup("sam.plugins", {})
|
||||||
7
nvim/lua/sam/options.lua
Normal file
7
nvim/lua/sam/options.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/options.lua
|
||||||
|
|
||||||
|
vim.g.mapleader = " " -- Set the leader key to the space bar.
|
||||||
|
vim.g.maplocalleader = " " -- Set the local leader key to the space bar.
|
||||||
|
-- sam.options.lua
|
||||||
|
vim.opt.number = true -- Absolute numbers on all lines
|
||||||
|
vim.opt.relativenumber = true -- Relative numbers (hybrid when both enabled)
|
||||||
7
nvim/lua/sam/plugins/autopairs.lua
Normal file
7
nvim/lua/sam/plugins/autopairs.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
require("nvim-autopairs").setup({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
39
nvim/lua/sam/plugins/cmp.lua
Normal file
39
nvim/lua/sam/plugins/cmp.lua
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/cmp.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp", -- Source for LSP completions
|
||||||
|
"hrsh7th/cmp-buffer", -- Source for buffer completions
|
||||||
|
"hrsh7th/cmp-path", -- Source for path completions
|
||||||
|
"L3MON4D3/LuaSnip", -- Snippet engine
|
||||||
|
"saadparwaiz1/cmp_luasnip", -- Bridge for snippet engine
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-k>"] = cmp.mapping.select_prev_item(), -- Previous item
|
||||||
|
["<C-j>"] = cmp.mapping.select_next_item(), -- Next item
|
||||||
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(), -- Trigger completion
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Confirm selection
|
||||||
|
}),
|
||||||
|
-- The sources for completion
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "path" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
11
nvim/lua/sam/plugins/colorscheme.lua
Normal file
11
nvim/lua/sam/plugins/colorscheme.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/colorscheme.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000, -- Make sure to load this before all the other start plugins
|
||||||
|
config = function()
|
||||||
|
-- load the colorscheme here
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
||||||
|
end,
|
||||||
|
}
|
||||||
6
nvim/lua/sam/plugins/comment.lua
Normal file
6
nvim/lua/sam/plugins/comment.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
config = function()
|
||||||
|
require("Comment").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
20
nvim/lua/sam/plugins/dap.lua
Normal file
20
nvim/lua/sam/plugins/dap.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
dependencies = {
|
||||||
|
-- Installs the beautiful UI for DAP
|
||||||
|
"rcarriga/nvim-dap-ui",
|
||||||
|
-- Required by dap-ui
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
dapui.setup()
|
||||||
|
|
||||||
|
-- Add your keymaps for debugging here
|
||||||
|
vim.keymap.set("n", "<Leader>db", dap.toggle_breakpoint, { desc = "Toggle Breakpoint" })
|
||||||
|
vim.keymap.set("n", "<Leader>dc", dap.continue, { desc = "Continue" })
|
||||||
|
vim.keymap.set("n", "<Leader>do", dap.step_over, { desc = "Step Over" })
|
||||||
|
vim.keymap.set("n", "<Leader>di", dap.step_into, { desc = "Step Into" })
|
||||||
|
vim.keymap.set("n", "<Leader>du", dapui.toggle, { desc = "Toggle DAP UI" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
14
nvim/lua/sam/plugins/filetree.lua
Normal file
14
nvim/lua/sam/plugins/filetree.lua
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/filetree.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require("nvim-tree").setup({})
|
||||||
|
|
||||||
|
-- A keymap to toggle the file tree
|
||||||
|
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", {
|
||||||
|
desc = "Toggle file explorer",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
34
nvim/lua/sam/plugins/formatter.lua
Normal file
34
nvim/lua/sam/plugins/formatter.lua
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/formatter.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require("conform").setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
-- Web
|
||||||
|
javascript = { "prettier" },
|
||||||
|
typescript = { "prettier" },
|
||||||
|
javascriptreact = { "prettier" },
|
||||||
|
typescriptreact = { "prettier" },
|
||||||
|
html = { "prettier" },
|
||||||
|
css = { "prettier" },
|
||||||
|
json = { "prettier" },
|
||||||
|
yaml = { "prettier" },
|
||||||
|
markdown = { "prettier" },
|
||||||
|
sh = { "shfmt" }, -- << ADD THIS LINE
|
||||||
|
bash = { "shfmt" }, -- << AND THIS ONE
|
||||||
|
-- PHP
|
||||||
|
php = { "pint" },
|
||||||
|
-- Python
|
||||||
|
python = { "black" },
|
||||||
|
-- Lua (for our config)
|
||||||
|
lua = { "stylua" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- A keymap to trigger formatting
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>f", function()
|
||||||
|
require("conform").format({ async = true, lsp_fallback = true })
|
||||||
|
end, { desc = "Format code" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
17
nvim/lua/sam/plugins/gitsigns.lua
Normal file
17
nvim/lua/sam/plugins/gitsigns.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/gitsigns.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = function()
|
||||||
|
require("gitsigns").setup({
|
||||||
|
-- You can configure the signs here if you want
|
||||||
|
-- signs = {
|
||||||
|
-- add = { text = '+' },
|
||||||
|
-- change = { text = '~' },
|
||||||
|
-- delete = { text = '_' },
|
||||||
|
-- topdelete = { text = '‾' },
|
||||||
|
-- changedelete = { text = '~' },
|
||||||
|
-- },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
5
nvim/lua/sam/plugins/icons.lua
Normal file
5
nvim/lua/sam/plugins/icons.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/icons.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
}
|
||||||
16
nvim/lua/sam/plugins/lint.lua
Normal file
16
nvim/lua/sam/plugins/lint.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("lint").linters_by_ft = {
|
||||||
|
-- You can add your languages here. Examples:
|
||||||
|
-- javascript = { "eslint_d" },
|
||||||
|
-- python = { "ruff" },
|
||||||
|
}
|
||||||
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
|
callback = function()
|
||||||
|
require("lint").try_lint()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
97
nvim/lua/sam/plugins/lsp.lua
Normal file
97
nvim/lua/sam/plugins/lsp.lua
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/lsp.lua (emmet-ls for HTML Tag Completion + No Warning)
|
||||||
|
|
||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
local on_attach = function(client, bufnr)
|
||||||
|
-- LSP keymaps
|
||||||
|
local nmap = function(keys, func, desc)
|
||||||
|
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = "LSP: " .. desc })
|
||||||
|
end
|
||||||
|
nmap("gD", vim.lsp.buf.declaration, "Go to Declaration")
|
||||||
|
nmap("gd", vim.lsp.buf.definition, "Go to Definition")
|
||||||
|
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||||
|
nmap("<leader>rn", vim.lsp.buf.rename, "Rename Symbol")
|
||||||
|
nmap("<leader>ca", vim.lsp.buf.code_action, "Code Action")
|
||||||
|
end
|
||||||
|
|
||||||
|
require("mason").setup()
|
||||||
|
|
||||||
|
-- ADDING THE NEW LSP SERVERS HERE (emmet_ls replaces html for better tags)
|
||||||
|
local servers = {
|
||||||
|
"intelephense", -- PHP
|
||||||
|
"pyright", -- Python
|
||||||
|
"ts_ls", -- TS/JS
|
||||||
|
"clangd", -- C++
|
||||||
|
"lua_ls", -- Lua
|
||||||
|
"emmet_ls", -- HTML/CSS (for tag completion/snippets)
|
||||||
|
"jsonls", -- JSON
|
||||||
|
"yamlls", -- YAML
|
||||||
|
"marksman", -- Markdown
|
||||||
|
"bashls",
|
||||||
|
}
|
||||||
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
|
mason_lspconfig.setup({
|
||||||
|
ensure_installed = servers,
|
||||||
|
handlers = {
|
||||||
|
-- Global handler using new vim.lsp.config API (no global lspconfig require)
|
||||||
|
function(server_name)
|
||||||
|
vim.lsp.config(server_name, {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
root_dir = function(fname)
|
||||||
|
if type(fname) ~= "string" then
|
||||||
|
return vim.fn.getcwd()
|
||||||
|
end
|
||||||
|
local util = require("lspconfig.util")
|
||||||
|
return util.root_pattern(".git", "composer.json", "package.json")(fname)
|
||||||
|
or util.path.dirname(fname)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- emmet-ls Specific Setup (for HTML/CSS tag completion + snippets)
|
||||||
|
vim.lsp.config("emmet_ls", {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = vim.tbl_deep_extend("force", capabilities, {
|
||||||
|
textDocument = {
|
||||||
|
completion = {
|
||||||
|
completionItem = {
|
||||||
|
snippetSupport = true, -- Enables <div> → <div></div> + Emmet expansions
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
filetypes = { "html", "css", "javascriptreact", "typescriptreact" }, -- Broad for web files
|
||||||
|
root_dir = function(fname)
|
||||||
|
if type(fname) ~= "string" then
|
||||||
|
return vim.fn.getcwd()
|
||||||
|
end
|
||||||
|
local util = require("lspconfig.util")
|
||||||
|
return util.root_pattern(".git", "package.json")(fname)
|
||||||
|
or util.path.dirname(fname)
|
||||||
|
end,
|
||||||
|
init_options = {
|
||||||
|
html = {
|
||||||
|
options = {
|
||||||
|
["bem.enabled"] = true, -- Optional: BEM naming support
|
||||||
|
},
|
||||||
|
completions = true,
|
||||||
|
format = true,
|
||||||
|
extractColors = true,
|
||||||
|
includeLanguages = {
|
||||||
|
javascript = "javascriptreact",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
9
nvim/lua/sam/plugins/lualine.lua
Normal file
9
nvim/lua/sam/plugins/lualine.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/lualine.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require("lualine").setup({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
75
nvim/lua/sam/plugins/markdown.lua
Normal file
75
nvim/lua/sam/plugins/markdown.lua
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
return {
|
||||||
|
-- Enhanced Markdown editing (only for .md)
|
||||||
|
{
|
||||||
|
"godlygeek/tabular",
|
||||||
|
ft = "markdown",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"plasticboy/vim-markdown",
|
||||||
|
ft = "markdown",
|
||||||
|
dependencies = { "godlygeek/tabular" },
|
||||||
|
config = function()
|
||||||
|
-- Core settings
|
||||||
|
vim.g.vim_markdown_folding_disabled = 0
|
||||||
|
vim.g.vim_markdown_conceal = 1
|
||||||
|
vim.g.vim_markdown_toc_autofit = 1
|
||||||
|
vim.g.vim_markdown_strikethrough = 1
|
||||||
|
|
||||||
|
-- Prose-friendly wrapping + Pandoc exports (MD only)
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "markdown",
|
||||||
|
callback = function()
|
||||||
|
-- Wrapping
|
||||||
|
vim.opt_local.wrap = true
|
||||||
|
vim.opt_local.linebreak = true
|
||||||
|
vim.opt_local.list = false
|
||||||
|
|
||||||
|
-- HTML preview/export
|
||||||
|
vim.keymap.set("n", "<leader>mh", function()
|
||||||
|
local input = vim.fn.expand("%")
|
||||||
|
local output = "/tmp/" .. vim.fn.fnamemodify(input, ":t:r") .. ".html"
|
||||||
|
vim.fn.system("pandoc " .. vim.fn.shellescape(input) .. " -o " .. vim.fn.shellescape(output) .. " --standalone --self-contained")
|
||||||
|
vim.fn.system("open " .. vim.fn.shellescape(output))
|
||||||
|
end, { desc = "Markdown to HTML Preview", buffer = true })
|
||||||
|
|
||||||
|
-- PDF export
|
||||||
|
vim.keymap.set("n", "<leader>mp", function()
|
||||||
|
local input = vim.fn.expand("%")
|
||||||
|
local output = vim.fn.fnamemodify(input, ":r") .. ".pdf"
|
||||||
|
vim.fn.system("pandoc " .. vim.fn.shellescape(input) .. " -o " .. vim.fn.shellescape(output) .. " --pdf-engine=pdflatex")
|
||||||
|
end, { desc = "Markdown to PDF", buffer = true })
|
||||||
|
|
||||||
|
-- TOC preview
|
||||||
|
vim.keymap.set("n", "<leader>mt", ":!pandoc % --toc -o /tmp/toc.html && open /tmp/toc.html<CR>", { desc = "Generate TOC Preview", buffer = true })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Live browser preview (MD + HTML)
|
||||||
|
{
|
||||||
|
"brianhuster/live-preview.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
|
ft = { "markdown", "html" }, -- Load for both
|
||||||
|
lazy = false,
|
||||||
|
opts = {
|
||||||
|
usage_title = "Usage: <leader>lp to start preview",
|
||||||
|
picker_title = "Select file to preview",
|
||||||
|
templates = { -- Basic MD render (for .md); HTML serves raw
|
||||||
|
md = {
|
||||||
|
command = "pandoc % -o /tmp/preview.html --standalone --self-contained", -- Use Pandoc for MD
|
||||||
|
extension = "html"
|
||||||
|
},
|
||||||
|
html = {
|
||||||
|
command = "echo 'Serving raw HTML'", -- No-op; serves file directly
|
||||||
|
extension = "html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
debounce = 300, -- Refresh delay post-save
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>lp", "<cmd>LivePreview start<cr>", desc = "Start Live Preview", ft = { "markdown", "html" } },
|
||||||
|
{ "<leader>ls", "<cmd>LivePreview stop<cr>", desc = "Stop Live Preview", ft = { "markdown", "html" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
17
nvim/lua/sam/plugins/mason-tools.lua
Normal file
17
nvim/lua/sam/plugins/mason-tools.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/mason-tools.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
-- Formatters
|
||||||
|
"html-ls",
|
||||||
|
"prettier", -- For web files
|
||||||
|
"pint", -- For PHP/Laravel
|
||||||
|
"black", -- For Python
|
||||||
|
"shfmt",
|
||||||
|
-- Linters (optional but recommended)
|
||||||
|
"eslint_d", -- For JS/TS
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
3
nvim/lua/sam/plugins/telescope-addons.lua
Normal file
3
nvim/lua/sam/plugins/telescope-addons.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"andrewberty/telescope-themes",
|
||||||
|
}
|
||||||
16
nvim/lua/sam/plugins/telescope.lua
Normal file
16
nvim/lua/sam/plugins/telescope.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
-- This section is unchanged
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
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 load the new extension
|
||||||
|
require("telescope").load_extension("themes")
|
||||||
|
|
||||||
|
-- ADD THIS LINE to create the new keymap
|
||||||
|
vim.keymap.set("n", "<leader>th", "<cmd>Telescope themes<cr>", { desc = "Switch Theme" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
8
nvim/lua/sam/plugins/theme-catppuccin.lua
Normal file
8
nvim/lua/sam/plugins/theme-catppuccin.lua
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000, -- Make sure this theme is loaded first
|
||||||
|
config = function()
|
||||||
|
-- You can add custom settings here if you like
|
||||||
|
end,
|
||||||
|
}
|
||||||
1
nvim/lua/sam/plugins/theme-dracula.lua
Normal file
1
nvim/lua/sam/plugins/theme-dracula.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
return { "Mofiqul/dracula.nvim" }
|
||||||
1
nvim/lua/sam/plugins/theme-everforest.lua
Normal file
1
nvim/lua/sam/plugins/theme-everforest.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
return { "neanias/everforest-nvim" }
|
||||||
1
nvim/lua/sam/plugins/theme-gruvbox.lua
Normal file
1
nvim/lua/sam/plugins/theme-gruvbox.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
return { "ellisonleao/gruvbox.nvim" }
|
||||||
1
nvim/lua/sam/plugins/theme-kanagawa.lua
Normal file
1
nvim/lua/sam/plugins/theme-kanagawa.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
return { "rebelot/kanagawa.nvim" }
|
||||||
1
nvim/lua/sam/plugins/theme-onedark.lua
Normal file
1
nvim/lua/sam/plugins/theme-onedark.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
return { "navarasu/onedark.nvim" }
|
||||||
1
nvim/lua/sam/plugins/theme-tokyonight.lua
Normal file
1
nvim/lua/sam/plugins/theme-tokyonight.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
return { "folke/tokyonight.nvim" }
|
||||||
36
nvim/lua/sam/plugins/treesitter.lua
Normal file
36
nvim/lua/sam/plugins/treesitter.lua
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-- ~/.config/nvim/lua/sam/plugins/treesitter.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate", -- Installs and updates parsers
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
-- A list of parser names, or "all"
|
||||||
|
ensure_installed = {
|
||||||
|
"c",
|
||||||
|
"cpp",
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"python",
|
||||||
|
"javascript",
|
||||||
|
"typescript",
|
||||||
|
"tsx",
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"json",
|
||||||
|
"php",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Install parsers synchronously (only applied on startup)
|
||||||
|
sync_install = false,
|
||||||
|
|
||||||
|
-- Automatically install missing parsers when entering buffer
|
||||||
|
auto_install = true,
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
9
nvim/lua/sam/plugins/which-key.lua
Normal file
9
nvim/lua/sam/plugins/which-key.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
require("which-key").setup({
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user