Compare commits

...

23 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
root cd77541819 [feat] change alacritty font 2022-09-03 14:04:15 +08:00
root d479e2d615 add new zsh alias 2022-06-28 23:09:13 +08:00
root d43ba62d23 remove not used options 2022-06-28 22:41:53 +08:00
jay a0d0f7b1a2 modify gitconfig 2022-05-03 15:55:34 +08:00
jay a37ceaed83 update 2022-04-27 12:27:21 +08:00
jay 77ae3b52f1 update files 2022-04-25 10:17:18 +08:00
jay 152c6da25a update 2022-04-14 21:30:31 +08:00
jay d05f210541 Merge branch 'master' of ssh://git.trj.tw:10022/jay/dotter 2022-03-30 23:12:06 +08:00
jay 2f9f31a4e2 update 2022-03-30 23:11:39 +08:00
14 changed files with 321 additions and 127 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"
+11
View File
@@ -0,0 +1,11 @@
includes = []
packages = ["shell", "zsh", "nvim", "zsh_zinit"]
[variables]
js_linter = "\"eslint\""
js_fixer = "\"prettier\""
email = "jay@lawsnote.com"
git_username = "jay"
enableTmux = false
sshAgent = false
+1
View File
@@ -3,3 +3,4 @@
.dotter/local.toml .dotter/local.toml
.dotter/cache/ .dotter/cache/
.dotter/cache.toml .dotter/cache.toml
.DS_Store
+34 -8
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)
# #
@@ -46,8 +46,8 @@ window:
# Blank space added around the window in pixels. This padding is scaled # 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. # by DPI and the specified value is always added at both opposing sides.
padding: padding:
x: 2 x: 1
y: 2 y: 1
# Spread additional padding evenly around the terminal content. # Spread additional padding evenly around the terminal content.
#dynamic_padding: false #dynamic_padding: false
@@ -113,7 +113,7 @@ font:
# - (macOS) Menlo # - (macOS) Menlo
# - (Linux/BSD) monospace # - (Linux/BSD) monospace
# - (Windows) Consolas # - (Windows) Consolas
family: UbuntuMono Nerd Font Mono family: JetBrainsMono Nerd Font
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Regular #style: Regular
@@ -152,7 +152,7 @@ font:
#style: Bold Italic #style: Bold Italic
# Point size # Point size
size: 10.0 size: 8.0
# Offset is the extra space around each character. `offset.y` can be thought # 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 # of as modifying the line spacing, and `offset.x` as modifying the letter
@@ -715,7 +715,33 @@ live_config_reload: true
# #
# If the same trigger is assigned to multiple actions, all of them are executed # If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in. # in the order they were defined in.
#key_bindings: # key_bindings:
# - { key: A, mods: Alt, chars: '\x1ba' }
# - { key: B, mods: Alt, chars: '\x1bb' }
# - { key: C, mods: Alt, chars: '\x1bc' }
# - { key: D, mods: Alt, chars: '\x1bd' }
# - { key: E, mods: Alt, chars: '\x1be' }
# - { key: F, mods: Alt, chars: '\x1bf' }
# - { key: G, mods: Alt, chars: '\x1bg' }
# - { key: H, mods: Alt, chars: '\x1bh' }
# - { key: I, mods: Alt, chars: '\x1bi' }
# - { key: J, mods: Alt, chars: '\x1bj' }
# - { key: K, mods: Alt, chars: '\x1bk' }
# - { key: L, mods: Alt, chars: '\x1bl' }
# - { key: M, mods: Alt, chars: '\x1bm' }
# - { key: N, mods: Alt, chars: '\x1bn' }
# - { key: O, mods: Alt, chars: '\x1bo' }
# - { key: P, mods: Alt, chars: '\x1bp' }
# - { key: Q, mods: Alt, chars: '\x1bq' }
# - { key: R, mods: Alt, chars: '\x1br' }
# - { key: S, mods: Alt, chars: '\x1bs' }
# - { key: T, mods: Alt, chars: '\x1bt' }
# - { key: U, mods: Alt, chars: '\x1bu' }
# - { key: V, mods: Alt, chars: '\x1bv' }
# - { key: W, mods: Alt, chars: '\x1bw' }
# - { key: X, mods: Alt, chars: '\x1bx' }
# - { key: Y, mods: Alt, chars: '\x1by' }
# - { key: Z, mods: Alt, chars: '\x1bz' }
#- { key: Paste, action: Paste } #- { key: Paste, action: Paste }
#- { key: Copy, action: Copy } #- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice } #- { key: L, mods: Control, action: ClearLogNotice }
+8 -2
View File
@@ -9,7 +9,7 @@
tool = vimdiff tool = vimdiff
trustExitCode = true trustExitCode = true
[difftool] [difftool]
prompt = false prompt = true
[alias] [alias]
d = difftool d = difftool
co = checkout co = checkout
@@ -18,9 +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"]
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
+166 -89
View File
@@ -30,6 +30,8 @@ Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/cmp-vsnip' Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip' Plug 'hrsh7th/vim-vsnip'
Plug 'ray-x/lsp_signature.nvim'
Plug 'tomasr/molokai' Plug 'tomasr/molokai'
Plug 'scrooloose/nerdcommenter' Plug 'scrooloose/nerdcommenter'
Plug 'vim-scripts/DrawIt' Plug 'vim-scripts/DrawIt'
@@ -42,19 +44,20 @@ Plug 'pangloss/vim-javascript'
" golang install go get -u github.com/jstemmer/gotags " golang install go get -u github.com/jstemmer/gotags
Plug 'majutsushi/tagbar' Plug 'majutsushi/tagbar'
Plug 'w0rp/ale' Plug 'w0rp/ale'
Plug 'connorholyday/vim-snazzy'
Plug 'hzchirs/vim-material'
Plug 'kadekillary/Turtles'
Plug 'phanviet/vim-monokai-pro'
Plug 'sickill/vim-monokai'
Plug 'godlygeek/tabular' Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown' Plug 'plasticboy/vim-markdown'
Plug 'ctrlpvim/ctrlp.vim' Plug 'ctrlpvim/ctrlp.vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" defx file explorer " defx file explorer
" require python package pynvim " require python package pynvim
" install `pip3 install --user pynvim` " install `pip3 install --user pynvim`
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' } " Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'kyazdani42/nvim-web-devicons' " for file icons
Plug 'kyazdani42/nvim-tree.lua'
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
Plug 'kien/tabman.vim' Plug 'kien/tabman.vim'
@@ -70,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'
@@ -80,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()
@@ -104,6 +109,8 @@ set nowrap
set backspace=indent,eol,start 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 mouse=
" set guifont=Hack\ Nerd\ Font:h11 " set guifont=Hack\ Nerd\ Font:h11
@@ -140,9 +147,22 @@ nmap <leader>sws <c-w>j
nmap <leader>swa <c-w>h nmap <leader>swa <c-w>h
nmap <leader>swd <c-w>l nmap <leader>swd <c-w>l
nnoremap <leader>fl :Lines
nnoremap <leader>fb :BLines
nnoremap <leader>ff :Files
nnoremap <leader>fg :GFiles
nnoremap <leader>f? :GFiles?
nnoremap <leader>ft :Tags<cr>
nnoremap <leader>fa :Ag
nnoremap <leader>fc :Commits
nmap <leader>aa gT nmap <leader>aa gT
nmap <leader>dd gt nmap <leader>dd gt
nnoremap <leader>me :NvimTreeToggle<CR>
nnoremap <F3> :NvimTreeToggle<CR>
function! TabCloseRight(bang) function! TabCloseRight(bang)
let cur=tabpagenr() let cur=tabpagenr()
while cur < tabpagenr('$') while cur < tabpagenr('$')
@@ -159,81 +179,6 @@ endfunction
command! -bang Tabcloseright call TabCloseRight('<bang>') command! -bang Tabcloseright call TabCloseRight('<bang>')
command! -bang Tabcloseleft call TabCloseLeft('<bang>') command! -bang Tabcloseleft call TabCloseLeft('<bang>')
" defx settings
call defx#custom#option('_', {
\ 'winwidth': 40,
\ 'split': 'vertical',
\ 'direction': 'topleft',
\ 'buffer_name': '',
\ 'toggle': 1,
\ 'resume': 1,
\ })
nmap <F3> :Defx<CR>
nmap <leader>me :Defx<CR>
autocmd FileType defx call s:defx_my_settings()
function! s:defx_my_settings() abort
" Define mappings
nnoremap <silent><buffer><expr> <CR>
\ defx#is_directory() ?
\ defx#do_action('open_tree', 'toggle') :
\ defx#do_action('drop')
nnoremap <silent><buffer><expr> T
\ defx#do_action('open', 'tabe')
nnoremap <silent><buffer><expr> s
\ defx#do_action('drop', 'vsplit')
nnoremap <silent><buffer><expr> mc
\ defx#do_action('copy')
nnoremap <silent><buffer><expr> mm
\ defx#do_action('move')
nnoremap <silent><buffer><expr> mp
\ defx#do_action('paste')
nnoremap <silent><buffer><expr> P
\ defx#do_action('preview')
nnoremap <silent><buffer><expr> o
\ defx#do_action('open_tree', 'toggle')
nnoremap <silent><buffer><expr> ma
\ defx#do_action('new_file')
nnoremap <silent><buffer><expr> C
\ defx#do_action('toggle_columns',
\ 'mark:indent:icon:filename:type:size:time')
nnoremap <silent><buffer><expr> S
\ defx#do_action('toggle_sort', 'time')
nnoremap <silent><buffer><expr> md
\ defx#do_action('remove')
nnoremap <silent><buffer><expr> mr
\ defx#do_action('rename')
nnoremap <silent><buffer><expr> !
\ defx#do_action('execute_command')
nnoremap <silent><buffer><expr> x
\ defx#do_action('execute_system')
nnoremap <silent><buffer><expr> yy
\ defx#do_action('yank_path')
nnoremap <silent><buffer><expr> .
\ defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> ;
\ defx#do_action('repeat')
nnoremap <silent><buffer><expr> h
\ defx#do_action('cd', ['..'])
nnoremap <silent><buffer><expr> ~
\ defx#do_action('cd')
nnoremap <silent><buffer><expr> q
\ defx#do_action('quit')
nnoremap <silent><buffer><expr> <Space>
\ defx#do_action('toggle_select') . 'j'
nnoremap <silent><buffer><expr> *
\ defx#do_action('toggle_select_all')
nnoremap <silent><buffer><expr> j
\ line('.') == line('$') ? 'gg' : 'j'
nnoremap <silent><buffer><expr> k
\ line('.') == 1 ? 'G' : 'k'
nnoremap <silent><buffer><expr> r
\ defx#do_action('redraw')
nnoremap <silent><buffer><expr> <C-g>
\ defx#do_action('print')
nnoremap <silent><buffer><expr> cd
\ defx#do_action('change_vim_cwd')
endfunction
" tagbar " tagbar
nmap <F8> :TagbarToggle<CR> nmap <F8> :TagbarToggle<CR>
nmap <F9> :%!jq .<CR> nmap <F9> :%!jq .<CR>
@@ -299,8 +244,11 @@ let g:tagbar_type_go = {
\ 'ctagsargs' : '-sort -silent' \ 'ctagsargs' : '-sort -silent'
\ } \ }
" copilot setup
imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
let g:copilot_no_tab_map = v:true
" vim-go setting " vim-go setting
autocmd FileType go nmap tgd <Plug>(go-def-tab)
autocmd FileType go nmap <leader>err <Plug>(go-iferr) autocmd FileType go nmap <leader>err <Plug>(go-iferr)
let g:go_fmt_fail_silently = 1 let g:go_fmt_fail_silently = 1
let g:go_fmt_command = "goimports" let g:go_fmt_command = "goimports"
@@ -341,13 +289,59 @@ let g:multi_cursor_quit_key = '<Esc>'
let g:javascript_plugin_jsdoc = 1 let g:javascript_plugin_jsdoc = 1
" fzf settings
" This is the default extra key bindings
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" Default fzf layout
" - down / up / left / right
let g:fzf_layout = { 'down': '~40%' }
" Customize fzf colors to match your color scheme
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Comment'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Statement'],
\ 'info': ['fg', 'PreProc'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
" Enable per-command history.
" CTRL-N and CTRL-P will be automatically bound to next-history and
" previous-history instead of down and up. If you don't like the change,
" explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS.
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'
lspSig.setup{
hint_enable = true,
}
-- 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
@@ -355,6 +349,8 @@ local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
lspSig.on_attach()
-- Enable completion triggered by <c-x><c-o> -- Enable completion triggered by <c-x><c-o>
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
@@ -366,7 +362,7 @@ local on_attach = function(client, bufnr)
buf_set_keymap('n', '<leader>gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) buf_set_keymap('n', '<leader>gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', '<leader>gt', '<cmd>tab split<CR><cmd>lua vim.lsp.buf.definition()<CR>', opts) buf_set_keymap('n', '<leader>gt', '<cmd>tab split<CR><cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
-- buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) buf_set_keymap('n', '<leader>gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
-- buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) -- buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
-- buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts) -- buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
@@ -399,13 +395,14 @@ nvlsp['rust_analyzer'].setup{
-- nvim-cmp setup -- nvim-cmp setup
local cmp = require 'cmp' local cmp = require 'cmp'
cmp.setup { cmp.setup {
mapping = { mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({ ['<CR>'] = cmp.mapping.confirm({
-- 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 = {
-- REQUIRED - you must specify a snippet engine -- REQUIRED - you must specify a snippet engine
expand = function(args) expand = function(args)
@@ -422,5 +419,85 @@ cmp.setup {
}), }),
} }
EOF require'nvim-tree'.setup {
auto_reload_on_write = true,
disable_netrw = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
ignore_buffer_on_setup = false,
open_on_setup = false,
open_on_setup_file = false,
open_on_tab = false,
sort_by = "name",
update_cwd = false,
view = {
width = 40,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
},
renderer = {
indent_markers = {
enable = false,
icons = {
corner = "└ ",
edge = "│ ",
none = " ",
},
},
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = false,
update_cwd = false,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = nil,
args = {},
},
filters = {
dotfiles = false,
custom = {},
exclude = {},
},
git = {
enable = true,
ignore = true,
timeout = 400,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
},
open_file = {
quit_on_open = false,
resize_window = false,
window_picker = {
enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
},
}
EOF
+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
+8 -10
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
@@ -18,9 +19,6 @@ set -g bell-action any
# start window indexing at 1 window so the <prefix> 1 is easier to reach # start window indexing at 1 window so the <prefix> 1 is easier to reach
set -g base-index 1 set -g base-index 1
# tell tmux to use 256 colour terminal
set -g default-terminal "screen-256color"
# xterm-style function key sequences # xterm-style function key sequences
setw -g xterm-keys on setw -g xterm-keys on
@@ -64,12 +62,12 @@ bind-key C-l select-window -t :+
bind-key -n C-l select-window -t :+ bind-key -n C-l select-window -t :+
# navigate panes # navigate panes
bind-key j select-pane -t :.- # bind-key j select-pane -t :.-
bind-key C-j select-pane -t :.- # bind-key C-j select-pane -t :.-
bind-key -n C-j select-pane -t :.- # bind-key -n C-j select-pane -t :.-
bind-key k select-pane -t :.+ # bind-key k select-pane -t :.+
bind-key C-k select-pane -t :.+ # bind-key C-k select-pane -t :.+
bind-key -n C-k select-pane -t :.+ # bind-key -n C-k select-pane -t :.+
# Copy-mode (vi-mode) # Copy-mode (vi-mode)
# #
+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
+59 -4
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,14 +22,40 @@ if [ -f "${SSH_ENV}" ]; then
else else
start_agent; start_agent;
fi fi
{{/if}}
function envf {
if [ ! -f "$1" ]; then
echo "File $1 does not exist"
exit 1
fi
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 FLUTTER_ROOT="$HOME/apps/flutter"
export GOPATH="$HOME/go" export GOPATH="$HOME/go"
export GOROOT="$HOME/apps/go" export GOROOT="$HOME/apps/go"
export NODE_ROOT="$HOME/apps/node" export NODE_ROOT="$HOME/apps/node"
export PATH="$GOPATH/bin:$GOROOT/bin:$NODE_ROOT/bin:$FLUTTER_ROOT/bin:$PATH" export PATH="$GOPATH/bin:$GOROOT/bin:$NODE_ROOT/bin:${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
if [ -f "$HOME/.cargo/env" ]; then if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
@@ -38,8 +65,36 @@ if [ -d "$HOME/bin" ]; then
export PATH="$HOME/bin:$PATH" export PATH="$HOME/bin:$PATH"
fi fi
if [ -d "$HOME/.local/bin" ]; then
export PATH="$PATH:$HOME/.local/bin"
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
}
+8
View File
@@ -1,3 +1,11 @@
alias k="kubectl" alias k="kubectl"
alias nv="nvim" alias nv="nvim"
alias ls="ls --color=auto" alias ls="ls --color=auto"
# alias docker="lima nerdctl"
# alias ds="lima sudo nerdctl"
alias wgup="sudo wg-quick up"
alias wgdown="sudo wg-quick down"
alias lg="lazygit"
+1 -1
View File
@@ -147,7 +147,7 @@ setopt hist_verify
setopt bang_hist setopt bang_hist
setopt always_last_prompt setopt always_last_prompt
setopt auto_cd # setopt auto_cd
setopt auto_menu setopt auto_menu
setopt auto_param_keys setopt auto_param_keys
setopt auto_param_slash setopt auto_param_slash
+13 -5
View File
@@ -1,17 +1,18 @@
{{#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
zinit light zsh-users/zsh-completions zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions zinit light zsh-users/zsh-autosuggestions
zinit light zdharma-continuum/fast-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light mattbangert/kubectl-zsh-plugin zinit light mattbangert/kubectl-zsh-plugin
zinit light zdharma-continuum/fast-syntax-highlighting
zinit light zsh-users/zsh-history-substring-search zinit light zsh-users/zsh-history-substring-search
# OhMyZSH Plugs # OhMyZSH Plugs
@@ -21,19 +22,22 @@ zinit snippet OMZ::lib/theme-and-appearance.zsh
zinit ice as="completion" zinit ice as="completion"
zinit snippet OMZ::plugins/docker/_docker zinit snippet OMZ::plugins/docker/_docker
zinit snippet OMZP::composer zinit snippet OMZP::composer
zinit snippet OMZP::aws
zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh
zinit snippet OMZ::plugins/kubectl/kubectl.plugin.zsh zinit snippet OMZP::kubectl
zinit ice lucid wait='1' zinit ice lucid wait='1'
zinit snippet OMZ::plugins/git/git.plugin.zsh 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"
@@ -41,3 +45,7 @@ zinit light "tinyRatP/ys"
[ -f "$HOME/.zprofile" ] && source "$HOME/.zprofile" [ -f "$HOME/.zprofile" ] && source "$HOME/.zprofile"
# vim: set ft=zsh: # vim: set ft=zsh:
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PATH="/usr/local/opt/openjdk/bin:$PATH"