mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-06 00:49:35 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| af123e5138 | |||
| 3879289559 | |||
| 392628e733 | |||
| aa70eab5fb | |||
| e5311ca285 | |||
| d5618c9b5f | |||
| d091f5a88f | |||
| cb9195e3ad | |||
| c91cc387b6 |
@@ -8,6 +8,9 @@ indent_style = space
|
|||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = 100
|
||||||
|
|
||||||
[*.php]
|
[*.php]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
|||||||
10
.github/README.md
vendored
10
.github/README.md
vendored
@@ -6,10 +6,10 @@ aware of yet. As I find more interesting tools, configs and other stuff,
|
|||||||
this repository will live accordingly.
|
this repository will live accordingly.
|
||||||
|
|
||||||
Please for the love of everything good do not use these 1:1 as your own dotfiles,
|
Please for the love of everything good do not use these 1:1 as your own dotfiles,
|
||||||
fork or download the repo as a zip and go from there with your own configs.
|
fork or download the repository as a zip and go from there with your own configs.
|
||||||
|
|
||||||
It would be nice if you'd add an issue linking to your fork or repo so I can
|
It would be nice if you'd add an issue linking to your fork or repo so I can
|
||||||
see what interesing stuff you've done with it. Sharing is caring.
|
see what interesting stuff you've done with it. Sharing is caring.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@@ -28,9 +28,9 @@ see what interesing stuff you've done with it. Sharing is caring.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Interesting files and locations
|
## Interesting files and locations
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ see what interesing stuff you've done with it. Sharing is caring.
|
|||||||
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
||||||
| `ssh/` | `.ssh/` | SSH Configurations. |
|
| `ssh/` | `.ssh/` | SSH Configurations. |
|
||||||
|
|
||||||
### dfm - the dotfiles manager
|
### `dfm` - the dotfiles manager
|
||||||
|
|
||||||
[`.local/bin/dfm`][dfm] is a shell script that has some tools that help with dotfiles management.
|
[`.local/bin/dfm`][dfm] is a shell script that has some tools that help with dotfiles management.
|
||||||
|
|
||||||
|
|||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -23,10 +23,6 @@
|
|||||||
path = config/tmux/plugins/tmux-continuum
|
path = config/tmux/plugins/tmux-continuum
|
||||||
url = https://github.com/tmux-plugins/tmux-continuum
|
url = https://github.com/tmux-plugins/tmux-continuum
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "tmux/tmux-resurrect"]
|
|
||||||
path = config/tmux/plugins/tmux-resurrect
|
|
||||||
url = https://github.com/tmux-plugins/tmux-resurrect
|
|
||||||
ignore = dirty
|
|
||||||
[submodule "tmux/tmux-sensible"]
|
[submodule "tmux/tmux-sensible"]
|
||||||
path = config/tmux/plugins/tmux-sensible
|
path = config/tmux/plugins/tmux-sensible
|
||||||
url = https://github.com/tmux-plugins/tmux-sensible.git
|
url = https://github.com/tmux-plugins/tmux-sensible.git
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ git submodule add --name tmux/tmux-continuum \
|
|||||||
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
||||||
git submodule add --name tmux/tmux-mode-indicator \
|
git submodule add --name tmux/tmux-mode-indicator \
|
||||||
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
||||||
git submodule add --name tmux/tmux-resurrect \
|
|
||||||
-f https://github.com/tmux-plugins/tmux-resurrect config/tmux/plugins/tmux-resurrect
|
|
||||||
git submodule add --name tmux/tmux-sensible \
|
git submodule add --name tmux/tmux-sensible \
|
||||||
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
||||||
git submodule add --name tmux/tmux-sessionist \
|
git submodule add --name tmux/tmux-sessionist \
|
||||||
@@ -49,6 +47,7 @@ done
|
|||||||
[ -d "config/tmux/plugins/tpm" ] && rm -rf config/tmux/plugins/tpm
|
[ -d "config/tmux/plugins/tpm" ] && rm -rf config/tmux/plugins/tpm
|
||||||
[ -d "config/tmux/plugins/tmux" ] && rm -rf config/tmux/plugins/tmux
|
[ -d "config/tmux/plugins/tmux" ] && rm -rf config/tmux/plugins/tmux
|
||||||
[ -d "config/tmux/plugins/tmux-menus" ] && rm -rf config/tmux/plugins/tmux-menus
|
[ -d "config/tmux/plugins/tmux-menus" ] && rm -rf config/tmux/plugins/tmux-menus
|
||||||
|
[ -d "config/tmux/plugins/tmux-resurrect" ] && rm -rf config/tmux/plugins/tmux-resurrect
|
||||||
[ -d "tools/dotbot-crontab" ] && rm -rf tools/dotbot-crontab
|
[ -d "tools/dotbot-crontab" ] && rm -rf tools/dotbot-crontab
|
||||||
[ -d "tools/dotbot-snap" ] && rm -rf tools/dotbot-snap
|
[ -d "tools/dotbot-snap" ] && rm -rf tools/dotbot-snap
|
||||||
[ -d "config/nvim-kickstart" ] && rm -rf config/nvim-kickstart
|
[ -d "config/nvim-kickstart" ] && rm -rf config/nvim-kickstart
|
||||||
|
|||||||
43
base/bashrc
43
base/bashrc
@@ -14,10 +14,45 @@ source "$DOTFILES/config/shared.sh"
|
|||||||
# Import ssh keys in keychain
|
# Import ssh keys in keychain
|
||||||
ssh-add -A 2>/dev/null
|
ssh-add -A 2>/dev/null
|
||||||
|
|
||||||
x-have oh-my-posh && {
|
|
||||||
eval "$(oh-my-posh init bash --config "$DOTFILES/config/omp/own.toml")"
|
|
||||||
}
|
|
||||||
|
|
||||||
x-have antidot && {
|
x-have antidot && {
|
||||||
eval "$(antidot init)"
|
eval "$(antidot init)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm* | rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
x-have oh-my-posh && {
|
||||||
|
eval "$(oh-my-posh init bash --config "$DOTFILES/config/omp/own.toml")"
|
||||||
|
}
|
||||||
|
|||||||
35
base/zshrc → base/zshenv
Executable file → Normal file
35
base/zshrc → base/zshenv
Executable file → Normal file
@@ -1,4 +1,5 @@
|
|||||||
# this is my zsh config. there are many like it, but this one is mine.
|
# this is my zsh config. there are many like it, but this one is mine.
|
||||||
|
# https://zsh.sourceforge.io/Intro/intro_3.html
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
# export VERBOSE=1
|
# export VERBOSE=1
|
||||||
@@ -10,6 +11,16 @@ export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim/mason/bin:$L
|
|||||||
export SHARED_SCRIPTS_SOURCED=0
|
export SHARED_SCRIPTS_SOURCED=0
|
||||||
|
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
|
||||||
|
|
||||||
|
export ZDOTDIR="$DOTFILES/zsh"
|
||||||
|
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
eval "$(oh-my-posh init zsh --config "$DOTFILES/config/omp/own.toml")"
|
eval "$(oh-my-posh init zsh --config "$DOTFILES/config/omp/own.toml")"
|
||||||
|
|
||||||
@@ -54,8 +65,9 @@ load_antigen()
|
|||||||
antigen bundle colored-man-pages
|
antigen bundle colored-man-pages
|
||||||
antigen bundle zsh-users/zsh-completions
|
antigen bundle zsh-users/zsh-completions
|
||||||
x-have eza && antigen bundle eza
|
x-have eza && antigen bundle eza
|
||||||
|
x-have tms && antigen bundle yuki-ycino/tms
|
||||||
|
|
||||||
# this needs to be the last item
|
# this needs to be the last bundle
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
antigen apply
|
antigen apply
|
||||||
fi
|
fi
|
||||||
@@ -87,19 +99,16 @@ setup_tmux_window_name_plugin()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
load_antigen
|
||||||
{
|
source_fzf_config
|
||||||
load_antigen
|
setup_tmux_window_name_plugin
|
||||||
source_fzf_config
|
if x-have antidot; then
|
||||||
setup_tmux_window_name_plugin
|
eval "$(antidot init)"
|
||||||
if x-have antidot; then
|
fi
|
||||||
eval "$(antidot init)"
|
|
||||||
fi
|
|
||||||
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
|
|
||||||
# Lando
|
# Lando
|
||||||
export PATH="$HOME/.lando/bin${PATH+:$PATH}"; #landopath
|
export PATH="$HOME/.lando/bin${PATH+:$PATH}"; #landopath
|
||||||
|
|
||||||
|
autoload -Uz compinit bashcompinit
|
||||||
|
compinit -d $ZSH_COMPDUMP
|
||||||
|
bashcompinit
|
||||||
@@ -2,3 +2,4 @@ ansible
|
|||||||
pipenv
|
pipenv
|
||||||
semgrep
|
semgrep
|
||||||
neovim
|
neovim
|
||||||
|
libtmux
|
||||||
|
|||||||
@@ -14,22 +14,21 @@
|
|||||||
# if DOTFILES is not set, set it to the default location
|
# if DOTFILES is not set, set it to the default location
|
||||||
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
|
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
|
||||||
|
|
||||||
|
# zsh completions directory
|
||||||
|
[ -z "$ZSH_COMPLETIONS" ] && export ZSH_COMPLETIONS="$XDG_CONFIG_HOME/zsh/completion"
|
||||||
|
|
||||||
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
||||||
|
|
||||||
# Load bash completions if available for zsh
|
# Add zsh completions to FPATH, compinit will be called later
|
||||||
if [[ -n "$ZSH_VERSION" ]]; then
|
FPATH="$ZSH_COMPLETIONS:$FPATH"
|
||||||
autoload bashcompinit
|
|
||||||
bashcompinit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load asdf
|
# Load asdf
|
||||||
export ASDF_DIR="$XDG_BIN_HOME/asdf"
|
export ASDF_DIR="$XDG_BIN_HOME/asdf"
|
||||||
if [[ -d $ASDF_DIR ]]; then
|
if [[ -d $ASDF_DIR ]]; then
|
||||||
[[ -d $ASDF_DIR/completions ]] && fpath=("$ASDF_DIR/completions" $fpath)
|
[[ -d $ASDF_DIR/completions ]] && FPATH="$ASDF_DIR/completions:$FPATH"
|
||||||
[[ -d $ASDF_DIR/plugins ]] && fpath=("$ASDF_DIR/plugins" $fpath)
|
[[ -d $ASDF_DIR/plugins ]] && FPATH="$ASDF_DIR/plugins:$FPATH"
|
||||||
source "$ASDF_DIR/asdf.sh"
|
source "$ASDF_DIR/asdf.sh"
|
||||||
fi
|
fi
|
||||||
export PATH="$ASDF_DIR/bin:$ASDF_DIR/shims:$PATH"
|
|
||||||
|
|
||||||
if ! command -v msg &> /dev/null; then
|
if ! command -v msg &> /dev/null; then
|
||||||
# Function to print messages if VERBOSE is enabled
|
# Function to print messages if VERBOSE is enabled
|
||||||
@@ -124,7 +123,7 @@ preexec()
|
|||||||
dfu()
|
dfu()
|
||||||
{
|
{
|
||||||
(
|
(
|
||||||
cd "$DOTFILES" && git pull --ff-only && ./install
|
cd "$DOTFILES" && git rebase --ff --autostash && ./install
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ brew "aspell"
|
|||||||
brew "autoconf"
|
brew "autoconf"
|
||||||
# Collection of over 500 reusable autoconf macros
|
# Collection of over 500 reusable autoconf macros
|
||||||
brew "autoconf-archive"
|
brew "autoconf-archive"
|
||||||
|
# Cryptographic recipes and primitives for Python
|
||||||
|
brew "cryptography"
|
||||||
|
# Official Amazon AWS command-line interface
|
||||||
|
brew "awscli"
|
||||||
# Bourne-Again SHell, a UNIX command interpreter
|
# Bourne-Again SHell, a UNIX command interpreter
|
||||||
brew "bash"
|
brew "bash"
|
||||||
# GNU multiple precision arithmetic library
|
# GNU multiple precision arithmetic library
|
||||||
@@ -71,8 +75,6 @@ brew "gettext"
|
|||||||
brew "glib"
|
brew "glib"
|
||||||
# Mozilla CA bundle for Python
|
# Mozilla CA bundle for Python
|
||||||
brew "certifi"
|
brew "certifi"
|
||||||
# Cryptographic recipes and primitives for Python
|
|
||||||
brew "cryptography"
|
|
||||||
# Get a file from an HTTP, HTTPS or FTP server
|
# Get a file from an HTTP, HTTPS or FTP server
|
||||||
brew "curl"
|
brew "curl"
|
||||||
# Lightweight DNS forwarder and DHCP server
|
# Lightweight DNS forwarder and DHCP server
|
||||||
@@ -85,6 +87,12 @@ brew "freetds"
|
|||||||
brew "gd"
|
brew "gd"
|
||||||
# GitHub command-line tool
|
# GitHub command-line tool
|
||||||
brew "gh"
|
brew "gh"
|
||||||
|
# OpenType text shaping engine
|
||||||
|
brew "harfbuzz"
|
||||||
|
# Secure hashing function
|
||||||
|
brew "libb2"
|
||||||
|
# Framework for layout and rendering of i18n text
|
||||||
|
brew "pango"
|
||||||
# Distributed revision control system
|
# Distributed revision control system
|
||||||
brew "git"
|
brew "git"
|
||||||
# Render markdown on the CLI
|
# Render markdown on the CLI
|
||||||
@@ -97,12 +105,6 @@ brew "gnutls"
|
|||||||
brew "gnupg"
|
brew "gnupg"
|
||||||
# Image manipulation
|
# Image manipulation
|
||||||
brew "netpbm"
|
brew "netpbm"
|
||||||
# C/C++ and Java libraries for Unicode and globalization
|
|
||||||
brew "icu4c"
|
|
||||||
# OpenType text shaping engine
|
|
||||||
brew "harfbuzz"
|
|
||||||
# Framework for layout and rendering of i18n text
|
|
||||||
brew "pango"
|
|
||||||
# Library to render SVG files using Cairo
|
# Library to render SVG files using Cairo
|
||||||
brew "librsvg"
|
brew "librsvg"
|
||||||
# Graph visualization software from AT&T and Bell Labs
|
# Graph visualization software from AT&T and Bell Labs
|
||||||
@@ -127,8 +129,6 @@ brew "json-c"
|
|||||||
brew "krb5"
|
brew "krb5"
|
||||||
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
||||||
brew "legitify"
|
brew "legitify"
|
||||||
# Secure hashing function
|
|
||||||
brew "libb2"
|
|
||||||
# Postgres C API library
|
# Postgres C API library
|
||||||
brew "libpq"
|
brew "libpq"
|
||||||
# Multi-platform support library with a focus on asynchronous I/O
|
# Multi-platform support library with a focus on asynchronous I/O
|
||||||
@@ -143,10 +143,14 @@ brew "m-cli"
|
|||||||
brew "nginx"
|
brew "nginx"
|
||||||
# Port scanning utility for large networks
|
# Port scanning utility for large networks
|
||||||
brew "nmap"
|
brew "nmap"
|
||||||
|
# Libraries for security-enabled client and server applications
|
||||||
|
brew "nss"
|
||||||
# Open source suite of directory software
|
# Open source suite of directory software
|
||||||
brew "openldap"
|
brew "openldap"
|
||||||
# General-purpose scripting language
|
# General-purpose scripting language
|
||||||
brew "php"
|
brew "php"
|
||||||
|
# General-purpose scripting language
|
||||||
|
brew "php@8.2"
|
||||||
# Manage compile and link flags for libraries
|
# Manage compile and link flags for libraries
|
||||||
brew "pkg-config"
|
brew "pkg-config"
|
||||||
# Send macOS User Notifications from the command-line
|
# Send macOS User Notifications from the command-line
|
||||||
@@ -204,6 +208,8 @@ cask "font-open-sans"
|
|||||||
cask "font-roboto"
|
cask "font-roboto"
|
||||||
cask "font-source-code-pro"
|
cask "font-source-code-pro"
|
||||||
cask "font-source-code-pro-for-powerline"
|
cask "font-source-code-pro-for-powerline"
|
||||||
|
cask "font-source-sans-pro"
|
||||||
|
cask "font-source-serif-pro"
|
||||||
# GIT client
|
# GIT client
|
||||||
cask "fork"
|
cask "fork"
|
||||||
# HTTP and GraphQL Client
|
# HTTP and GraphQL Client
|
||||||
|
|||||||
@@ -15,3 +15,6 @@ trim_trailing_whitespace = true
|
|||||||
[*.md]
|
[*.md]
|
||||||
max_line_length = off
|
max_line_length = off
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.json]
|
||||||
|
max_line_length = off
|
||||||
|
|||||||
@@ -51,4 +51,21 @@ autocmd('FileType', {
|
|||||||
callback = function(event) vim.bo[event.buf].buflisted = false end,
|
callback = function(event) vim.bo[event.buf].buflisted = false end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- ── wrap and check for spell in text filetypes ──────────────────────
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
group = augroup('wrap_spell', { clear = true }),
|
||||||
|
pattern = { 'text', 'plaintex', 'typst', 'gitcommit', 'markdown' },
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.wrap = true
|
||||||
|
vim.opt_local.spell = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- ── Fix conceallevel for json files ─────────────────────────────────
|
||||||
|
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||||
|
group = augroup('json_conceal', { clear = true }),
|
||||||
|
pattern = { 'json', 'jsonc', 'json5' },
|
||||||
|
callback = function() vim.opt_local.conceallevel = 0 end,
|
||||||
|
})
|
||||||
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ vim.g.colors_variant_dark = 'tokyonight-storm'
|
|||||||
-- Make sure editorconfig support is enabled
|
-- Make sure editorconfig support is enabled
|
||||||
vim.g.editorconfig = true
|
vim.g.editorconfig = true
|
||||||
|
|
||||||
|
-- Enable the colorcolumn
|
||||||
|
vim.api.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
||||||
|
|
||||||
-- Enable line numbers and relative line numbers
|
-- Enable line numbers and relative line numbers
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|||||||
@@ -1,49 +1,45 @@
|
|||||||
-- ── Formatting ──────────────────────────────────────────────────────
|
-- ── Formatting ──────────────────────────────────────────────────────
|
||||||
-- Lightweight yet powerful formatter plugin for Neovim
|
-- Lightweight yet powerful formatter plugin for Neovim
|
||||||
-- https://github.com/stevearc/conform.nvim
|
-- https://github.com/stevearc/conform.nvim
|
||||||
return {
|
|
||||||
'stevearc/conform.nvim',
|
|
||||||
event = { 'BufWritePre' },
|
|
||||||
cmd = { 'ConformInfo' },
|
|
||||||
config = function()
|
|
||||||
-- Select first conform formatter that is available
|
|
||||||
---@param bufnr integer
|
|
||||||
---@param ... string
|
|
||||||
---@return string
|
|
||||||
local function first(bufnr, ...)
|
|
||||||
local conform = require 'conform'
|
|
||||||
for i = 1, select('#', ...) do
|
|
||||||
local formatter = select(i, ...)
|
|
||||||
if conform.get_formatter_info(formatter, bufnr).available then
|
|
||||||
return formatter
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return select(1, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
require('conform').setup {
|
return {
|
||||||
|
{
|
||||||
|
'stevearc/conform.nvim',
|
||||||
|
event = { 'BufWritePre' },
|
||||||
|
cmd = { 'ConformInfo' },
|
||||||
|
opts = {
|
||||||
-- Enable or disable logging
|
-- Enable or disable logging
|
||||||
notify_on_error = true,
|
notify_on_error = false,
|
||||||
-- Set the default formatter for all filetypes
|
-- Set the default formatter for all filetypes
|
||||||
default_formatter = 'injected',
|
default_formatter = 'injected',
|
||||||
-- Set the default formatter for all filetypes
|
-- Set the default formatter for all filetypes
|
||||||
default_formatter_opts = {
|
default_formatter_opts = {
|
||||||
lsp_format = 'fallback',
|
lsp_format = 'fallback',
|
||||||
-- Set the default formatter for all filetypes
|
-- Set the default formatter for all filetypes
|
||||||
-- formatter = 'injected',
|
formatter = 'injected',
|
||||||
-- Set the default formatter for all filetypes
|
-- Set the default formatter for all filetypes
|
||||||
-- formatter_opts = {},
|
-- formatter_opts = {},
|
||||||
},
|
},
|
||||||
|
-- The options you set here will be merged with the builtin formatters.
|
||||||
|
-- You can also define any custom formatters here.
|
||||||
|
formatters = {
|
||||||
|
injected = { options = { ignore_errors = true } },
|
||||||
|
-- # Example of using dprint only when a dprint.json file is present
|
||||||
|
-- dprint = {
|
||||||
|
-- condition = function(ctx)
|
||||||
|
-- return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1]
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
--
|
||||||
|
-- # Example of using shfmt with extra args
|
||||||
|
-- shfmt = {
|
||||||
|
-- prepend_args = { "-i", "2", "-ci" },
|
||||||
|
-- },
|
||||||
|
},
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
markdown = function(bufnr)
|
|
||||||
return { first(bufnr, 'prettierd', 'prettier'), 'injected' }
|
|
||||||
end,
|
|
||||||
javascript = function(bufnr)
|
|
||||||
return { first(bufnr, 'prettier', 'eslint'), 'injected' }
|
|
||||||
end,
|
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
-- Conform will run multiple formatters sequentially
|
-- Conform will run multiple formatters sequentially
|
||||||
-- python = { 'isort', 'black', lsp_format = 'fallback' },
|
go = { 'goimports', 'gofmt' },
|
||||||
-- You can customize some of the format options for the filetype (:help conform.format)
|
-- You can customize some of the format options for the filetype (:help conform.format)
|
||||||
-- rust = { 'rustfmt', lsp_format = 'fallback' },
|
-- rust = { 'rustfmt', lsp_format = 'fallback' },
|
||||||
},
|
},
|
||||||
@@ -59,9 +55,7 @@ return {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Disable with a global or buffer-local variable
|
-- Disable with a global or buffer-local variable
|
||||||
if
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat
|
|
||||||
then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Disable autoformat for files in a certain path
|
-- Disable autoformat for files in a certain path
|
||||||
@@ -73,12 +67,20 @@ return {
|
|||||||
|
|
||||||
return { timeout_ms = 500, lsp_format = 'fallback' }
|
return { timeout_ms = 500, lsp_format = 'fallback' }
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
end,
|
init = function()
|
||||||
init = function()
|
-- If you want the formatexpr, here is the place to set it
|
||||||
-- If you want the formatexpr, here is the place to set it
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
end,
|
||||||
end,
|
},
|
||||||
|
-- Automatically install formatters registered with conform.nvim via mason.nvim
|
||||||
|
-- https://github.com/zapling/mason-conform.nvim
|
||||||
|
{
|
||||||
|
'zapling/mason-conform.nvim',
|
||||||
|
depends = {
|
||||||
|
'stevearc/conform.nvim',
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ return {
|
|||||||
hide_preview = false,
|
hide_preview = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
|
-- These two configs can also be passed down to the goto-preview definition
|
||||||
|
-- and implementation calls for one off "peak" functionality.
|
||||||
focus_on_open = true, -- Focus the floating window when opening it.
|
focus_on_open = true, -- Focus the floating window when opening it.
|
||||||
dismiss_on_move = false, -- Dismiss the floating window when moving the cursor.
|
dismiss_on_move = false, -- Dismiss the floating window when moving the cursor.
|
||||||
force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close
|
force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close
|
||||||
|
|||||||
@@ -16,6 +16,28 @@ return {
|
|||||||
local builtin = require 'statuscol.builtin'
|
local builtin = require 'statuscol.builtin'
|
||||||
require('statuscol').setup {
|
require('statuscol').setup {
|
||||||
relculright = true,
|
relculright = true,
|
||||||
|
ft_ignore = {
|
||||||
|
'dashboard',
|
||||||
|
'NvimTree',
|
||||||
|
'help',
|
||||||
|
'vim',
|
||||||
|
'alpha',
|
||||||
|
'dashboard',
|
||||||
|
'neo-tree',
|
||||||
|
'Trouble',
|
||||||
|
'lazy',
|
||||||
|
'toggleterm',
|
||||||
|
},
|
||||||
|
bt_ignore = {
|
||||||
|
'help',
|
||||||
|
'vim',
|
||||||
|
'alpha',
|
||||||
|
'dashboard',
|
||||||
|
'neo-tree',
|
||||||
|
'Trouble',
|
||||||
|
'lazy',
|
||||||
|
'toggleterm',
|
||||||
|
},
|
||||||
segments = {
|
segments = {
|
||||||
{
|
{
|
||||||
text = { builtin.foldfunc },
|
text = { builtin.foldfunc },
|
||||||
@@ -41,7 +63,7 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities.textDocument.foldingRange = {
|
capabilities.textDocument.foldingRange = {
|
||||||
dynamicRegistration = false,
|
dynamicRegistration = true,
|
||||||
lineFoldingOnly = true,
|
lineFoldingOnly = true,
|
||||||
}
|
}
|
||||||
local language_servers = require('lspconfig').util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
|
local language_servers = require('lspconfig').util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
|
||||||
@@ -84,7 +106,13 @@ return {
|
|||||||
---@param width number The width of the window.
|
---@param width number The width of the window.
|
||||||
---@param truncate function Truncate function
|
---@param truncate function Truncate function
|
||||||
---@return table
|
---@return table
|
||||||
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
fold_virt_text_handler = function(
|
||||||
|
virtText,
|
||||||
|
lnum,
|
||||||
|
endLnum,
|
||||||
|
width,
|
||||||
|
truncate
|
||||||
|
)
|
||||||
local newVirtText = {}
|
local newVirtText = {}
|
||||||
local suffix = (' %d '):format(endLnum - lnum)
|
local suffix = (' %d '):format(endLnum - lnum)
|
||||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Extensible Neovim Scrollbar
|
-- A neovim plugin that shows colorcolumn dynamically
|
||||||
-- https://github.com/petertriho/nvim-scrollbar
|
-- https://github.com/Bekaboo/deadcolumn.nvim
|
||||||
{ 'petertriho/nvim-scrollbar', opts = {} },
|
{ 'Bekaboo/deadcolumn.nvim' },
|
||||||
|
|
||||||
-- vim dashboard
|
-- vim dashboard
|
||||||
-- https://github.com/nvimdev/dashboard-nvim
|
-- https://github.com/nvimdev/dashboard-nvim
|
||||||
@@ -110,25 +110,64 @@ return {
|
|||||||
{
|
{
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
main = 'ibl',
|
main = 'ibl',
|
||||||
config = function()
|
opts = {
|
||||||
require('ibl').setup {
|
scope = { show_start = false, show_end = false },
|
||||||
indent = {
|
indent = {
|
||||||
char = '│',
|
char = '│',
|
||||||
|
tab_char = '│',
|
||||||
|
},
|
||||||
|
exclude = {
|
||||||
|
filetypes = {
|
||||||
|
'Trouble',
|
||||||
|
'alpha',
|
||||||
|
'dashboard',
|
||||||
|
'help',
|
||||||
|
'lazy',
|
||||||
|
'lazyterm',
|
||||||
|
'mason',
|
||||||
|
'neo-tree',
|
||||||
|
'notify',
|
||||||
|
'terminal',
|
||||||
|
'toggleterm',
|
||||||
|
'trouble',
|
||||||
},
|
},
|
||||||
exclude = {
|
buftypes = { 'dashboard' },
|
||||||
filetypes = { 'terminal', 'dashboard' },
|
},
|
||||||
buftypes = { 'dashboard' },
|
},
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
-- Display a character as the colorcolumn
|
||||||
|
-- https://github.com/lukas-reineke/virt-column.nvim
|
||||||
|
{ 'lukas-reineke/virt-column.nvim', opts = {} },
|
||||||
|
|
||||||
|
-- icons
|
||||||
|
{
|
||||||
|
'echasnovski/mini.icons',
|
||||||
|
opts = {
|
||||||
|
file = {
|
||||||
|
['.keep'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||||
|
['devcontainer.json'] = { glyph = '', hl = 'MiniIconsAzure' },
|
||||||
|
},
|
||||||
|
filetype = {
|
||||||
|
dotenv = { glyph = '', hl = 'MiniIconsYellow' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
package.preload['nvim-web-devicons'] = function()
|
||||||
|
require('mini.icons').mock_nvim_web_devicons()
|
||||||
|
return package.loaded['nvim-web-devicons']
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- ui components
|
||||||
|
{ 'MunifTanjim/nui.nvim', lazy = true },
|
||||||
|
|
||||||
-- Git integration for buffers
|
-- Git integration for buffers
|
||||||
-- https://github.com/lewis6991/gitsigns.nvim
|
-- https://github.com/lewis6991/gitsigns.nvim
|
||||||
{
|
{
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
version = false,
|
version = false,
|
||||||
lazy = false,
|
|
||||||
opts = {
|
opts = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = '+' },
|
add = { text = '+' },
|
||||||
@@ -174,6 +213,7 @@ return {
|
|||||||
'TmuxNavigateRight',
|
'TmuxNavigateRight',
|
||||||
'TmuxNavigatePrevious',
|
'TmuxNavigatePrevious',
|
||||||
},
|
},
|
||||||
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Cloak allows you to overlay *'s over defined patterns in defined files.
|
-- Cloak allows you to overlay *'s over defined patterns in defined files.
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ return {
|
|||||||
{
|
{
|
||||||
'<leader>cf',
|
'<leader>cf',
|
||||||
'<cmd>lua require("conform").format({ async = true, lsp_fallback = true })<cr>',
|
'<cmd>lua require("conform").format({ async = true, lsp_fallback = true })<cr>',
|
||||||
mode = { 'n', 'v' },
|
mode = {},
|
||||||
desc = 'Format buffer',
|
desc = 'Format buffer with Conform',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'<leader>ci',
|
'<leader>ci',
|
||||||
@@ -509,7 +509,7 @@ return {
|
|||||||
},
|
},
|
||||||
|
|
||||||
-- ── Old habits ──────────────────────────────────────────────────────
|
-- ── Old habits ──────────────────────────────────────────────────────
|
||||||
{ '<C-s>', '<cmd>w<CR>', desc = 'Save file' },
|
{ '<C-s>', '<cmd>w!<CR>', desc = 'Save file' },
|
||||||
|
|
||||||
-- ── Text manipulation in visual mode ────────────────────────────────
|
-- ── Text manipulation in visual mode ────────────────────────────────
|
||||||
{
|
{
|
||||||
|
|||||||
Submodule config/tmux/plugins/tmux-resurrect deleted from e87d7d592c
@@ -147,16 +147,12 @@ set -g @tmux_window_name_max_name_len "20"
|
|||||||
set -g @tmux_window_name_use_tilde "True"
|
set -g @tmux_window_name_use_tilde "True"
|
||||||
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh', 'oh-my-posh']"
|
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh', 'oh-my-posh']"
|
||||||
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
|
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
|
||||||
set -g @tmux_window_name_ignored_programs "['sqlite3', 'x-set-php-aliases', 'oh-my-posh', 'antidot', 'direnv']" # Default is []
|
set -g @tmux_window_name_ignored_programs "['sqlite3', 'oh-my-posh', 'antidot', 'direnv']" # Default is []
|
||||||
set -g @tmux_window_name_substitute_sets "[('.+ipython2', 'ipython2'), ('.+ipython3', 'ipython3'), ('.+\.local', '.local'), ('.+asdf', 'asdf')]"
|
set -g @tmux_window_name_substitute_sets "[('.+ipython2', 'ipython2'), ('.+ipython3', 'ipython3'), ('.+\.local', '.local'), ('.+asdf', 'asdf')]"
|
||||||
|
|
||||||
## https://github.com/tmux-plugins/tmux-continuum
|
## https://github.com/tmux-plugins/tmux-continuum
|
||||||
# set -g @continuum-restore 'on'
|
# set -g @continuum-restore 'on'
|
||||||
|
|
||||||
## https://github.com/tmux-plugins/tmux-resurrect
|
|
||||||
# set -g @resurrect-strategy-nvim 'session'
|
|
||||||
# set -g @resurrect-dir '~/.local/state/tmux/tmux-resurrect'
|
|
||||||
|
|
||||||
## https://github.com/MunifTanjim/tmux-mode-indicator
|
## https://github.com/MunifTanjim/tmux-mode-indicator
|
||||||
set -g @mode_indicator_prefix_mode_style 'bg=default,fg=#7aa2f7'
|
set -g @mode_indicator_prefix_mode_style 'bg=default,fg=#7aa2f7'
|
||||||
set -g @mode_indicator_copy_mode_style 'bg=default,fg=yellow'
|
set -g @mode_indicator_copy_mode_style 'bg=default,fg=yellow'
|
||||||
@@ -169,7 +165,6 @@ set -g @mode_indicator_sync_mode_style 'bg=default,fg=red'
|
|||||||
|
|
||||||
run-shell ~/.dotfiles/config/tmux/plugins/tmux-sensible/sensible.tmux
|
run-shell ~/.dotfiles/config/tmux/plugins/tmux-sensible/sensible.tmux
|
||||||
run-shell ~/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name.tmux
|
run-shell ~/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name.tmux
|
||||||
# run-shell ~/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux
|
|
||||||
# run-shell ~/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux
|
# run-shell ~/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux
|
||||||
# run-shell ~/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux
|
# run-shell ~/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux
|
||||||
run-shell ~/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux
|
run-shell ~/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux
|
||||||
|
|||||||
Reference in New Issue
Block a user