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\"" js_linter = "\"standard\""
# fixer can be "standard" or "prettier" # fixer can be "standard" or "prettier"
js_fixer = "\"standard\"" js_fixer = "\"standard\""
enableTmux = false
sshAgent = false
[zsh.files] [zsh.files]
zprofile = "~/.zprofile" zprofile = "~/.zprofile"
+3 -1
View File
@@ -1,9 +1,11 @@
includes = [] includes = []
packages = ["shell", "zsh", "vim", "nvim", "zsh_zinit"] packages = ["shell", "zsh", "nvim", "zsh_zinit"]
[variables] [variables]
js_linter = "\"eslint\"" js_linter = "\"eslint\""
js_fixer = "\"prettier\"" js_fixer = "\"prettier\""
email = "jay@lawsnote.com" email = "jay@lawsnote.com"
git_username = "jay" 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 # 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 # 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. # fall back to the window manager's recommended size.
#dimensions: dimensions:
# columns: 0 columns: 210
# lines: 0 lines: 65
# Window position (changes require restart) # Window position (changes require restart)
# #
+5 -1
View File
@@ -18,11 +18,15 @@
ls = log --graph --pretty=format:\"%h <%an> %ar %s\" --all ls = log --graph --pretty=format:\"%h <%an> %ar %s\" --all
st = status st = status
br = branch br = branch
wt = worktree
wta = worktree add
wtr = worktree remove
wtl = worktree list
[mergetool] [mergetool]
keepBackup = false keepBackup = false
[mergetool "vimdiff"] [mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[core] [core]
editor = vim editor = nvim
# vim: ft=gitconfig # 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 'rking/ag.vim'
Plug 'terryma/vim-multiple-cursors' Plug 'terryma/vim-multiple-cursors'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" temp plugin " temp plugin
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
Plug 'buoto/gotests-vim' Plug 'buoto/gotests-vim'
@@ -83,7 +86,6 @@ Plug 'rust-lang/rust.vim'
Plug 'danilo-augusto/vim-afterglow' Plug 'danilo-augusto/vim-afterglow'
Plug 'vim-scripts/TaskList.vim' Plug 'vim-scripts/TaskList.vim'
Plug 'google/vim-jsonnet' Plug 'google/vim-jsonnet'
Plug 'github/copilot.vim'
call plug#end() call plug#end()
@@ -108,6 +110,7 @@ set backspace=indent,eol,start
set encoding=utf-8 set encoding=utf-8
set completeopt=menu,menuone,noselect set completeopt=menu,menuone,noselect
set noswapfile set noswapfile
set mouse=
" set guifont=Hack\ Nerd\ Font:h11 " set guifont=Hack\ Nerd\ Font:h11
@@ -320,6 +323,15 @@ let g:fzf_history_dir = '~/.local/share/fzf-history'
lua << EOF 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 nvlsp = require'lspconfig'
local lspSig = require'lsp_signature' local lspSig = require'lsp_signature'
@@ -329,8 +341,7 @@ lspSig.setup{
} }
-- Add additional capabilities supported by nvim-cmp -- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = require('cmp_nvim_lsp').default_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- Use an on_attach function to only map the following keys -- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer -- after the language server attaches to the current buffer
@@ -389,6 +400,7 @@ cmp.setup {
-- behavior = cmp.ConfirmBehavior.Insert, -- behavior = cmp.ConfirmBehavior.Insert,
select = true, select = true,
}), }),
['<C-e>'] = cmp.mapping.abort(),
-- ['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }), -- ['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }),
}), }),
snippet = { snippet = {
@@ -421,7 +433,6 @@ require'nvim-tree'.setup {
update_cwd = false, update_cwd = false,
view = { view = {
width = 40, width = 40,
height = 40,
side = "left", side = "left",
preserve_window_proportions = false, preserve_window_proportions = false,
number = false, number = false,
+6 -2
View File
@@ -9,9 +9,13 @@ Host git.lawsnote.com
HostName git.lawsnote.com HostName git.lawsnote.com
Host dev Host dev
User mtfos User jay
HostName 192.168.200.14 HostName 192.168.200.15
Host vpn Host vpn
User root User root
HostName 192.168.201.254 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 # 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" set-option -ga terminal-overrides ",*256col*:Tc"
# scrollback buffer n lines # scrollback buffer n lines
+1 -6
View File
@@ -7,10 +7,5 @@ fi
if type go > /dev/null; then if type go > /dev/null; then
go install github.com/sourcegraph/go-langserver@latest go install github.com/sourcegraph/go-langserver@latest
go install github.com/jstemmer/gotags@latest go install github.com/jstemmer/gotags@latest
go get -u github.com/cweill/gotests/... go install github.com/cweill/gotests/gotests@latest
fi
if type rustup > /dev/null; then
rustup update
rustup component add rls rust-analysis rust-src
fi fi
+45 -2
View File
@@ -1,3 +1,4 @@
{{#if sshAgent}}
# `$HOME/bin/start-agent` # `$HOME/bin/start-agent`
SSH_ENV="$HOME/.ssh/agent-environment" SSH_ENV="$HOME/.ssh/agent-environment"
@@ -21,6 +22,7 @@ if [ -f "${SSH_ENV}" ]; then
else else
start_agent; start_agent;
fi fi
{{/if}}
function envf { function envf {
if [ ! -f "$1" ]; then if [ ! -f "$1" ]; then
@@ -31,6 +33,23 @@ function envf {
export $(cat $1 | grep -v '^#' | xargs) 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 HISTORY_SUBSTRING_SEARCH_PREFIXED=1
export GOPATH="$HOME/go" export GOPATH="$HOME/go"
export GOROOT="$HOME/apps/go" export GOROOT="$HOME/apps/go"
@@ -53,5 +72,29 @@ fi
# The next line updates PATH for the Google Cloud SDK. # 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 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. function ln-image-tags {
# if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi 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=true
export ZSH_TMUX_AUTOSTART_ONCE=true export ZSH_TMUX_AUTOSTART_ONCE=true
export ZSH_TMUX_AUTOCONNECT=true export ZSH_TMUX_AUTOCONNECT=true
{{/if}}
# install zinit # install zinit
# git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin # git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
source ~/.zinit/bin/zinit.zsh source ~/.zinit/bin/zinit.zsh
@@ -30,11 +31,13 @@ zinit snippet OMZ::plugins/git/git.plugin.zsh
# Load OMZ extract folder # Load OMZ extract folder
zinit ice svn zinit ice svn
zinit snippet OMZ::plugins/extract zinit snippet OMZ::plugins/extract
{{#if enableTmux}}
zinit ice svn zinit ice svn
zinit snippet OMZ::plugins/tmux zinit snippet OMZ::plugins/tmux
{{/if}}
# theme # theme
zinit light "tinyRatP/ys" zinit light "otakukaze/zsh-ys-theme"
# auto load other zshfiles # auto load other zshfiles
[ -f "$HOME/.zsh/zsh.sh" ] && source "$HOME/.zsh/zsh.sh" [ -f "$HOME/.zsh/zsh.sh" ] && source "$HOME/.zsh/zsh.sh"
@@ -45,3 +48,4 @@ zinit light "tinyRatP/ys"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PATH="/usr/local/opt/openjdk/bin:$PATH"