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
82 changes: 44 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Moshe Avni's DotFiles

(also, how to bootstrap a brand new Mac laptop)
<a href="https://dotfyle.com/mosheavni/dotfiles-nvim-config-nvim"><img src="https://dotfyle.com/mosheavni/dotfiles-nvim-config-nvim/badges/plugins?style=flat" /></a>
<a href="https://dotfyle.com/mosheavni/dotfiles-nvim-config-nvim"><img src="https://dotfyle.com/mosheavni/dotfiles-nvim-config-nvim/badges/leaderkey?style=flat" /></a>
<a href="https://dotfyle.com/mosheavni/dotfiles-nvim-config-nvim"><img src="https://dotfyle.com/mosheavni/dotfiles-nvim-config-nvim/badges/plugin-manager?style=flat" /></a>

## Usage

0. Install xcode-select (for basically everything...)
### (also, how to bootstrap a brand new Mac laptop)

0. Install xcode-select (for basically everything…)

```bash
xcode-select --install
Expand All @@ -15,8 +19,9 @@
```bash
/bin/bash -c \
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)" # to make brew available before we load `~/.zshrc` that has "$PATH"
brew update
brew install git
brew install git stow
```

2. Clone this repo:
Expand All @@ -26,82 +31,83 @@
cd ~ && git clone git@github.com:mosheavni/dotfiles.git .dotfiles && cd .dotfiles
```

3. Install brew dependencies (generated with `brew bundle dump`)

```bash
brew bundle
```

4. Install [asdf-vm](https://asdf-vm.com/guide/getting-started.html) and its
plugins
3. Install [antidote](https://antidote.sh/)

```bash
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
```

> **_NOTE:_** Reload shell
4. Stow the .dotfiles and reload the shell:

```bash
while read -r plugin_line;do
asdf plugin-add $(awk '{print $1}' <<<"$plugin_line")
done < asdf/.tool-versions
asdf install
./start.sh
source ~/.zshrc
```

5. Open [Wezterm](https://wezfurlong.org/wezterm/index.html) and start using a real terminal.

6. Install [antidote](https://antidote.sh/)
5. Install brew dependencies (generated with `brew bundle dump`)

```bash
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
brew bundle
```

7. Run `./start.sh` to create the symlinks between the repo dir and the home dir:
6. Open [Wezterm](https://wezfurlong.org/wezterm/index.html) and start using a real terminal.

8. Install npm packages
7. Install [asdf-vm](https://asdf-vm.com/guide/getting-started.html) plugins

```bash
npm install -g $(printf "%s " $(<node/.default-npm-packages))
cd ~/.dotfiles
while read -r plugin_line; do
asdf plugin add $(awk '{print $1}' <<<"$plugin_line")
done <asdf/.tool-versions
asdf install
```

9. Install pip dependencies
8. Add support for recently installed [fzf](https://github.com/junegunn/fzf)

```bash
pip3 install -r requirements.txt
$(brew --prefix)/opt/fzf/install
```

10. Add support for recently-installed [fzf](https://github.com/junegunn/fzf)
9. Login to gh cli

```bash
$(brew --prefix)/opt/fzf/install
gh auth login --web -h github.com
```

11. Install gh [github cli copilot extension](https://github.com/github/gh-copilot)
10. Install gh [github cli copilot extension](https://github.com/github/gh-copilot)

```bash
gh extension install github/gh-copilot --force
```

12. Login to gh cli
11. ???

```bash
gh auth login --web -h github.com
```
12. PROFIT

13. ???
## Usage (just NVIM)

14. PROFIT
> Install requires Neovim 0.10+. Always review the code before installing a configuration.

Clone the repository and install the plugins:

```sh
git clone git@github.com:mosheavni/dotfiles ~/.config/mosheavni/dotfiles
```

Open Neovim with this config:

```sh
NVIM_APPNAME=mosheavni/dotfiles/nvim/.config/nvim nvim
```

## Additional stuff

- Adjust dock and keyboard settings

- Download and install [docker](https://www.docker.com/products/docker-desktop)

- Change clipy shortcuts, and load snippets
- Change clipy and maccy shortcuts, and load snippets

- Install [magnet](https://apps.apple.com/us/app/magnet/id441258766?mt=12)

- Install [Mac Media Key Forwarder](https://github.com/milgra/macmediakeyforwarder)

- Install Snagit
6 changes: 3 additions & 3 deletions asdf/.tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ golang 1.23.1
helm 3.14.4
java corretto-8.422.05.1
jq 1.6
kubectl 1.30.10
kubectl 1.31.7
kubectx 0.9.5
minikube 1.32.0
mysql 8.0.34
neovim nightly
nodejs 20.10.0
nodejs 20.17.0
python 3.11.8
semver 3.4.0
terraform 1.5.5
Expand All @@ -23,4 +23,4 @@ maven 3.6.3
lua 5.1.5
rust stable
vim 9.1.0958
nodejs 20.10.0
ripgrep 14.1.1
99 changes: 96 additions & 3 deletions git/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,101 @@
excludesfile = ~/.gitignore_global
pager = delta
editor = vim

[user]
email = ofekn@netapp.com
name = onacht
name = ofek nacht
email = ofek.nacht@flexera.com

[checkout]
defaultRemote = origin

[pull]
rebase = false
rebase = false

[help]
autocorrect = 1

[branch]
autosetupmerge = always

[alias]
log = log --pretty=log
lb = log --graph --simplify-by-decoration --pretty=shorter --all --notes --date-order --relative-date
adog = log --all --decorate --oneline --graph

[init]
defaultBranch = master

[interactive]
diffFilter = delta --color-only

[delta]
features = decorations arctic-fox
navigate = true # use n and N to move between diff sections
line-numbers = true
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
side-by-side = true

[delta "arctic-fox"]
dark = true
syntax-theme = Nord
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
file-style = omit
hunk-header-decoration-style = "#5E81AC" ul
hunk-header-file-style = blue ul bold
hunk-header-line-number-style = yellow box bold
hunk-header-style = file line-number syntax bold italic
plus-style = brightgreen
plus-emph-style = black green
minus-style = brightred
minus-emph-style = black red
line-numbers = true
line-numbers-minus-style = brightred
line-numbers-plus-style = brightgreen
line-numbers-left-style = "#5E81AC"
line-numbers-right-style = "#5E81AC"
line-numbers-zero-style = "#4C566A"
zero-style = syntax
whitespace-error-style = black bold
blame-code-style = syntax
blame-format = "{author:<18} {commit:<6} {timestamp:<15}"
blame-palette = "#2E3440" "#3B4252" "#434C5E"
merge-conflict-begin-symbol = ~
merge-conflict-end-symbol = ~
merge-conflict-ours-diff-header-style = yellow bold
merge-conflict-ours-diff-header-decoration-style = "#5E81AC" box
merge-conflict-theirs-diff-header-style = yellow bold
merge-conflict-theirs-diff-header-decoration-style = "#5E81AC" box

[delta "interactive"]
keep-plus-minus-markers = false

[delta "decorations"]
commit-decoration-style = blue ol
commit-style = raw
file-style = omit
hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax

[merge]
conflictstyle = diff3

[diff]
colorMoved = default

[color]
branch = true
decorate = true
diff = true
grep = true
interactive = true
pager = true
showbranch = true
status = true
ui = true
1 change: 1 addition & 0 deletions node/.default-npm-packages
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ eslint
eslint-config-react-app
neovim
npm
quicktype
typescript
yarn
7 changes: 7 additions & 0 deletions nvim/.config/nvim/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: test prepare

prepare:
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ../plenary.nvim

test:
nvim --headless --noplugin -u scripts/minimal_init.vim -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './scripts/minimal_init.vim' }"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local git_funcs = require 'user.git'

vim.schedule(function()
local buf = git_funcs.get_fugitive_buffer()
local buf = git_funcs.get_fugitive_buffer() or 0
vim.api.nvim_buf_set_keymap(buf, 'n', '<leader>t', '', {
noremap = true,
silent = true,
Expand Down
4 changes: 2 additions & 2 deletions nvim/.config/nvim/ftplugin/fugitiveblame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ vim.schedule(function()
local commit_hash = get_commit_hash()
vim.cmd 'wincmd p'
-- selene: allow(undefined_variable)
Snacks.gitbrowse.open {
require('user.gitbrowse').open {
what = 'commit',
branch = commit_hash,
commit = commit_hash,
}
end,
})
Expand Down
2 changes: 1 addition & 1 deletion nvim/.config/nvim/ftplugin/k8s_containers.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local mappings = require 'kubectl.mappings'
local pod_view = require 'kubectl.views.pods'
local pod_view = require 'kubectl.resources.pods'
local tables = require 'kubectl.utils.tables'

vim.api.nvim_buf_set_keymap(0, 'n', '<Plug>(kubectl.browse)', '', {
Expand Down
29 changes: 0 additions & 29 deletions nvim/.config/nvim/ftplugin/k8s_fallback.lua

This file was deleted.

32 changes: 0 additions & 32 deletions nvim/.config/nvim/ftplugin/k8s_pods.lua

This file was deleted.

Loading