summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2026-02-07 15:22:40 +0100
committerfilip <“filip.rabiega@gmail.com”>2026-02-07 15:22:40 +0100
commit6b8a7509fe55ab3d70506a17d2b03560d73388d6 (patch)
tree8dee9a7ebd9402685e89836ddc594dd57bd4ab7b
parent1366ab975159e57a0ebd2bdd76d8c8bf26c77f19 (diff)
downloaddotfiles-6b8a7509fe55ab3d70506a17d2b03560d73388d6.tar.gz
dotfiles-6b8a7509fe55ab3d70506a17d2b03560d73388d6.tar.bz2
dotfiles-6b8a7509fe55ab3d70506a17d2b03560d73388d6.zip
new stuff
-rw-r--r--.config/nvim/init.lua162
-rw-r--r--.config/shell/.zshrc21
-rw-r--r--.config/shell/envvarrc34
-rw-r--r--.config/shell/temp6
4 files changed, 112 insertions, 111 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index f241c57..f100cd6 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -5,73 +5,73 @@
------------------------------------------------------------
-- General / UI settings
------------------------------------------------------------
-vim.opt.number = true
+vim.opt.number = true
vim.opt.relativenumber = true
-vim.opt.title = true
-vim.opt.background = "dark"
-vim.opt.laststatus = 2
-vim.opt.showmode = true
-vim.opt.showcmd = false
-vim.opt.ruler = true
-vim.opt.cursorline = true
+vim.opt.title = true
+vim.opt.background = "dark"
+vim.opt.laststatus = 2
+vim.opt.showmode = true
+vim.opt.showcmd = false
+vim.opt.ruler = true
+vim.opt.cursorline = true
-- Modern / visual quality
-vim.opt.termguicolors = true
-vim.opt.signcolumn = "yes"
-vim.opt.pumblend = 10
-vim.opt.winblend = 10
+vim.opt.termguicolors = true
+vim.opt.signcolumn = "yes"
+vim.opt.pumblend = 10
+vim.opt.winblend = 10
------------------------------------------------------------
-- Window / split behavior
------------------------------------------------------------
-vim.opt.splitbelow = true
-vim.opt.splitright = true
+vim.opt.splitbelow = true
+vim.opt.splitright = true
------------------------------------------------------------
-- Timing & performance related
------------------------------------------------------------
-vim.opt.updatetime = 50
-vim.opt.timeoutlen = 400
-vim.opt.ttimeoutlen = 10
+vim.opt.updatetime = 50
+vim.opt.timeoutlen = 400
+vim.opt.ttimeoutlen = 10
------------------------------------------------------------
-- Backup, swap, undo
------------------------------------------------------------
-vim.opt.undofile = true
-vim.opt.swapfile = false
-vim.opt.backup = false
-vim.opt.writebackup = false
+vim.opt.undofile = true
+vim.opt.swapfile = false
+vim.opt.backup = false
+vim.opt.writebackup = false
------------------------------------------------------------
-- Search and highlighting
------------------------------------------------------------
-vim.opt.hlsearch = false
-vim.opt.ignorecase = true
-vim.opt.smartcase = true
-vim.opt.incsearch = true
-vim.opt.wildignore = { "*.o", "*.obj", "*.bak", "*.exe" }
+vim.opt.hlsearch = false
+vim.opt.ignorecase = true
+vim.opt.smartcase = true
+vim.opt.incsearch = true
+vim.opt.wildignore = { "*.o", "*.obj", "*.bak", "*.exe" }
------------------------------------------------------------
-- Indentation and formatting
------------------------------------------------------------
-vim.opt.autoindent = true
-vim.opt.cindent = true
-vim.opt.smartindent = true
-vim.opt.wrap = false
-vim.opt.scrolloff = 5
-vim.opt.completeopt = { "menuone", "noinsert" }
+vim.opt.autoindent = true
+vim.opt.cindent = true
+vim.opt.smartindent = true
+vim.opt.wrap = false
+vim.opt.scrolloff = 5
+vim.opt.completeopt = { "menuone", "noinsert" }
------------------------------------------------------------
-- Clipboard and mouse
------------------------------------------------------------
vim.opt.clipboard:append("unnamedplus")
-vim.opt.mouse = "a"
+vim.opt.mouse = "a"
------------------------------------------------------------
-- Session and history (shada = viminfo replacement)
------------------------------------------------------------
-vim.opt.shada = "'100,<50,s10,h"
-vim.opt.shadafile = vim.fn.expand("~/.local/state/nvim/shada/main.shada")
+vim.opt.shada = "'100,<50,s10,h"
+vim.opt.shadafile = vim.fn.expand("~/.local/state/nvim/shada/main.shada")
------------------------------------------------------------
-- Miscellaneous
@@ -82,8 +82,8 @@ vim.opt.termguicolors = true
vim.cmd.colorscheme("pablo")
-- Transparency
-vim.api.nvim_set_hl(0, "Normal", { bg = "none", ctermbg = "none" })
-vim.api.nvim_set_hl(0, "NormalFloat",{ bg = "none", ctermbg = "none" })
+vim.api.nvim_set_hl(0, "Normal", { bg = "none", ctermbg = "none" })
+vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none", ctermbg = "none" })
vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })
vim.api.nvim_set_hl(0, "FoldColumn", { bg = "none" })
@@ -94,34 +94,24 @@ local augroup = vim.api.nvim_create_augroup("UserAutocmds", { clear = true })
-- Reload any .lua file on save
vim.api.nvim_create_autocmd("BufWritePost", {
- group = augroup,
- pattern = vim.fn.stdpath("config") .. "/**/*.lua",
- callback = function()
- vim.cmd("source %")
- vim.notify("Lua config reloaded", vim.log.levels.INFO)
- end,
+ group = augroup,
+ pattern = vim.fn.stdpath("config") .. "/**/*.lua",
+ callback = function()
+ vim.cmd("source %")
+ vim.notify("Lua config reloaded", vim.log.levels.INFO)
+ end,
})
-- Remove trailing whitespace & final newlines, keep cursor
vim.api.nvim_create_autocmd("BufWritePre", {
- group = augroup,
- pattern = "*",
- callback = function()
- local pos = vim.fn.getpos(".")
- vim.cmd([[%s/\s\+$//e]])
- vim.cmd([[%s/\n\+\%$//e]])
- vim.fn.setpos(".", pos)
- end,
-})
-
-vim.api.nvim_create_autocmd("BufWritePost", {
- pattern = "*.tex",
- callback = function()
- -- Run tex-fmt on the current file
- vim.cmd("silent !tex-fmt %")
- -- Reload the buffer to reflect formatting changes
- vim.cmd("edit!")
- end,
+ group = augroup,
+ pattern = "*",
+ callback = function()
+ local pos = vim.fn.getpos(".")
+ vim.cmd([[%s/\s\+$//e]])
+ vim.cmd([[%s/\n\+\%$//e]])
+ vim.fn.setpos(".", pos)
+ end,
})
------------------------------------------------------------
@@ -132,43 +122,43 @@ vim.g.mapleader = " "
-- Helper function for cleaner keymap definitions
-- Defaults: noremap = true, silent = true
local function map(mode, lhs, rhs, opts)
- opts = opts or {}
- opts.noremap = opts.noremap ~= false -- default true
- opts.silent = opts.silent ~= false -- default true
- opts.desc = opts.desc or nil -- optional description
+ opts = opts or {}
+ opts.noremap = opts.noremap ~= false -- default true
+ opts.silent = opts.silent ~= false -- default true
+ opts.desc = opts.desc or nil -- optional description
- vim.keymap.set(mode, lhs, rhs, opts)
+ vim.keymap.set(mode, lhs, rhs, opts)
end
-- Delete char before cursor + char under cursor
-map('n', '<BS>', 'dBx', { desc = "Delete char before + under cursor" })
+map("n", "<BS>", "dBx", { desc = "Delete char before + under cursor" })
-- Insert blank line below current line and center view
-map('n', 's', 'o<Esc>kzz', { desc = "Insert blank line below + center" })
+map("n", "s", "o<Esc>kzz", { desc = "Insert blank line below + center" })
-- Start substitute on current line (pre-filled :%s//g)
-map('n', 'S', ':%s//g<Left><Left>', { silent = false, desc = "Substitute on current line" })
+map("n", "S", ":%s//g<Left><Left>", { silent = false, desc = "Substitute on current line" })
-- Note: silent = false because it enters command-line mode
-- Yank to end of line (consistent with D and C behavior)
-map('n', 'Y', 'y$', { desc = "Yank to end of line" })
+map("n", "Y", "y$", { desc = "Yank to end of line" })
-- Swap current line with the one below
-map('n', '-', 'ddp', { desc = "Swap line with next" })
+map("n", "-", "ddp", { desc = "Swap line with next" })
-- Swap current line with the one above
-map('n', '_', 'ddkP', { desc = "Swap line with previous" })
+map("n", "_", "ddkP", { desc = "Swap line with previous" })
-- System clipboard yank & paste (line / WORD)
-map('n', '<C-j>', '"+yy', { desc = "Yank line to system clipboard" })
-map('n', '<C-c>', '"+yW', { desc = "Yank WORD to system clipboard" })
-map('n', '<C-k>', '"+p', { desc = "Paste from system clipboard after cursor" })
+map("n", "<C-j>", '"+yy', { desc = "Yank line to system clipboard" })
+map("n", "<C-c>", '"+yW', { desc = "Yank WORD to system clipboard" })
+map("n", "<C-k>", '"+p', { desc = "Paste from system clipboard after cursor" })
-- Yank selection to system clipboard
-map('v', '<C-j>', '"+y', { desc = "Yank selection to system clipboard" })
+map("v", "<C-j>", '"+y', { desc = "Yank selection to system clipboard" })
-- Toggle buffers
-map('n', '<Tab><Tab>', '<C-^>', { desc = "Toggle last / alternate buffer" })
+map("n", "<Tab><Tab>", "<C-^>", { desc = "Toggle last / alternate buffer" })
------------------------------------------------------------
-- Tabs & indentation
@@ -181,9 +171,9 @@ vim.opt.expandtab = true
-- Filetype-specific mappings
------------------------------------------------------------
vim.api.nvim_create_autocmd("FileType", {
- group = augroup,
- pattern = "python",
- command = "map <F5> :w<CR>:!python3 %<CR>",
+ group = augroup,
+ pattern = "python",
+ command = "map <F5> :w<CR>:!python3 %<CR>",
})
------------------------------------------------------------
@@ -196,14 +186,14 @@ require("config.lazy")
------------------------------------------------------------
require("luasnip").config.set_config({ -- Setting LuaSnip config
- -- Enable autotriggered snippets
- enable_autosnippets = true,
+ -- Enable autotriggered snippets
+ enable_autosnippets = true,
- -- Use Tab (or some other key if you prefer) to trigger visual selection
- store_selection_keys = "<Tab>",
+ -- Use Tab (or some other key if you prefer) to trigger visual selection
+ store_selection_keys = "<Tab>",
})
-vim.cmd[[
+vim.cmd([[
" Use Tab to expand and jump through snippets
imap <silent><expr> <Tab> luasnip#expand_or_jumpable() ? '<Plug>luasnip-expand-or-jump' : '<Tab>'
smap <silent><expr> <Tab> luasnip#jumpable(1) ? '<Plug>luasnip-jump-next' : '<Tab>'
@@ -211,7 +201,7 @@ smap <silent><expr> <Tab> luasnip#jumpable(1) ? '<Plug>luasnip-jump-next' : '<Ta
" Use Shift-Tab to jump backwards through snippets
imap <silent><expr> <S-Tab> luasnip#jumpable(-1) ? '<Plug>luasnip-jump-prev' : '<S-Tab>'
smap <silent><expr> <S-Tab> luasnip#jumpable(-1) ? '<Plug>luasnip-jump-prev' : '<S-Tab>'
-]]
+]])
-- Load snippets from fiadra/chadsnips
require("luasnip.loaders.from_vscode").lazy_load()
diff --git a/.config/shell/.zshrc b/.config/shell/.zshrc
index 028b8b8..2ae7bd6 100644
--- a/.config/shell/.zshrc
+++ b/.config/shell/.zshrc
@@ -9,18 +9,27 @@ fpath=(/usr/share/zsh/site-functions $fpath)
# ─── 2) Shell behaviour ──────────────────────────────────────────────────────
autoload -Uz colors && colors
setopt auto_pushd
+setopt auto_param_slash
setopt no_check_jobs
setopt pushd_ignore_dups
setopt pushd_silent
setopt autocd
+setopt auto_menu
+setopt menu_complete
setopt interactive_comments
-stty stop undef
-stty -ixon
+setopt no_case_glob
+setopt no_case_match
unsetopt beep
+[[ -t 0 ]] && {
+ stty stop undef
+ stty -ixon
+}
zstyle ':completion:*' cache-path "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompcache"
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' use-cache on
+zstyle ':completion:*' special-dirs
+zstyle ':completion:*' squeeze-slashes
# ─── 3) Prompt ───────────────────────────────────────────────────────────────
local blue=$(tput setaf 34)
@@ -33,14 +42,16 @@ local reset=$(tput sgr0)
PS1="%{$blue%}%n%{$green%}@%{$cyan%}%m %{$lime%}%1~ %{$reset%}$ "
# ─── 4) History ──────────────────────────────────────────────────────────────
-HISTSIZE=10000000
-SAVEHIST=10000000
+HISTSIZE=100000
+SAVEHIST=100000
if [[ ! -d "${XDG_CACHE_HOME:-$HOME/.cache}/shell" ]]; then
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/shell"
fi
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/shell/history"
+setopt append_history
setopt inc_append_history
+setopt share_history
setopt hist_ignore_all_dups
setopt hist_find_no_dups
setopt hist_save_no_dups
@@ -90,7 +101,7 @@ else
fi
zstyle ':completion:*' menu select
zmodload zsh/complist
-_comp_options+=(globdots)
+_comp_options+=(globdots extended_glob)
# ─── 8) Keybindings ──────────────────────────────────────────────────────────
# Better backspace in vi mode
diff --git a/.config/shell/envvarrc b/.config/shell/envvarrc
index 9974529..b79294d 100644
--- a/.config/shell/envvarrc
+++ b/.config/shell/envvarrc
@@ -1,7 +1,6 @@
#!/bin/sh
# Filip's envvarrc
-# This litte script sets my environment variables.
-
+# This little script sets my environment variables.
# Primary programs
export BROWSER="librewolf"
@@ -13,47 +12,45 @@ export TERMINAL="st"
export TERMINAL_PROG="st"
export SHELL="zsh"
-
# XDG base directories
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
-
+export XDG_STATE_HOME="$HOME/.local/state"
# PATH and scripts
export SCRIPTS="$HOME/.scripts"
for dir in \
- "$SCRIPTS" \
- "$HOME/langs/R" \
- "$HOME/.cargo/bin" \
- "$HOME/.local/bin"
-do
- [ -d "$dir" ] || continue
-
- case ":$PATH:" in
+ "$SCRIPTS" \
+ "$HOME/langs/R" \
+ "$HOME/.cargo/bin" \
+ "$HOME/.local/bin"; do
+ [ -d "$dir" ] || continue
+
+ case ":$PATH:" in
*":$dir:"*) ;;
*) PATH="$dir:$PATH" ;;
- esac
+ esac
done
export PATH
-
# Shell / config locations
export ZDOTDIR="$XDG_CONFIG_HOME/shell"
export ZSHDIR="$ZDOTDIR"
export ALIASRC="$ZDOTDIR/aliasrc"
export ENVVARRC="$ZDOTDIR/envvarrc"
-
# X / input
export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
export XINPUTRC="$XDG_CONFIG_HOME/x11/xinputrc"
export XPROFILE="$XDG_CONFIG_HOME/x11/xprofile"
-
# Language runtimes & tools
+# Rust
+export CARGO_HOME="$XDG_DATA_HOME/cargo"
+
# R
export R_HOME="/usr/lib/R"
export R_LIBS_USER="$HOME/langs/R"
@@ -62,6 +59,7 @@ export R_HISTFILE="$HOME/langs/R/.Rhistory"
# Go
export GOPATH="$HOME/langs/go"
+export GOBIN="$GOPATH/bin"
# Python / Conda
export _CONDA_ROOT="$HOME/.local/opt/miniconda3"
@@ -70,12 +68,10 @@ export IPYTHONDIR="$XDG_CONFIG_HOME/ipython"
# Ren'Py
export RENPY_USER="$HOME/langs/python/renpy"
-
# Neovim
export NVIMPLUGINS="$XDG_CONFIG_HOME/nvim/lua/plugins"
export NVIMSNIPPETS="$XDG_CONFIG_HOME/nvim/lua/snips"
-
# CLI / TUI tools
export TIGRC_USER="$XDG_CONFIG_HOME/tig/tigrc"
export STARSHIP_CONFIG="$XDG_CONFIG_HOME/starship/starship.toml"
@@ -89,13 +85,11 @@ export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
export STARDICT_DATA_DIR="$XDG_DATA_HOME/stardict"
export OBSIDIAN_HOME="$XDG_CACHE_HOME/obsidian"
-
# Locale
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="UTF-8"
-
# Better less
export LESS="R"
export LESS_TERMCAP_mb="$(printf '%b' '')"
diff --git a/.config/shell/temp b/.config/shell/temp
new file mode 100644
index 0000000..75c2b03
--- /dev/null
+++ b/.config/shell/temp
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# TEMPORARY
+export TRANSITLAND_API_KEY="Wj10MMRSKE4PJTNgtGLB5bK5cXd0Pyyr"
+export DUFFEL_API_TOKEN="duffel_test_I5aqDofO6D445pIQRsOZlU9leLCjSqfiQ7_B0G4SRxb"
+export GEOAPIFY_API_KEY="29df0878ddb04c6aaca758653f692eed"