add dotfiles
This commit is contained in:
commit
3aa0be1015
16
.bashrc
Normal file
16
.bashrc
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
PS1='[\u@\h \W]\$ '
|
||||
|
||||
# bun
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
export PATH=$BUN_INSTALL/bin:$PATH
|
||||
|
||||
|
185
.config/fish/completions/bun.fish
Normal file
185
.config/fish/completions/bun.fish
Normal file
@ -0,0 +1,185 @@
|
||||
# This is terribly complicated
|
||||
# It's because:
|
||||
# 1. bun run has to have dynamic completions
|
||||
# 2. there are global options
|
||||
# 3. bun {install add remove} gets special options
|
||||
# 4. I don't know how to write fish completions well
|
||||
# Contributions very welcome!!
|
||||
|
||||
function __fish__get_bun_bins
|
||||
string split ' ' (bun getcompletes b)
|
||||
end
|
||||
|
||||
function __fish__get_bun_scripts
|
||||
set -lx SHELL bash
|
||||
set -lx MAX_DESCRIPTION_LEN 40
|
||||
string trim (string split '\n' (string split '\t' (bun getcompletes z)))
|
||||
end
|
||||
|
||||
function __fish__get_bun_packages
|
||||
if test (commandline -ct) != ""
|
||||
set -lx SHELL fish
|
||||
string split ' ' (bun getcompletes a (commandline -ct))
|
||||
end
|
||||
end
|
||||
|
||||
function __history_completions
|
||||
set -l tokens (commandline --current-process --tokenize)
|
||||
history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | string replace -r \^$tokens[2]\\s\* "" | string split ' '
|
||||
end
|
||||
|
||||
function __fish__get_bun_bun_js_files
|
||||
string split ' ' (bun getcompletes j)
|
||||
end
|
||||
|
||||
set -l bun_install_boolean_flags yarn production optional development no-save dry-run force no-cache silent verbose global
|
||||
set -l bun_install_boolean_flags_descriptions "Write a yarn.lock file (yarn v1)" "Don't install devDependencies" "Add dependency to optionalDependencies" "Add dependency to devDependencies" "Don't install devDependencies" "Don't install anything" "Always request the latest versions from the registry & reinstall all dependencies" "Ignore manifest cache entirely" "Don't output anything" "Excessively verbose logging" "Use global folder"
|
||||
|
||||
set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add init pm x
|
||||
set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x
|
||||
|
||||
function __bun_complete_bins_scripts --inherit-variable bun_builtin_cmds_without_run -d "Emit bun completions for bins and scripts"
|
||||
# Do nothing if we already have a builtin subcommand,
|
||||
# or any subcommand other than "run".
|
||||
if __fish_seen_subcommand_from $bun_builtin_cmds_without_run
|
||||
or not __fish_use_subcommand && not __fish_seen_subcommand_from run
|
||||
return
|
||||
end
|
||||
# Do we already have a bin or script subcommand?
|
||||
set -l bins (__fish__get_bun_bins)
|
||||
if __fish_seen_subcommand_from $bins
|
||||
return
|
||||
end
|
||||
# Scripts have descriptions appended with a tab separator.
|
||||
# Strip off descriptions for the purposes of subcommand testing.
|
||||
set -l scripts (__fish__get_bun_scripts)
|
||||
if __fish_seen_subcommand_from (string split \t -f 1 -- $scripts)
|
||||
return
|
||||
end
|
||||
# Emit scripts.
|
||||
for script in $scripts
|
||||
echo $script
|
||||
end
|
||||
# Emit binaries and JS files (but only if we're doing `bun run`).
|
||||
if __fish_seen_subcommand_from run
|
||||
for bin in $bins
|
||||
echo "$bin"\t"package bin"
|
||||
end
|
||||
for file in (__fish__get_bun_bun_js_files)
|
||||
echo "$file"\t"Bun.js"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Clear existing completions
|
||||
complete -e -c bun
|
||||
|
||||
# Dynamically emit scripts and binaries
|
||||
complete -c bun -f -a "(__bun_complete_bins_scripts)"
|
||||
|
||||
# Complete flags if we have no subcommand or a flag-friendly one.
|
||||
set -l flag_applies "__fish_use_subcommand; or __fish_seen_subcommand_from $bun_builtin_cmds_accepting_flags"
|
||||
complete -c bun \
|
||||
-n $flag_applies --no-files -s 'u' -l 'origin' -r -d 'Server URL. Rewrites import paths'
|
||||
complete -c bun \
|
||||
-n $flag_applies --no-files -s 'p' -l 'port' -r -d 'Port number to start server from'
|
||||
complete -c bun \
|
||||
-n $flag_applies --no-files -s 'd' -l 'define' -r -d 'Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\"'
|
||||
complete -c bun \
|
||||
-n $flag_applies --no-files -s 'e' -l 'external' -r -d 'Exclude module from transpilation (can use * wildcards). ex: -e react'
|
||||
complete -c bun \
|
||||
-n $flag_applies --no-files -l 'use' -r -d 'Use a framework (ex: next)'
|
||||
complete -c bun \
|
||||
-n $flag_applies --no-files -l 'hot' -r -d 'Enable hot reloading in Bun\'s JavaScript runtime'
|
||||
|
||||
# Complete dev and create as first subcommand.
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'dev' -d 'Start dev server'
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'create' -f -d 'Create a new project from a template'
|
||||
|
||||
# Complete "next" and "react" if we've seen "create".
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from create" -a 'next' -d 'new Next.js project'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from create" -a 'react' -d 'new React project'
|
||||
|
||||
# Complete "upgrade" as first subcommand.
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'upgrade' -d 'Upgrade bun to the latest version' -x
|
||||
# Complete "-h/--help" unconditionally.
|
||||
complete -c bun \
|
||||
-s "h" -l "help" -d 'See all commands and flags' -x
|
||||
|
||||
# Complete "-v/--version" if we have no subcommand.
|
||||
complete -c bun \
|
||||
-n "not __fish_use_subcommand" -l "version" -s "v" -d 'Bun\'s version' -x
|
||||
|
||||
# Complete additional subcommands.
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'discord' -d 'Open bun\'s Discord server' -x
|
||||
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'bun' -d 'Generate a new bundle'
|
||||
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from bun" -F -d 'Bundle this'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from create; and __fish_seen_subcommand_from react next" -F -d "Create in directory"
|
||||
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'init' -F -d 'Start an empty Bun project'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'install' -f -d 'Install packages from package.json'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'add' -F -d 'Add a package to package.json'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_use_subcommand" -a 'remove' -F -d 'Remove a package from package.json'
|
||||
|
||||
|
||||
for i in (seq (count $bun_install_boolean_flags))
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from install add remove" -l "$bun_install_boolean_flags[$i]" -d "$bun_install_boolean_flags_descriptions[$i]"
|
||||
end
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from install add remove" -l 'cwd' -d 'Change working directory'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from install add remove" -l 'cache-dir' -d 'Choose a cache directory (default: $HOME/.bun/install/cache)'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from add" -d 'Popular' -a '(__fish__get_bun_packages)'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from add" -d 'History' -a '(__history_completions)'
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from pm; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts) cache;" -a 'bin ls cache hash hash-print hash-string' -f
|
||||
|
||||
complete -c bun \
|
||||
-n "__fish_seen_subcommand_from pm; and __fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts);" -a 'rm' -f
|
||||
|
||||
# Add built-in subcommands with descriptions.
|
||||
complete -c bun -n "__fish_use_subcommand" -a "create" -f -d "Create a new project from a template"
|
||||
complete -c bun -n "__fish_use_subcommand" -a "build bun" --require-parameter -F -d "Transpile and bundle one or more files"
|
||||
complete -c bun -n "__fish_use_subcommand" -a "upgrade" -d "Upgrade Bun"
|
||||
complete -c bun -n "__fish_use_subcommand" -a "run" -d "Run a script or package binary"
|
||||
complete -c bun -n "__fish_use_subcommand" -a "install" -d "Install dependencies from package.json" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "remove" -d "Remove a dependency from package.json" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "add" -d "Add a dependency to package.json" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "init" -d "Initialize a Bun project in this directory" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "link" -d "Register or link a local npm package" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "unlink" -d "Unregister a local npm package" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "pm" -d "Additional package management utilities" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "x" -d "Execute a package binary, installing if needed" -f
|
||||
complete -c bun -n "__fish_use_subcommand" -a "outdated" -d "Display the latest versions of outdated dependencies" -f
|
11
.config/fish/config.fish
Normal file
11
.config/fish/config.fish
Normal file
@ -0,0 +1,11 @@
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
||||
# bun
|
||||
set --export BUN_INSTALL "$HOME/.bun"
|
||||
set --export PATH $BUN_INSTALL/bin $PATH
|
||||
set --export EDITOR /bin/helix
|
||||
alias vi helix
|
||||
alias vim helix
|
||||
alias hx helix
|
31
.config/fish/fish_variables
Normal file
31
.config/fish/fish_variables
Normal file
@ -0,0 +1,31 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:3400
|
||||
SETUVAR fish_color_autosuggestion:brblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:blue
|
||||
SETUVAR fish_color_comment:red
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:green
|
||||
SETUVAR fish_color_error:brred
|
||||
SETUVAR fish_color_escape:brcyan
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:brcyan
|
||||
SETUVAR fish_color_param:cyan
|
||||
SETUVAR fish_color_quote:yellow
|
||||
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:yellow\x1e\x2di
|
||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
42
.config/helix/config.toml
Normal file
42
.config/helix/config.toml
Normal file
@ -0,0 +1,42 @@
|
||||
theme = "triston"
|
||||
|
||||
[editor]
|
||||
true-color = true
|
||||
mouse = false
|
||||
gutters = ["diagnostics", "spacer", "diff"]
|
||||
shell = ['fish', '-c']
|
||||
bufferline = "always"
|
||||
auto-format = true
|
||||
|
||||
[editor.statusline]
|
||||
left=["mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]
|
||||
center=[]
|
||||
right=["diagnostics", "selections", "register", "position", "file-encoding"]
|
||||
separator="|"
|
||||
|
||||
[keys.normal]
|
||||
tab = [":buffer-next"]
|
||||
S-tab = [":buffer-previous"]
|
||||
"{" = ["goto_prev_paragraph", "collapse_selection"]
|
||||
"}" = ["goto_next_paragraph", "collapse_selection"]
|
||||
G = "goto_file_end"
|
||||
esc = ["collapse_selection", "keep_primary_selection"]
|
||||
|
||||
[keys.insert]
|
||||
esc = ["collapse_selection", "normal_mode"]
|
||||
|
||||
[keys.select]
|
||||
"{" = ["extend_to_line_bounds", "goto_prev_paragraph"]
|
||||
"}" = ["extend_to_line_bounds", "goto_next_paragraph"]
|
||||
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
|
||||
|
||||
[keys.normal.space]
|
||||
x = [":buffer-close"]
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[editor.file-picker]
|
||||
hidden = false
|
7
.config/helix/languages.toml
Normal file
7
.config/helix/languages.toml
Normal file
@ -0,0 +1,7 @@
|
||||
[[language]]
|
||||
name = "typescript"
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "tsx"
|
||||
auto-format = true
|
2
.config/helix/themes/triston.toml
Normal file
2
.config/helix/themes/triston.toml
Normal file
@ -0,0 +1,2 @@
|
||||
inherits = "tokyonight"
|
||||
|
0
.config/lazygit/config.yml
Normal file
0
.config/lazygit/config.yml
Normal file
2
.config/yazi/theme.toml
Normal file
2
.config/yazi/theme.toml
Normal file
@ -0,0 +1,2 @@
|
||||
[flavor]
|
||||
use = "tokyo-night"
|
1
.config/yazi/yazi.toml
Normal file
1
.config/yazi/yazi.toml
Normal file
@ -0,0 +1 @@
|
||||
|
30
.tmux.conf
Normal file
30
.tmux.conf
Normal file
@ -0,0 +1,30 @@
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
bind-key h select-pane -L
|
||||
bind-key j select-pane -D
|
||||
bind-key k select-pane -U
|
||||
bind-key l select-pane -R
|
||||
|
||||
set -g @tokyo-night-tmux_window_id_style digital
|
||||
set -g @tokyo-night-tmux_pane_id_style hsquare
|
||||
set -g @tokyo-night-tmux_zoom_id_style dsquare
|
||||
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins/'
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/sensible'
|
||||
set -g @plugin "janoamaral/tokyo-night-tmux"
|
||||
set -g @tokyo-night-tmux_show_datetime 0
|
||||
set -g @tokyo-night-tmux_date_format MYD
|
||||
set -g @tokyo-night-tmux_time_format 12H
|
||||
|
||||
# Other examples:
|
||||
# set -g @plugin 'github_username/plugin_name'
|
||||
# set -g @plugin 'github_username/plugin_name#branch'
|
||||
# set -g @plugin 'git@github.com:user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com:user/plugin'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
71
.vimrc
Normal file
71
.vimrc
Normal file
@ -0,0 +1,71 @@
|
||||
" vimrc
|
||||
"
|
||||
" Map leader key to space key
|
||||
let mapleader = " "
|
||||
|
||||
|
||||
" Enable syntax highlighting
|
||||
syntax on
|
||||
|
||||
|
||||
" Set color scheme
|
||||
colorscheme slate
|
||||
|
||||
" Set font
|
||||
set guifont=Monaco\ 12
|
||||
|
||||
" Set tab settings
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" Enable cursor line
|
||||
set cursorline
|
||||
|
||||
" Enable auto-indentation
|
||||
set autoindent
|
||||
|
||||
" Enable auto-completion
|
||||
set completeopt=menu,menuone,noselect
|
||||
|
||||
" Map NERDTree to leader key + n
|
||||
nnoremap <leader>e :NERDTreeFocus<CR>
|
||||
nnoremap <C-n> :NERDTree<CR>
|
||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||
nnoremap <C-f> :NERDTreeFind<CR>
|
||||
|
||||
|
||||
" LSP settings
|
||||
let g:lsp_server_commands = ['clangd']
|
||||
let g:lsp_auto_enable = 1
|
||||
|
||||
" Enable true color support
|
||||
set termguicolors
|
||||
set laststatus=2
|
||||
set noshowmode
|
||||
if !has('gui_running')
|
||||
set t_Co=256
|
||||
endif
|
||||
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
|
||||
" AUTO INSTALL OF PLUG DEP =============================
|
||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
" PLUGINS =============================
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
Plug 'scrooloose/nerdtree' " file tree
|
||||
Plug 'tpope/vim-fugitive' " Fugitive Vim Github Wrapper
|
||||
Plug 'vim-airline/vim-airline' " status line
|
||||
Plug 'jiangmiao/auto-pairs' " Auto-complete pairs
|
||||
Plug 'alvan/vim-closetag' " Auto-close HTML tags
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
call plug#end()
|
||||
|
24
.wezterm.lua
Normal file
24
.wezterm.lua
Normal file
@ -0,0 +1,24 @@
|
||||
-- Pull in the wezterm API
|
||||
local wezterm = require 'wezterm'
|
||||
|
||||
-- This will hold the configuration.
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
-- This is where you actually apply your config choices
|
||||
|
||||
-- For example, changing the color scheme:
|
||||
config.font = wezterm.font("JetBrainsMono Nerd Font", {weight="Regular", stretch="Normal", style="Normal"})
|
||||
config.color_scheme = 'tokyonight'
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.window_background_opacity = .9
|
||||
config.use_fancy_tab_bar = false
|
||||
config.tab_bar_at_bottom = true
|
||||
config.window_padding = {
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
}
|
||||
|
||||
-- and finally, return the configuration to wezterm
|
||||
return config
|
Loading…
Reference in New Issue
Block a user