Compare commits

...

14 Commits

Author SHA1 Message Date
jay cf6693c37d remove docker lima alias 2023-01-21 00:01:14 +08:00
root 39e1ec1c7f Merge branch 'master' of ssh://git.trj.tw:10022/jay/dotter 2023-01-19 00:04:42 +08:00
root 3d8c430dc7 update 2023-01-19 00:03:59 +08:00
jay c15cefb010 update 2023-01-11 22:22:13 +08:00
jay ea08fa93da update 2023-01-11 22:21:43 +08:00
jay 0b7fd8dd8b fix script 2022-11-03 16:35:38 +08:00
jay 86c1ca2c9f modify gitconfig 2022-10-27 12:17:48 +08:00
jay f5001b452c update 2022-10-23 23:54:49 +08:00
jay 953c01349b update 2022-10-23 21:33:57 +08:00
jay 44ee4cca95 update 2022-10-23 21:32:02 +08:00
root 99172a5da5 modify gitconfig 2022-10-23 16:46:56 +08:00
root b7b186fd12 update 2022-10-23 16:45:42 +08:00
jay 32d44330ef Merge branch 'master' of ssh://git.trj.tw:10022/jay/dotter 2022-09-03 16:15:46 +08:00
jay bda827eb44 [feat] update nvim 2022-09-03 16:15:14 +08:00
11 changed files with 91 additions and 22 deletions
+2
View File
@@ -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"
+3 -1
View File
@@ -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
+3 -3
View File
@@ -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)
#
+5 -1
View File
@@ -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
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
+15 -4
View File
@@ -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 = {
@@ -421,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
View File
@@ -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
+2 -1
View File
@@ -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
View File
@@ -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
+45 -2
View File
@@ -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"
@@ -53,5 +72,29 @@ 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
}
+6 -2
View File
@@ -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"