Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[tools]
node = "24.12.0"
pnpm = "11.15.1"
neovim = "0.12.4"
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
node_modules/
target/
pnpm-lock.yaml
cli/nvim/lazy-lock.json
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ brew install mise
git clone https://github.com/viqueen/devbox.git
cd devbox

# install tools (node, pnpm, neovim)
# install tools (node, pnpm)
mise install

# install dependencies
Expand All @@ -26,7 +26,7 @@ pnpm install
# optional: workspace-aware prompt
./setup.sh config_prompt

# optional: neovim with lazy.nvim
# optional: vim with an easy-on-the-eyes theme
./setup.sh config_vim
```

Expand All @@ -36,11 +36,10 @@ pnpm install

Defined in `.mise.toml` and symlinked to `~/.mise.toml` by `config_box`:

| Tool | Purpose |
| ------ | --------------- |
| node | Node.js runtime |
| pnpm | Package manager |
| neovim | Editor |
| Tool | Purpose |
| ---- | --------------- |
| node | Node.js runtime |
| pnpm | Package manager |

### Prompt

Expand All @@ -59,10 +58,10 @@ Configure orgs via env vars: `VIQUEEN_DEVBOX_PRIMARY_ORG`, `VIQUEEN_DEVBOX_SECON

### Editor

Neovim with [lazy.nvim](https://github.com/folke/lazy.nvim) plugin manager. Config lives in `cli/nvim/`
and is scoped via `NVIM_APPNAME=devbox` (stored at `~/.config/devbox/nvim/`).

Plugins: edge colorscheme, lualine, nvim-tree, telescope, treesitter, mason + lspconfig.
Plain vim, no plugin manager, no alias. `config_vim` symlinks `cli/.vimrc` to `~/.vimrc`, so
running `vim` anywhere (shell, scripts, `git commit`) picks up the config automatically. Uses
vim's built-in `retrobox` colorscheme (gruvbox-style, muted and dark) — no vendored colors file
to maintain, requires vim 9+.

### Scripts and Binaries

Expand All @@ -84,7 +83,7 @@ image -h # docker things
gitar -h # git things
```

All scripts source `selfedit.sh` (edit mode via nvim) and `selfdoc.sh` (auto-generated help from `@COMMAND` annotations):
All scripts source `selfedit.sh` (edit mode via vim) and `selfdoc.sh` (auto-generated help from `@COMMAND` annotations):

```bash
#! /usr/bin/env bash
Expand Down
4 changes: 1 addition & 3 deletions cli/.devboxrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ alias move=mv
alias maven=mvn
alias awsl=awslocal
alias cats='pygmentize -g'
alias vim='NVIM_APPNAME=devbox nvim'
alias nvim='NVIM_APPNAME=devbox nvim'

export PS1='\u@\h\w'
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export BASH_SILENCE_DEPRECATION_WARNING=1

# homebrew
export HOMEBREW_EDITOR="nvim"
export HOMEBREW_EDITOR="vim"

# maven
export MAVEN_OPTS="-Xms1680m -Xmx2048m -XX:MaxMetaspaceSize=384m"
Expand Down
48 changes: 48 additions & 0 deletions cli/.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
" devbox vim config
set nocompatible

syntax on
filetype plugin indent on

set number
set cursorline
set mouse=a
set ignorecase
set smartcase
set hlsearch
set incsearch
set showmatch
set expandtab
set smarttab
set shiftwidth=2
set tabstop=2
set autoindent
set smartindent
set wrap
set encoding=utf-8
set backspace=indent,eol,start
set wildmenu
set ruler
set cmdheight=2
set laststatus=2
set autoread
set background=dark
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/node_modules,*/target,*/dist,*/build,*/coverage,.git,.hg,.svn,.idea
set list
set listchars=space:·

if has('termguicolors')
set termguicolors
endif

" strip trailing whitespace on save
autocmd BufWritePre * :%s/\s\+$//e

" filetype associations
autocmd BufNewFile,BufRead .eslintrc,.babelrc set filetype=json

" keymaps
nnoremap ] :m +1<CR>
nnoremap [ :m -2<CR>

silent! colorscheme retrobox
2 changes: 1 addition & 1 deletion cli/bin/compose
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function stop() {
function profile() {
_with_arguments 1 "$@"
profile=${1}
nvim "${VIQUEEN_DEVBOX_HOME}"/docker-compose/"${profile}".yml
vim "${VIQUEEN_DEVBOX_HOME}"/docker-compose/"${profile}".yml
}

# @COMMAND list lists available compose profiles
Expand Down
11 changes: 3 additions & 8 deletions cli/bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ lc() {

# @COMMAND rc opens .devboxrc file for edit
rc() {
nvim ${VIQUEEN_DEVBOX_HOME}/cli/.devboxrc
vim ${VIQUEEN_DEVBOX_HOME}/cli/.devboxrc
source ${VIQUEEN_DEVBOX_HOME}/cli/.devboxrc
}

Expand Down Expand Up @@ -82,14 +82,9 @@ licenses() {
# VIM
#######

# @COMMAND vimr nvim plugin sync
vimr () {
NVIM_APPNAME=devbox nvim --headless "+Lazy! sync" +qa
}

# @COMMAND vimrc nvim config
# @COMMAND vimrc vim config
vimrc() {
nvim ${VIQUEEN_DEVBOX_HOME}/cli/nvim/init.lua
vim ${VIQUEEN_DEVBOX_HOME}/cli/.vimrc
}

#####
Expand Down
2 changes: 1 addition & 1 deletion cli/bin/internal
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edit() {
then
script=${0}
fi
nvim ${script}
vim ${script}
chmod +x ${script}
}

Expand Down
2 changes: 1 addition & 1 deletion cli/bin/selfedit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ edit() {
then
script=${0}
fi
nvim "${script}"
vim "${script}"
chmod +x "${script}"
}

Expand Down
62 changes: 0 additions & 62 deletions cli/nvim/init.lua

This file was deleted.

13 changes: 0 additions & 13 deletions cli/nvim/lazy-lock.json

This file was deleted.

81 changes: 0 additions & 81 deletions cli/nvim/lua/plugins/init.lua

This file was deleted.

9 changes: 2 additions & 7 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ function config_box() {
}

function config_vim() {
mkdir -p "${HOME}/.config"
# remove any prior target (dir or symlink) so ln replaces it rather than
# nesting the link inside an existing directory
rm -rf "${HOME}/.config/devbox"
ln -sfnv "${VIQUEEN_DEVBOX_HOME}"/cli/nvim "${HOME}/.config/devbox"
git config --global core.editor "nvim"
NVIM_APPNAME=devbox nvim --headless "+Lazy! sync" +qa
ln -sfnv "${VIQUEEN_DEVBOX_HOME}"/cli/.vimrc "${HOME}/.vimrc"
git config --global core.editor "vim"
}

function config_prompt() {
Expand Down
Loading