mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-05-10 19:10:59 +08:00
fix: audit fixes — shellcheck, TTY signcolumn, matchdelete race, docs accuracy
- install.sh: ls -A → find (shellcheck SC2012) - navigation.vim: GFiles -nargs=? to support :GFiles? - lsp.vim: signcolumn=yes gated behind !g:is_tty - editing.vim: matchdelete in timer wrapped with silent! - README: gofmt → goimports, plugin count 24–25 - CHANGELOG: annotate removed features (ChopsticksLearn, vim . layout)
This commit is contained in:
parent
196e88c2c8
commit
01c67d841b
6 changed files with 12 additions and 10 deletions
|
|
@ -37,8 +37,8 @@
|
||||||
- Sidebar toggle (`,e` / `,E`) — left-side netrw with `topleft vertical`, winfixwidth, proper toggle
|
- Sidebar toggle (`,e` / `,E`) — left-side netrw with `topleft vertical`, winfixwidth, proper toggle
|
||||||
- Enriched statusline — SLMode, SLGit, SLAle, SLFlags
|
- Enriched statusline — SLMode, SLGit, SLAle, SLFlags
|
||||||
- Toggle feedback — F2/F3/F4/F6/`,ss` echo current state
|
- Toggle feedback — F2/F3/F4/F6/`,ss` echo current state
|
||||||
- `vim .` layout — netrw left + Startify right, proper proportions
|
- `vim .` layout — netrw left + Startify right (removed in later refactor)
|
||||||
- Interactive tutorial (`:ChopsticksLearn`)
|
- Interactive tutorial (`:ChopsticksLearn` — removed in later release)
|
||||||
|
|
||||||
### Removed (Unix minimalism refactor)
|
### Removed (Unix minimalism refactor)
|
||||||
- **565 lines** of dead code and bloat
|
- **565 lines** of dead code and bloat
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<h1 align="center">chopsticks</h1>
|
<h1 align="center">chopsticks</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>Vim for engineers. 25 plugins, works over SSH.</strong>
|
<strong>Vim for engineers. ~25 plugins, works over SSH.</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|
@ -30,14 +30,14 @@ You SSH into a server. You need to edit code. You want LSP, fuzzy find, git inte
|
||||||
|
|
||||||
chopsticks gives you a production-ready Vim config in one command. Pure VimScript — no Node.js for the core. Degrades gracefully on TTY. Works the same on your MacBook and your headless Arch box.
|
chopsticks gives you a production-ready Vim config in one command. Pure VimScript — no Node.js for the core. Degrades gracefully on TTY. Works the same on your MacBook and your headless Arch box.
|
||||||
|
|
||||||
**25 plugins**, LSP, linting, and a hand-built statusline. No bloat, no decorations, just tools.
|
**24–25 plugins** (tmux-navigator loads only inside tmux), LSP, linting, and a hand-built statusline. No bloat, no decorations, just tools.
|
||||||
|
|
||||||
## What's in the box
|
## What's in the box
|
||||||
|
|
||||||
| Feature | Description |
|
| Feature | Description |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| **LSP** | completion, go-to-def, hover, rename, code actions — pure VimScript ([vim-lsp](https://github.com/prabirshrestha/vim-lsp)) |
|
| **LSP** | completion, go-to-def, hover, rename, code actions — pure VimScript ([vim-lsp](https://github.com/prabirshrestha/vim-lsp)) |
|
||||||
| **Lint + format** | [ALE](https://github.com/dense-analysis/ale) runs black, prettier, gofmt, rustfmt on save |
|
| **Lint + format** | [ALE](https://github.com/dense-analysis/ale) runs black, prettier, goimports, rustfmt on save |
|
||||||
| **Fuzzy find** | files, buffers, grep, tags, marks, commands — [FZF](https://github.com/junegunn/fzf.vim) |
|
| **Fuzzy find** | files, buffers, grep, tags, marks, commands — [FZF](https://github.com/junegunn/fzf.vim) |
|
||||||
| **Git** | status, diff, blame, push, pull, conflict markers — [fugitive](https://github.com/tpope/vim-fugitive) + [gitgutter](https://github.com/airblade/vim-gitgutter) |
|
| **Git** | status, diff, blame, push, pull, conflict markers — [fugitive](https://github.com/tpope/vim-fugitive) + [gitgutter](https://github.com/airblade/vim-gitgutter) |
|
||||||
| **Run file** | `,cr` — auto-detects Python, Go, Rust, JS, C, Shell, and more |
|
| **Run file** | `,cr` — auto-detects Python, Go, Rust, JS, C, Shell, and more |
|
||||||
|
|
@ -131,7 +131,7 @@ ALE and vim-lsp coexist cleanly (`ale_disable_lsp=1`). ALE handles linting + for
|
||||||
├── .vimrc thin loader
|
├── .vimrc thin loader
|
||||||
├── modules/
|
├── modules/
|
||||||
│ ├── env.vim TTY detection, truecolor, skip built-in plugins
|
│ ├── env.vim TTY detection, truecolor, skip built-in plugins
|
||||||
│ ├── plugins.vim vim-plug + 25 plugins
|
│ ├── plugins.vim vim-plug + 24–25 plugins
|
||||||
│ ├── core.vim settings, keymaps, performance
|
│ ├── core.vim settings, keymaps, performance
|
||||||
│ ├── ui.vim solarized, statusline, startify
|
│ ├── ui.vim solarized, statusline, startify
|
||||||
│ ├── editing.vim easymotion, yank highlight, blank lines
|
│ ├── editing.vim easymotion, yank highlight, blank lines
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ _vim_run() {
|
||||||
vim --not-a-term "$@" 2>/dev/null
|
vim --not-a-term "$@" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
if [[ -d "$HOME/.vim/plugged" ]] && [[ -n "$(ls -A "$HOME/.vim/plugged" 2>/dev/null)" ]]; then
|
if [[ -d "$HOME/.vim/plugged" ]] && [[ -n "$(find "$HOME/.vim/plugged" -mindepth 1 -maxdepth 1 2>/dev/null)" ]]; then
|
||||||
warn "PlugClean: removing plugins not listed in .vimrc from ~/.vim/plugged"
|
warn "PlugClean: removing plugins not listed in .vimrc from ~/.vim/plugged"
|
||||||
fi
|
fi
|
||||||
_vim_run +'PlugClean!' +qall || true # remove plugins no longer in vimrc; ignore exit code (none expected)
|
_vim_run +'PlugClean!' +qall || true # remove plugins no longer in vimrc; ignore exit code (none expected)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ if exists('##TextYankPost') && has('timers')
|
||||||
if v:event.operator !=# 'y' | return | endif
|
if v:event.operator !=# 'y' | return | endif
|
||||||
let l:m = matchadd('IncSearch',
|
let l:m = matchadd('IncSearch',
|
||||||
\ printf('\%%>%dl\%%<%dl', line("'[") - 1, line("']") + 1))
|
\ printf('\%%>%dl\%%<%dl', line("'[") - 1, line("']") + 1))
|
||||||
call timer_start(150, {-> matchdelete(l:m)})
|
call timer_start(150, {-> execute('silent! call matchdelete(' . l:m . ')')})
|
||||||
endfunction
|
endfunction
|
||||||
augroup ChopstickYankHL
|
augroup ChopstickYankHL
|
||||||
autocmd!
|
autocmd!
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@ inoremap <expr> <CR> pumvisible() ? asyncomplete#close_popup() : "\<CR>"
|
||||||
|
|
||||||
function! s:on_lsp_buffer_enabled() abort
|
function! s:on_lsp_buffer_enabled() abort
|
||||||
setlocal omnifunc=lsp#complete
|
setlocal omnifunc=lsp#complete
|
||||||
|
if !g:is_tty
|
||||||
setlocal signcolumn=yes
|
setlocal signcolumn=yes
|
||||||
|
endif
|
||||||
|
|
||||||
nmap <buffer> gd <plug>(lsp-definition)
|
nmap <buffer> gd <plug>(lsp-definition)
|
||||||
nmap <buffer> gy <plug>(lsp-type-definition)
|
nmap <buffer> gy <plug>(lsp-type-definition)
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ command! -bang -nargs=* RgWord
|
||||||
\ call fzf#vim#grep(
|
\ call fzf#vim#grep(
|
||||||
\ 'rg --column --line-number --no-heading --color=always --smart-case -F -- '
|
\ 'rg --column --line-number --no-heading --color=always --smart-case -F -- '
|
||||||
\ .shellescape(expand('<cword>')), 1, s:Preview(), <bang>0)
|
\ .shellescape(expand('<cword>')), 1, s:Preview(), <bang>0)
|
||||||
command! -bang GFiles call fzf#vim#gitfiles('', s:Preview(), <bang>0)
|
command! -bang -nargs=? GFiles call fzf#vim#gitfiles(<q-args>, s:Preview(), <bang>0)
|
||||||
|
|
||||||
" ── Window Navigation ───────────────────────────────────────────────────────
|
" ── Window Navigation ───────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue