Compare commits
17 Commits
a0d0f7b1a2
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cf6693c37d | |||
| 39e1ec1c7f | |||
| 3d8c430dc7 | |||
| c15cefb010 | |||
| ea08fa93da | |||
| 0b7fd8dd8b | |||
| 86c1ca2c9f | |||
| f5001b452c | |||
| 953c01349b | |||
| 44ee4cca95 | |||
| 99172a5da5 | |||
| b7b186fd12 | |||
| 32d44330ef | |||
| bda827eb44 | |||
| cd77541819 | |||
| d479e2d615 | |||
| d43ba62d23 |
@@ -10,6 +10,8 @@ depends = []
|
||||
js_linter = "\"standard\""
|
||||
# fixer can be "standard" or "prettier"
|
||||
js_fixer = "\"standard\""
|
||||
enableTmux = false
|
||||
sshAgent = false
|
||||
|
||||
[zsh.files]
|
||||
zprofile = "~/.zprofile"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
includes = []
|
||||
|
||||
packages = ["shell", "zsh", "vim", "nvim", "zsh_zinit"]
|
||||
packages = ["shell", "zsh", "nvim", "zsh_zinit"]
|
||||
|
||||
[variables]
|
||||
js_linter = "\"eslint\""
|
||||
js_fixer = "\"prettier\""
|
||||
email = "jay@lawsnote.com"
|
||||
git_username = "jay"
|
||||
enableTmux = false
|
||||
sshAgent = false
|
||||
|
||||
@@ -29,9 +29,9 @@ window:
|
||||
# Number of lines/columns (not pixels) in the terminal. The number of columns
|
||||
# must be at least `2`, while using a value of `0` for columns and lines will
|
||||
# fall back to the window manager's recommended size.
|
||||
#dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
dimensions:
|
||||
columns: 210
|
||||
lines: 65
|
||||
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
@@ -46,8 +46,8 @@ window:
|
||||
# Blank space added around the window in pixels. This padding is scaled
|
||||
# by DPI and the specified value is always added at both opposing sides.
|
||||
padding:
|
||||
x: 2
|
||||
y: 2
|
||||
x: 1
|
||||
y: 1
|
||||
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
#dynamic_padding: false
|
||||
@@ -113,7 +113,7 @@ font:
|
||||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
family: UbuntuMono Nerd Font Mono
|
||||
family: JetBrainsMono Nerd Font
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
@@ -152,7 +152,7 @@ font:
|
||||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 12.0
|
||||
size: 8.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought
|
||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
ls = log --graph --pretty=format:\"%h <%an> %ar %s\" --all
|
||||
st = status
|
||||
br = branch
|
||||
wt = worktree
|
||||
wta = worktree add
|
||||
wtr = worktree remove
|
||||
wtl = worktree list
|
||||
[mergetool]
|
||||
keepBackup = false
|
||||
[mergetool "vimdiff"]
|
||||
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
|
||||
[core]
|
||||
editor = vim
|
||||
editor = nvim
|
||||
|
||||
# vim: ft=gitconfig
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
|
||||
+15
-5
@@ -73,6 +73,9 @@ Plug 'inkarkat/vim-mark'
|
||||
Plug 'rking/ag.vim'
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
|
||||
Plug 'lukas-reineke/indent-blankline.nvim'
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
" temp plugin
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'buoto/gotests-vim'
|
||||
@@ -83,7 +86,6 @@ Plug 'rust-lang/rust.vim'
|
||||
Plug 'danilo-augusto/vim-afterglow'
|
||||
Plug 'vim-scripts/TaskList.vim'
|
||||
Plug 'google/vim-jsonnet'
|
||||
Plug 'github/copilot.vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
@@ -108,6 +110,7 @@ set backspace=indent,eol,start
|
||||
set encoding=utf-8
|
||||
set completeopt=menu,menuone,noselect
|
||||
set noswapfile
|
||||
set mouse=
|
||||
|
||||
" set guifont=Hack\ Nerd\ Font:h11
|
||||
|
||||
@@ -320,6 +323,15 @@ let g:fzf_history_dir = '~/.local/share/fzf-history'
|
||||
|
||||
lua << EOF
|
||||
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars:append "eol:↴"
|
||||
|
||||
require("indent_blankline").setup {
|
||||
show_end_of_line = true,
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
|
||||
local nvlsp = require'lspconfig'
|
||||
|
||||
local lspSig = require'lsp_signature'
|
||||
@@ -329,8 +341,7 @@ lspSig.setup{
|
||||
}
|
||||
|
||||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
@@ -389,6 +400,7 @@ cmp.setup {
|
||||
-- behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
}),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
-- ['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }),
|
||||
}),
|
||||
snippet = {
|
||||
@@ -410,7 +422,6 @@ cmp.setup {
|
||||
require'nvim-tree'.setup {
|
||||
auto_reload_on_write = true,
|
||||
disable_netrw = false,
|
||||
hide_root_folder = false,
|
||||
hijack_cursor = false,
|
||||
hijack_netrw = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
@@ -422,7 +433,6 @@ require'nvim-tree'.setup {
|
||||
update_cwd = false,
|
||||
view = {
|
||||
width = 40,
|
||||
height = 40,
|
||||
side = "left",
|
||||
preserve_window_proportions = false,
|
||||
number = false,
|
||||
|
||||
+6
-2
@@ -9,9 +9,13 @@ Host git.lawsnote.com
|
||||
HostName git.lawsnote.com
|
||||
|
||||
Host dev
|
||||
User mtfos
|
||||
HostName 192.168.200.14
|
||||
User jay
|
||||
HostName 192.168.200.15
|
||||
|
||||
Host vpn
|
||||
User root
|
||||
HostName 192.168.201.254
|
||||
|
||||
Host lndev
|
||||
User jay
|
||||
HostName 192.168.88.12
|
||||
|
||||
@@ -6,7 +6,8 @@ run-shell "tmux setenv -g TMUX_VERSION_29 $(awk 'BEGIN {print (\"'$(tmux -V | se
|
||||
# -----------------------------
|
||||
# Global settings
|
||||
# -----------------------------
|
||||
set -g default-terminal xterm-256color
|
||||
# set -g default-terminal xterm-256color
|
||||
set -g default-terminal screen-256color
|
||||
set-option -ga terminal-overrides ",*256col*:Tc"
|
||||
|
||||
# scrollback buffer n lines
|
||||
|
||||
+1
-6
@@ -7,10 +7,5 @@ fi
|
||||
if type go > /dev/null; then
|
||||
go install github.com/sourcegraph/go-langserver@latest
|
||||
go install github.com/jstemmer/gotags@latest
|
||||
go get -u github.com/cweill/gotests/...
|
||||
fi
|
||||
|
||||
if type rustup > /dev/null; then
|
||||
rustup update
|
||||
rustup component add rls rust-analysis rust-src
|
||||
go install github.com/cweill/gotests/gotests@latest
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{#if sshAgent}}
|
||||
# `$HOME/bin/start-agent`
|
||||
SSH_ENV="$HOME/.ssh/agent-environment"
|
||||
|
||||
@@ -21,6 +22,7 @@ if [ -f "${SSH_ENV}" ]; then
|
||||
else
|
||||
start_agent;
|
||||
fi
|
||||
{{/if}}
|
||||
|
||||
function envf {
|
||||
if [ ! -f "$1" ]; then
|
||||
@@ -31,6 +33,23 @@ function envf {
|
||||
export $(cat $1 | grep -v '^#' | xargs)
|
||||
}
|
||||
|
||||
function save-image {
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: save-image <image-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
imageName=$(echo ${1##*/} | sed 's/:/_/' | xargs -I {} echo "{}.tar")
|
||||
|
||||
lima nerdctl pull $1
|
||||
lima nerdctl image save -o $imageName $1
|
||||
lima nerdctl image rm $1
|
||||
}
|
||||
|
||||
function ttySize {
|
||||
echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)"
|
||||
}
|
||||
|
||||
export HISTORY_SUBSTRING_SEARCH_PREFIXED=1
|
||||
export GOPATH="$HOME/go"
|
||||
export GOROOT="$HOME/apps/go"
|
||||
@@ -46,8 +65,36 @@ if [ -d "$HOME/bin" ]; then
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
fi
|
||||
|
||||
# The next line updates PATH for the Google Cloud SDK.
|
||||
if [ -f '/Users/jay/apps/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/path.zsh.inc'; fi
|
||||
|
||||
# The next line enables shell command completion for gcloud.
|
||||
# if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi
|
||||
function ln-image-tags {
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: ln-image-tags <image-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curlie -L https://registry.lawsnote.com/v2/$1/tags/list
|
||||
}
|
||||
|
||||
function ln-save-image {
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: ln-save-image <image-name:tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker-save --rm -p -o . -i registry.lawsnote.com/$1
|
||||
}
|
||||
|
||||
function minio-size {
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: minio-size <alias or alias/bucket-path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mc ls -r --json $1 | jq -s 'map(.size) | add' | numfmt --to=iec-i --suffix=B --padding=7
|
||||
}
|
||||
|
||||
@@ -7,3 +7,5 @@ alias ls="ls --color=auto"
|
||||
|
||||
alias wgup="sudo wg-quick up"
|
||||
alias wgdown="sudo wg-quick down"
|
||||
|
||||
alias lg="lazygit"
|
||||
|
||||
+6
-2
@@ -1,7 +1,8 @@
|
||||
{{#if enableTmux}}
|
||||
export ZSH_TMUX_AUTOSTART=true
|
||||
export ZSH_TMUX_AUTOSTART_ONCE=true
|
||||
export ZSH_TMUX_AUTOCONNECT=true
|
||||
|
||||
{{/if}}
|
||||
# install zinit
|
||||
# git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
|
||||
source ~/.zinit/bin/zinit.zsh
|
||||
@@ -30,11 +31,13 @@ zinit snippet OMZ::plugins/git/git.plugin.zsh
|
||||
# Load OMZ extract folder
|
||||
zinit ice svn
|
||||
zinit snippet OMZ::plugins/extract
|
||||
{{#if enableTmux}}
|
||||
zinit ice svn
|
||||
zinit snippet OMZ::plugins/tmux
|
||||
{{/if}}
|
||||
|
||||
# theme
|
||||
zinit light "tinyRatP/ys"
|
||||
zinit light "otakukaze/zsh-ys-theme"
|
||||
|
||||
# auto load other zshfiles
|
||||
[ -f "$HOME/.zsh/zsh.sh" ] && source "$HOME/.zsh/zsh.sh"
|
||||
@@ -45,3 +48,4 @@ zinit light "tinyRatP/ys"
|
||||
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
export PATH="/usr/local/opt/openjdk/bin:$PATH"
|
||||
|
||||
Reference in New Issue
Block a user