Compare commits

...

8 Commits

15 changed files with 183 additions and 31 deletions

24
.github/README.md vendored
View File

@@ -23,20 +23,14 @@ fork or download the repo as a zip and go from there with your own configs.
## The looks
## tmux with powerlevel10k, the default view
![screenshot of tmux with powerlevel10k](./screenshots/tmux-powerlevel10k-130x20.png)
## tmux + nvim (astronvim) editing this repository
![screenshot of tmux showing nvim](./screenshots/tmux-astronvim-130x40.png)
![screenshot of tmux with nvim editing this repo](./screenshots/tmux-nvim.png)
## Interesting files and locations
### Interesting folders
| Path | Description |
|---------------------|----------------------------------------------|
| ------------------- | -------------------------------------------- |
| `.github` | GitHub Repository configuration files. |
| `hosts/{hostname}/` | Configs that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote. |
@@ -45,7 +39,7 @@ fork or download the repo as a zip and go from there with your own configs.
### dotfile folders
| Repo | Destination | Description |
|-----------|-------------|---------------------------------------------|
| --------- | ----------- | ------------------------------------------- |
| `base/` | `.*` | `$HOME` level files. |
| `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
@@ -62,7 +56,7 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
### XDG Variables
| Env | Default | Short description |
|--------------------|----------------------|------------------------------------------------|
| ------------------ | -------------------- | ---------------------------------------------- |
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
@@ -79,7 +73,7 @@ environment variable, at an appropriate place.
#### XDG_DATA_HOME (`$HOME/.local/share`)
`$XDG_DATA_HOME` defines the base directory relative to which
user-specific *data files* should be stored.
user-specific _data files_ should be stored.
If `$XDG_DATA_HOME` is either not set or empty,
a default equal to `$HOME/.local/share` should be used.
@@ -87,7 +81,7 @@ a default equal to `$HOME/.local/share` should be used.
#### XDG_CONFIG_HOME (`$HOME/.config`)
`$XDG_CONFIG_HOME` defines the base directory relative to which
user-specific *configuration files* should be stored.
user-specific _configuration files_ should be stored.
If `$XDG_CONFIG_HOME` is either not set or empty,
a default equal to `$HOME/.config` should be used.
@@ -95,13 +89,13 @@ a default equal to `$HOME/.config` should be used.
#### XDG_STATE_HOME (`$HOME/.local/state`)
`$XDG_STATE_HOME` defines the base directory relative to which
user-specific *state files* should be stored.
user-specific _state files_ should be stored.
If `$XDG_STATE_HOME` is either not set or empty,
a default equal to `$HOME/.local/state` should be used.
The `$XDG_STATE_HOME` contains *state data* that should
*persist between (application) restarts*, but that is not important or
The `$XDG_STATE_HOME` contains _state data_ that should
_persist between (application) restarts_, but that is not important or
portable enough to the user that it should be stored in `$XDG_DATA_HOME`.
- It may contain:

BIN
.github/screenshots/tmux-nvim.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -55,6 +55,60 @@ if [[ $(uname) == 'Darwin' ]]; then
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
fi
# Be nice
alias please="sudo "
! have eza && alias ls='ls --color=auto'
have eza && {
alias ls='eza -h -s=type --git --icons --group-directories-first'
}
# Easier navigation: .., ..., ....
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
# Colors for ls
alias ll="ls -l"
alias l="ls"
# Prevent common typos
alias cd..="cd .."
alias sl="ls"
# List only directories
alias lsd="ls -lF | grep '^d'"
# Recursively delete `.pyc` files
alias rmpyc="find . -type f -name '*.pyc' -ls -delete"
# Recursively delete `.DS_Store` files
alias rmds="find . -type f -name '*.DS_Store' -ls -delete"
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
# Show/hide hidden files in Finder
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder"
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false; killall Finder"
# Pipe public key to clipboard.
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
# Flush Directory Service cache
alias flush="dscacheutil -flushcache"
# Update locatedb
alias updatedb="sudo /usr/libexec/locate.updatedb"
# Always return full history
alias history="history 1"
alias pip="pip3 "
alias python="python3 "
# tmux: automatically attach or create session with name 'main'
alias tmux='tmux new-session -A -s main'
# tmux: attach or create new session

View File

@@ -67,15 +67,11 @@ x-default-antigen-bundles()
export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
# Add keychain to ssh-agent args when on macOS
have brew && zstyle :omz:plugins:ssh-agent ssh-add-args --apple-load-keychain
# these should be always available
antigen bundle tmux
antigen bundle colored-man-pages
antigen bundle command-not-found
antigen bundle ssh-agent
# antigen bundle MichaelAquilina/zsh-you-should-use
antigen bundle jreese/zsh-titles
antigen bundle unixorn/autoupdate-antigen.zshplugin
antigen bundle zsh-users/zsh-completions

View File

@@ -1,11 +1,11 @@
{
"LazyVim": { "branch": "main", "commit": "a72a84972d85e5bbc6b9d60a0983b37efef21b8a" },
"LuaSnip": { "branch": "master", "commit": "3657c3f3cb2214a681fc7e95b6ffb509d076ebfb" },
"SchemaStore.nvim": { "branch": "main", "commit": "7b115d9dca286192ffa5b2a254ff61a34006ac3e" },
"LuaSnip": { "branch": "master", "commit": "8efa4e402a24df6a4713a2ec653147c49e8f73de" },
"SchemaStore.nvim": { "branch": "main", "commit": "57b379a6f521eca8e955283c2886b6261c4e14e8" },
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
"bufferline.nvim": { "branch": "main", "commit": "9961d87bb3ec008213c46ba14b3f384a5f520eb5" },
"bufferline.nvim": { "branch": "main", "commit": "81cd04fe7c914d020d331cea1e707da5f14c2665" },
"catppuccin": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
@@ -13,6 +13,7 @@
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
"edgy.nvim": { "branch": "main", "commit": "4ccc1c67ae2b1a0c55f18c83d03b714e2bb1bae4" },
"flash.nvim": { "branch": "main", "commit": "8a8e74922a383c253b7f92e042b749150140c8d1" },
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
"gitsigns.nvim": { "branch": "main", "commit": "bce4576a9047085a528c479a7fe1e2f6b787b6c1" },
@@ -20,7 +21,7 @@
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "2451adb9bdb0fd32140bf3aa8dbc17ff60050db3" },
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
"mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" },
@@ -32,7 +33,7 @@
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "2d89ca96e08eb6e9c8e50e1bb4738bc5125c9f12" },
"neoconf.nvim": { "branch": "main", "commit": "b7cde4ba41eabf9bec9464c990bcf84a0fef4526" },
"neodev.nvim": { "branch": "main", "commit": "471324e6c746284dbbdc1d357799d1911bb7e120" },
"neodev.nvim": { "branch": "main", "commit": "53673d03258a4e4c49ab6ed621820510ac17e052" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"noice.nvim": { "branch": "main", "commit": "74c2902146b080035beb19944baf6f014a954720" },
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
@@ -43,7 +44,7 @@
"nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" },
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
"nvim-spectre": { "branch": "master", "commit": "97cfd1b0f5a6ab35979ce1bee6c17f54745fd1e5" },
"nvim-treesitter": { "branch": "master", "commit": "b4f6dd72980607a9821d24502b0ca7ee826376af" },
"nvim-treesitter": { "branch": "master", "commit": "c29d973c40f42fdf9823c2756c330fe7c8f7ca80" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" },
"nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" },
@@ -51,9 +52,11 @@
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
"stickybuf.nvim": { "branch": "master", "commit": "e3db41f2c1bb2df3ee6ff964ee74fe991f6f9566" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
"telescope.nvim": { "branch": "master", "commit": "b543aaa2c9cf8123ed2fe7dbb6c211a9cd415124" },
"telescope.nvim": { "branch": "master", "commit": "40c8d2fc2b729dd442eda093cf8c9496d6e23732" },
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
"toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
"transparent.nvim": { "branch": "main", "commit": "3af6232c8d39d51062702e875ff6407c1eeb0391" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" },
"venv-selector.nvim": { "branch": "main", "commit": "14d6e866070f759e9014a8053954f835294f56f9" },

View File

@@ -1,3 +1,19 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local keymap = vim.keymap.set
-- ╭──────────────────────────────────────────────────────────╮
-- │ Comment box │
-- ╰──────────────────────────────────────────────────────────╯
local cb = require("comment-box")
-- left aligned fixed size box with left aligned text
keymap({ "n", "v" }, "<Leader>bcb", cb.lbox, { desc = "Comment: Left aligned" })
-- centered adapted box with centered text
keymap({ "n", "v" }, "<Leader>bcc", cb.ccbox, { desc = "Comment: Centered" })
-- centered line
keymap("n", "<Leader>bcl", cb.cline, { desc = "Comment: Centered line" })
keymap("i", "<M-l>", cb.cline, { desc = "Comment: Centered line" })

View File

@@ -27,6 +27,7 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
@@ -40,7 +41,7 @@ require("lazy").setup({
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "catppuccin", "tokyonight", "habamax" } },
install = { colorscheme = { "catppuccin" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {

View File

@@ -80,7 +80,7 @@ return {
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User",
opts = {
accept_keymap = "<C-CR>",
accept_keymap = "<C-e>",
dismiss_keymap = "<C-Esc>",
},
},

View File

@@ -0,0 +1,47 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"php",
})
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"phpactor",
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
phpactor = {},
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
"williamboman/mason.nvim",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
table.insert(opts.ensure_installed, "php-debug-adapter")
end
end,
},
opts = function()
local dap = require("dap")
local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path()
dap.adapters.php = {
type = "executable",
command = "node",
args = { path .. "/extension/out/phpDebug.js" },
}
end,
},
}

View File

@@ -1,7 +1,10 @@
return {
"neovim/nvim-lspconfig",
opts = {
servers = { eslint = {} },
servers = {
eslint = {},
tflint = {},
},
setup = {
eslint = function()
require("lazyvim.util").on_attach(function(client)

View File

@@ -0,0 +1,9 @@
return {
-- A neovim lua plugin to help easily manage multiple terminal windows
-- https://github.com/akinsho/toggleterm.nvim
{
"akinsho/toggleterm.nvim",
version = "*",
config = true,
},
}

View File

@@ -14,6 +14,30 @@ return {
flavour = "mocha",
},
},
-- Remove all background colors to make nvim transparent
-- https://github.com/xiyaowong/transparent.nvim
{
"xiyaowong/transparent.nvim",
lazy = false,
enabled = true,
config = function()
vim.g.transparent_groups = vim.list_extend(
vim.g.transparent_groups or {},
vim.tbl_map(function(v)
return v.hl_group
end, vim.tbl_values(require("bufferline.config").highlights))
)
end,
},
-- A fancy, configurable, notification manager for NeoVim
-- https://github.com/rcarriga/nvim-notify
{
"rcarriga/nvim-notify",
opts = {
-- Set background color to black so transparent doesn't mess stuff up
background_colour = "#000000",
},
},
-- Getting you where you want with the fewest keystrokes.
-- https://github.com/ThePrimeagen/harpoon
{ "ThePrimeagen/harpoon" },

View File

@@ -14,6 +14,8 @@ packages=(
"bkt"
# a structural diff that understands syntax
"difftastic"
# a modern replacement for ls.
"eza"
# A simple, fast and user-friendly alternative to 'find'
"fd-find"
)

View File

@@ -38,6 +38,9 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
# echo "-> $DIRNAME ($d)"
SECTION_DIR="${TLDR_CHEAT_DEST}/$DIRNAME"
[ "$DIRNAME" = "common" ] && SECTION_DIR="${TLDR_CHEAT_DEST}"
TLDR_TAGS="tags: [$DIRNAME]"
if [ ! -d "$SECTION_DIR" ]; then
@@ -48,7 +51,7 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
BASENAME=$(basename "$FILE" .md)
FILENAME="${BASENAME%%.*}"
# echo "-> $FILE = $FILENAME"
TLDR_FILE="$SECTION_DIR/${FILENAME}"
TLDR_FILE="$SECTION_DIR/${BASENAME}"
# echo "-> dest: $TLDR_FILE"
# Update the original file for making the replacable value comparable

View File

@@ -41,7 +41,7 @@ done
msg "Installing completions for selected packages"
have git-profile && {
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/git-profile" \
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \
&& msg_yay "Installed completions for git-profile"
}