Compare commits
30 Commits
440f6ea0a1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cf6693c37d | |||
| 39e1ec1c7f | |||
| 3d8c430dc7 | |||
| c15cefb010 | |||
| ea08fa93da | |||
| 0b7fd8dd8b | |||
| 86c1ca2c9f | |||
| f5001b452c | |||
| 953c01349b | |||
| 44ee4cca95 | |||
| 99172a5da5 | |||
| b7b186fd12 | |||
| 32d44330ef | |||
| bda827eb44 | |||
| cd77541819 | |||
| d479e2d615 | |||
| d43ba62d23 | |||
| a0d0f7b1a2 | |||
| a37ceaed83 | |||
| 77ae3b52f1 | |||
| 152c6da25a | |||
| d05f210541 | |||
| 2f9f31a4e2 | |||
| 43f88c9279 | |||
| d05ae38147 | |||
| 63c54a8a98 | |||
| 66258df95a | |||
| b8fe144941 | |||
| 8574ed5967 | |||
| 88bd602f9d |
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -3,3 +3,4 @@
|
||||
.dotter/local.toml
|
||||
.dotter/cache/
|
||||
.dotter/cache.toml
|
||||
.DS_Store
|
||||
|
||||
+36
-14
@@ -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
|
||||
@@ -74,6 +74,8 @@ window:
|
||||
# - SimpleFullscreen
|
||||
#startup_mode: Windowed
|
||||
|
||||
opacity: 0.85
|
||||
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
|
||||
@@ -111,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
|
||||
@@ -150,7 +152,7 @@ font:
|
||||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 10.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
|
||||
@@ -353,12 +355,6 @@ font:
|
||||
#
|
||||
#command: None
|
||||
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
background_opacity: 0.85
|
||||
|
||||
#selection:
|
||||
# This string contains all characters that are used as separators for
|
||||
# "semantic words" in Alacritty.
|
||||
@@ -719,7 +715,33 @@ live_config_reload: true
|
||||
#
|
||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||
# 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: Copy, action: Copy }
|
||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
tool = vimdiff
|
||||
trustExitCode = true
|
||||
[difftool]
|
||||
prompt = false
|
||||
prompt = true
|
||||
[alias]
|
||||
d = difftool
|
||||
co = checkout
|
||||
@@ -18,9 +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
|
||||
+166
-89
@@ -30,6 +30,8 @@ Plug 'hrsh7th/cmp-cmdline'
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
|
||||
Plug 'ray-x/lsp_signature.nvim'
|
||||
|
||||
Plug 'tomasr/molokai'
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
Plug 'vim-scripts/DrawIt'
|
||||
@@ -42,19 +44,20 @@ Plug 'pangloss/vim-javascript'
|
||||
" golang install go get -u github.com/jstemmer/gotags
|
||||
Plug 'majutsushi/tagbar'
|
||||
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 'plasticboy/vim-markdown'
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" defx file explorer
|
||||
" require python package 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 'kien/tabman.vim'
|
||||
@@ -70,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'
|
||||
@@ -80,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()
|
||||
|
||||
@@ -104,6 +109,8 @@ set nowrap
|
||||
set backspace=indent,eol,start
|
||||
set encoding=utf-8
|
||||
set completeopt=menu,menuone,noselect
|
||||
set noswapfile
|
||||
set mouse=
|
||||
|
||||
" set guifont=Hack\ Nerd\ Font:h11
|
||||
|
||||
@@ -140,9 +147,22 @@ nmap <leader>sws <c-w>j
|
||||
nmap <leader>swa <c-w>h
|
||||
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>dd gt
|
||||
|
||||
nnoremap <leader>me :NvimTreeToggle<CR>
|
||||
nnoremap <F3> :NvimTreeToggle<CR>
|
||||
|
||||
|
||||
function! TabCloseRight(bang)
|
||||
let cur=tabpagenr()
|
||||
while cur < tabpagenr('$')
|
||||
@@ -159,81 +179,6 @@ endfunction
|
||||
command! -bang Tabcloseright call TabCloseRight('<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
|
||||
nmap <F8> :TagbarToggle<CR>
|
||||
nmap <F9> :%!jq .<CR>
|
||||
@@ -299,8 +244,11 @@ let g:tagbar_type_go = {
|
||||
\ '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
|
||||
autocmd FileType go nmap tgd <Plug>(go-def-tab)
|
||||
autocmd FileType go nmap <leader>err <Plug>(go-iferr)
|
||||
let g:go_fmt_fail_silently = 1
|
||||
let g:go_fmt_command = "goimports"
|
||||
@@ -341,13 +289,59 @@ let g:multi_cursor_quit_key = '<Esc>'
|
||||
|
||||
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
|
||||
|
||||
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'
|
||||
|
||||
lspSig.setup{
|
||||
hint_enable = true,
|
||||
}
|
||||
|
||||
-- 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
|
||||
@@ -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_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
lspSig.on_attach()
|
||||
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
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>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', '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', '<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)
|
||||
@@ -399,13 +395,14 @@ nvlsp['rust_analyzer'].setup{
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup {
|
||||
mapping = {
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
-- behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
}),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
-- ['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }),
|
||||
},
|
||||
}),
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
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
@@ -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
|
||||
@@ -18,9 +19,6 @@ set -g bell-action any
|
||||
# start window indexing at 1 window so the <prefix> 1 is easier to reach
|
||||
set -g base-index 1
|
||||
|
||||
# tell tmux to use 256 colour terminal
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# xterm-style function key sequences
|
||||
setw -g xterm-keys on
|
||||
|
||||
@@ -64,12 +62,12 @@ bind-key C-l select-window -t :+
|
||||
bind-key -n C-l select-window -t :+
|
||||
|
||||
# navigate panes
|
||||
bind-key j select-pane -t :.-
|
||||
bind-key C-j select-pane -t :.-
|
||||
bind-key -n C-j select-pane -t :.-
|
||||
bind-key k select-pane -t :.+
|
||||
bind-key C-k select-pane -t :.+
|
||||
bind-key -n C-k select-pane -t :.+
|
||||
# bind-key j select-pane -t :.-
|
||||
# bind-key C-j select-pane -t :.-
|
||||
# bind-key -n C-j select-pane -t :.-
|
||||
# bind-key k select-pane -t :.+
|
||||
# bind-key C-k select-pane -t :.+
|
||||
# bind-key -n C-k select-pane -t :.+
|
||||
|
||||
# Copy-mode (vi-mode)
|
||||
#
|
||||
|
||||
+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,13 +22,40 @@ if [ -f "${SSH_ENV}" ]; then
|
||||
else
|
||||
start_agent;
|
||||
fi
|
||||
{{/if}}
|
||||
|
||||
export FLUTTER_ROOT="$HOME/apps/flutter"
|
||||
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 GOPATH="$HOME/go"
|
||||
export GOROOT="$HOME/apps/go"
|
||||
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
|
||||
. "$HOME/.cargo/env"
|
||||
@@ -37,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
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ zle -N edit-command-line
|
||||
|
||||
bindkey '^[,' autosuggest-accept
|
||||
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
bindkey -M viins '^X^E' edit-command-line
|
||||
# Add emacs-like keybind to viins mode
|
||||
bindkey -M viins '^F' forward-char
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
alias k="kubectl"
|
||||
alias nv="nvim"
|
||||
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
@@ -147,7 +147,7 @@ setopt hist_verify
|
||||
setopt bang_hist
|
||||
|
||||
setopt always_last_prompt
|
||||
setopt auto_cd
|
||||
# setopt auto_cd
|
||||
setopt auto_menu
|
||||
setopt auto_param_keys
|
||||
setopt auto_param_slash
|
||||
|
||||
@@ -41,3 +41,6 @@ autoload -Uz zmv
|
||||
autoload -Uz run-help-git
|
||||
autoload -Uz run-help-svk
|
||||
autoload -Uz run-help-svn
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
+17
-7
@@ -1,21 +1,20 @@
|
||||
{{#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
|
||||
|
||||
# theme
|
||||
zinit ice wait
|
||||
zinit light "tinyRatP/ys"
|
||||
|
||||
zinit light zsh-users/zsh-completions
|
||||
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 zdharma-continuum/fast-syntax-highlighting
|
||||
|
||||
zinit light zsh-users/zsh-history-substring-search
|
||||
|
||||
# OhMyZSH Plugs
|
||||
zinit snippet OMZ::lib/completion.zsh
|
||||
zinit snippet OMZ::lib/git.zsh
|
||||
@@ -23,15 +22,22 @@ zinit snippet OMZ::lib/theme-and-appearance.zsh
|
||||
zinit ice as="completion"
|
||||
zinit snippet OMZ::plugins/docker/_docker
|
||||
zinit snippet OMZP::composer
|
||||
zinit snippet OMZP::aws
|
||||
zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh
|
||||
zinit snippet OMZP::kubectl
|
||||
zinit ice lucid wait='1'
|
||||
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 "otakukaze/zsh-ys-theme"
|
||||
|
||||
# auto load other zshfiles
|
||||
[ -f "$HOME/.zsh/zsh.sh" ] && source "$HOME/.zsh/zsh.sh"
|
||||
@@ -39,3 +45,7 @@ zinit snippet OMZ::plugins/tmux
|
||||
[ -f "$HOME/.zprofile" ] && source "$HOME/.zprofile"
|
||||
|
||||
# vim: set ft=zsh:
|
||||
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
export PATH="/usr/local/opt/openjdk/bin:$PATH"
|
||||
|
||||
Reference in New Issue
Block a user