Compare commits

16 Commits

Author SHA1 Message Date
f0352bfe24 Add devcontainer configuration
Co-authored-by: Ona <no-reply@ona.com>
2026-04-12 17:40:51 +00:00
c851c5f80c restore kaomoji starship prompt
Co-authored-by: Ona <no-reply@ona.com>
2026-03-03 00:13:07 +00:00
84ad68b866 remove auto-dark-theme plugin 2026-01-16 12:10:54 +00:00
841507693b askdlasd 2026-01-16 12:07:50 +00:00
543c868789 asdadsad 2026-01-16 12:03:49 +00:00
bdc74a3ef6 asd 2026-01-16 11:56:47 +00:00
168208cf3d fix install script again 2026-01-16 11:55:47 +00:00
cf58fa1f8a fix nvim install url 2026-01-16 11:54:09 +00:00
0a12f895f4 fix install script 2026-01-16 11:52:15 +00:00
4044786f31 update install script to auto install nvim 2026-01-16 11:11:01 +00:00
50e2eaadee move from formatter.nvim to conform.nvim 2026-01-16 00:34:40 +00:00
743a528289 fix install script 2025-10-24 20:32:15 +01:00
8a109f2427 fix neovim vscode 2025-10-11 17:10:36 +01:00
339fa4f166 add neovim config for vscode 2025-10-07 21:17:02 +01:00
97c24b2ccd add ghostty themes 2025-09-25 22:33:44 +01:00
1951f2c0ac add zed config 2025-09-25 22:28:48 +01:00
11 changed files with 351 additions and 131 deletions

5
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
# use this Dockerfile to install additional tools you might need, e.g.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

View File

@@ -0,0 +1,20 @@
// The Dev Container format allows you to configure your environment. At the heart of it
// is a Docker image or Dockerfile which controls the tools available in your environment.
//
// See https://aka.ms/devcontainer.json for more information.
{
"name": "Ona",
// Use "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
// instead of the build to use a pre-built image.
"build": {
"context": ".",
"dockerfile": "Dockerfile"
}
// Features add additional features to your environment. See https://containers.dev/features
// Beware: features are not supported on all platforms and may have unintended side-effects.
// "features": {
// "ghcr.io/devcontainers/features/docker-in-docker": {
// "moby": false
// }
// }
}

View File

@@ -2,6 +2,6 @@ shell-integration = zsh
font-family = SF Mono
font-size = 14
font-thicken = true
theme = dark:catppuccin-macchiato,light:catppuccin-latte
theme = dark:catppuccin-mocha.conf,light:catppuccin-latte.conf
window-padding-x = 16

View File

@@ -0,0 +1,22 @@
palette = 0=#5c5f77
palette = 1=#d20f39
palette = 2=#40a02b
palette = 3=#df8e1d
palette = 4=#1e66f5
palette = 5=#ea76cb
palette = 6=#179299
palette = 7=#acb0be
palette = 8=#6c6f85
palette = 9=#d20f39
palette = 10=#40a02b
palette = 11=#df8e1d
palette = 12=#1e66f5
palette = 13=#ea76cb
palette = 14=#179299
palette = 15=#bcc0cc
background = eff1f5
foreground = 4c4f69
cursor-color = dc8a78
cursor-text = eff1f5
selection-background = d8dae1
selection-foreground = 4c4f69

View File

@@ -0,0 +1,22 @@
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#a6adc8
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#f9e2af
palette = 12=#89b4fa
palette = 13=#f5c2e7
palette = 14=#94e2d5
palette = 15=#bac2de
background = 1e1e2e
foreground = cdd6f4
cursor-color = f5e0dc
cursor-text = 11111b
selection-background = 353749
selection-foreground = cdd6f4

View File

@@ -1,66 +1,109 @@
#!/bin/bash
set -euo pipefail
set -eu
for arg in "$@"; do
# allows: ./install.sh macos (sets $macos=1)
declare "${arg}=1"
done
for arg in "$@"; do declare $arg='1'; done
if [[ ! -n macos ]];
then linux=1;
if [[ -n "${macos:-}" ]]; then
linux=""
else
linux="";
linux=1
fi
# install asdf tool-versions
ln -s "$HOME/dotfiles/.tool-versions" "$HOME/.tool-versions" || :
install_neovim() {
if command -v nvim >/dev/null 2>&1; then
return 0
fi
# install wezterm config
ln -s "$HOME/dotfiles/.wezterm.lua" "$HOME/.wezterm.lua" || :
if [[ -z "${linux:-}" ]]; then
# macOS
if command -v brew >/dev/null 2>&1; then
brew install neovim
return 0
fi
echo "Neovim not found and Homebrew is not installed. Install Homebrew or install Neovim manually." >&2
return 1
fi
# Linux: curl official tarball, install under /opt, symlink to /usr/local/bin (no AppImage)
if ! command -v curl >/dev/null 2>&1; then
echo "curl is required to install Neovim on Linux." >&2
return 1
fi
if ! command -v tar >/dev/null 2>&1; then
echo "tar is required to install Neovim on Linux." >&2
return 1
fi
arch="$(uname -m)"
case "$arch" in
x86_64) nvim_arch="linux-x86_64" ;;
aarch64|arm64) nvim_arch="linux-arm64" ;;
*)
echo "Unsupported architecture for Neovim tarball install: $arch" >&2
return 1
;;
esac
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
url="https://github.com/neovim/neovim/releases/latest/download/nvim-${nvim_arch}.tar.gz"
curl -fsSL "$url" -o "$tmpdir/nvim.tar.gz"
tar -xzf "$tmpdir/nvim.tar.gz" -C "$tmpdir"
src_dir="$tmpdir/nvim-${nvim_arch}"
# Install to /opt/nvim (replace if present), then symlink binary
sudo rm -rf /opt/nvim
sudo mv "$src_dir" /opt/nvim
sudo ln -sf /opt/nvim/bin/nvim /usr/local/bin/nvim
}
mkdir -p "$HOME/.config"
# install neovim if missing
install_neovim
# install neovim config
if [ ! -d "$HOME/.config/nvim" ]; then
ln -s "$HOME/dotfiles/nvim" "$HOME/.config/nvim" || :
ln -s "$HOME/dotfiles/nvim" "$HOME/.config/nvim" || :
fi
# install starship config
ln -s "$HOME/dotfiles/starship.toml" "$HOME/.config/starship.toml" || :
if [ ! -n "$linux" ]; then
# install aerospace config
ln -s "$HOME/dotfiles/aerospace.toml" "$HOME/.aerospace.toml" || :
if [ ! -n "${linux:-}" ]; then
# macos-only configs
ln -s "$HOME/dotfiles/aerospace.toml" "$HOME/.aerospace.toml" || :
if [ ! -d "$HOME/.config/sketchybar" ]; then
ln -s "$HOME/dotfiles/sketchybar" "$HOME/.config/sketchybar" || :
fi
if [ ! -d "$HOME/.config/borders" ]; then
ln -s "$HOME/dotfiles/borders" "$HOME/.config/borders" || :
fi
if [ ! -d "$HOME/.config/neovide" ]; then
ln -s "$HOME/dotfiles/neovide" "$HOME/.config/neovide" || :
fi
if [ ! -d "$HOME/.config/ghostty" ]; then
ln -s "$HOME/dotfiles/ghostty" "$HOME/.config/ghostty" || :
fi
if [ ! -d "$HOME/.config/sketchybar" ]; then
ln -s "$HOME/dotfiles/sketchybar" "$HOME/.config/sketchybar" || :
fi
if [ ! -d "$HOME/.config/borders" ]; then
ln -s "$HOME/dotfiles/borders" "$HOME/.config/borders" || :
fi
if [ ! -d "$HOME/.config/neovide" ]; then
ln -s "$HOME/dotfiles/neovide" "$HOME/.config/neovide" || :
fi
if [ ! -d "$HOME/.config/ghostty" ]; then
ln -s "$HOME/dotfiles/ghostty" "$HOME/.config/ghostty" || :
fi
else
# install sway
if [ ! -d "$HOME/.config/sway" ]; then
ln -s "$HOME/dotfiles/sway" "$HOME/.config/sway" || :
fi
# install waybar
if [ ! -d "$HOME/.config/waybar" ]; then
ln -s "$HOME/dotfiles/waybar" "$HOME/.config/waybar" || :
fi
# install rofi
if [ ! -d "$HOME/.config/rofi" ]; then
ln -s "$HOME/dotfiles/rofi" "$HOME/.config/rofi" || :
fi
# install rofi
if [ ! -d "$HOME/.config/dunst" ]; then
ln -s "$HOME/dotfiles/dunst" "$HOME/.config/dunst" || :
fi
# linux-only configs
if [ ! -d "$HOME/.config/sway" ]; then
ln -s "$HOME/dotfiles/sway" "$HOME/.config/sway" || :
fi
if [ ! -d "$HOME/.config/waybar" ]; then
ln -s "$HOME/dotfiles/waybar" "$HOME/.config/waybar" || :
fi
if [ ! -d "$HOME/.config/rofi" ]; then
ln -s "$HOME/dotfiles/rofi" "$HOME/.config/rofi" || :
fi
if [ ! -d "$HOME/.config/dunst" ]; then
ln -s "$HOME/dotfiles/dunst" "$HOME/.config/dunst" || :
fi
fi

View File

@@ -11,7 +11,7 @@ function init_lazy_nvim()
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(PLUGINS, opts)
require("lazy").setup(PLUGINS, {})
end
function define_keymaps()
@@ -67,6 +67,32 @@ function define_keymaps()
vim.keymap.set("n", "<space>g", builtin.live_grep, {})
vim.keymap.set("n", "<space>b", builtin.buffers, {})
vim.keymap.set("n", "<space>u", builtin.lsp_references, {})
local conform = require("conform")
vim.keymap.set("n", "<space>=", function()
conform.format({ timeout_ms = 2000, lsp_fallback = true })
end, { noremap = true, silent = true })
end
function define_vscode_keymaps()
local vscode = require("vscode")
local function action(command)
return function()
vscode.action(command)
end
end
vim.api.nvim_set_keymap("n", "J", "10j", { noremap = true, silent = true })
vim.keymap.set("n", "<space>e", action("editor.action.showHover"))
vim.keymap.set("n", "<space>d", action("editor.action.revealDefinition"))
vim.keymap.set("n", "<space>F", action("workbench.action.quickOpen"))
vim.keymap.set("n", "<space>f", action("workbench.view.explorer"))
vim.keymap.set("n", "<space>r", action("editor.action.rename"))
vim.keymap.set("n", "<space>g", action("workbench.action.findInFiles"))
vim.keymap.set("n", "[d", action("editor.action.marker.prevInFiles"))
vim.keymap.set("n", "]d", action("editor.action.marker.nextInFiles"))
vim.keymap.set("n", "<Esc>", action("workbench.action.closeSidebar"))
end
function setup_plugins()
@@ -102,18 +128,6 @@ function setup_plugins()
},
})
require("auto-dark-mode").setup({
set_dark_mode = function()
vim.opt.background = "dark"
vim.cmd("colorscheme catppuccin-macchiato")
end,
set_light_mode = function()
vim.opt.background = "light"
vim.cmd("colorscheme catppuccin-latte")
end,
})
require("no-neck-pain").setup({
width = 120,
fallbackOnBufferDelete = true,
@@ -283,63 +297,65 @@ function setup_plugins()
extensions = {},
})
local util = require("formatter.util")
require("formatter").setup({
filetype = {
javascript = {
require("formatter.filetypes.javascript").biome,
local conform = require("conform")
conform.setup({
-- Pick the first formatter that exists on disk (or in node_modules/.bin if you use that)
-- for filetypes where you list multiple options.
formatters_by_ft = {
javascript = { "biome", "oxfmt", "prettier", stop_after_first = true },
javascriptreact = { "biome", "oxfmt", "prettier", stop_after_first = true },
typescript = { "biome", "oxfmt", "prettier", stop_after_first = true },
typescriptreact = { "biome", "oxfmt", "prettier", stop_after_first = true },
-- If you want JSON to prefer biome, then prettier fallback:
json = { "biome", "prettier", stop_after_first = true },
css = { "prettier" },
rust = { "rustfmt" },
lua = { "stylua" },
c = { "clang_format" },
cpp = { "clang_format" },
dart = { "dart_format" },
python = { "black" },
go = { "goimports" },
-- sqlfmt reads stdin, outputs formatted sql
sql = { "sqlfmt" },
nix = { "nixpkgs_fmt" },
-- Astro: prefer prettier with astro parser, with biome/oxfmt fallback if you want:
astro = { "prettier_astro", "biome", "oxfmt", stop_after_first = true },
},
formatters = {
-- Biome builtin works for JS/TS/JSON; this is optional unless you want overrides.
biome = {
command = "biome",
args = { "format", "--stdin-file-path", "$FILENAME" },
stdin = true,
},
javascriptreact = {
require("formatter.filetypes.javascriptreact").biome,
-- oxfmt usually formats files (no stdin). Conform will run it on the file path.
oxfmt = {
command = "oxfmt",
args = { "--write", "$FILENAME" },
stdin = false,
},
typescript = {
require("formatter.filetypes.typescript").biome,
-- Prettier for Astro (explicit parser). Uses stdin.
prettier_astro = {
command = "prettier",
args = { "--stdin-filepath", "$FILENAME", "--parser", "astro" },
stdin = true,
},
typescriptreact = {
require("formatter.filetypes.typescriptreact").biome,
sqlfmt = {
command = "sqlfmt",
args = { "-" },
stdin = true,
},
json = {
require("formatter.filetypes.json").biome,
},
css = {
require("formatter.filetypes.css").prettier,
},
rust = {
require("formatter.filetypes.rust").rustfmt,
},
astro = {
function()
return {
exe = "prettier",
args = {
"--stdin-filepath",
util.escape_path(util.get_current_buffer_file_path()),
"--parser",
"astro",
},
stdin = true,
try_node_modules = true,
}
end,
},
lua = { require("formatter.filetypes.lua").stylua },
c = { require("formatter.filetypes.c").clangformat },
cpp = { require("formatter.filetypes.cpp").clangformat },
dart = { require("formatter.filetypes.dart").dartformat },
python = { require("formatter.filetypes.python").black },
go = { require("formatter.filetypes.go").goimports },
sql = {
function()
return {
exe = "sqlfmt",
args = {
"-",
},
stdin = true,
}
end,
},
nix = { require("formatter.filetypes.nix").nixpkgs_fmt },
},
})
@@ -452,6 +468,8 @@ function config_vim()
go = 4,
}
vim.cmd.colorscheme "catppuccin"
vim.opt.tabstop = default_tabwidth
vim.opt.shiftwidth = default_tabwidth
vim.opt.number = true
@@ -496,12 +514,19 @@ function config_vim()
local augroup = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
augroup("__formatter__", { clear = true })
autocmd("BufWritePost", {
group = "__formatter__",
command = ":FormatWrite",
})
local conform = require("conform")
augroup("__formatter__", { clear = true })
autocmd("BufWritePre", {
group = "__formatter__",
callback = function(args)
conform.format({
bufnr = args.buf,
timeout_ms = 2000,
lsp_fallback = true,
})
end,
})
augroup("__indentation__", { clear = true })
autocmd("FileType", {
group = "__indentation__",
@@ -549,14 +574,13 @@ PLUGINS = {
{ "hrsh7th/cmp-cmdline" },
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp-signature-help" },
{ "mhartington/formatter.nvim" },
{ "stevearc/conform.nvim" },
{
"L3MON4D3/LuaSnip",
-- install jsregexp (optional!).
build = "make install_jsregexp",
},
{ "voldikss/vim-floaterm" },
{ "f-person/auto-dark-mode.nvim" },
{
"nvim-telescope/telescope.nvim",
tag = "0.1.6",
@@ -598,6 +622,7 @@ PLUGINS = {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
cond = vim.g.vscode,
},
{ "windwp/nvim-ts-autotag" },
{
@@ -608,9 +633,13 @@ PLUGINS = {
},
}
init_lazy_nvim()
setup_plugins()
define_keymaps()
config_vim()
if vim.g.vscode then
define_vscode_keymaps()
else
init_lazy_nvim()
setup_plugins()
config_vim()
define_keymaps()
end
vim.cmd("source ~/dotfiles/nvim/macmap.vim")

View File

@@ -1,14 +1,13 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
"auto-dark-mode.nvim": { "branch": "master", "commit": "c31de126963ffe9403901b4b0990dde0e6999cc6" },
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
"formatter.nvim": { "branch": "master", "commit": "b9d7f853da1197b83b8edb4cc4952f7ad3a42e41" },
"conform.nvim": { "branch": "master", "commit": "238f542a118984a88124fc915d5b981680418707" },
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazygit.nvim": { "branch": "main", "commit": "4839ab642962cc76bb1bf278427dc4c59be15072" },

View File

@@ -3,7 +3,7 @@
query=$(defaults read -g AppleInterfaceStyle | xargs)
if [ "$query" = "Dark" ]; then
sketchybar --bar color=0xff313244 \
sketchybar --bar color=0x00000000 \
--set '/.*/' icon.color=0xffffffff label.color=0xffffffff
else
sketchybar --bar color=0x00000000 \

View File

@@ -10,8 +10,8 @@ $character"""
# Starship modules
[character]
# Note the use of Catppuccin color 'peach'
success_symbol = "[[󰄛](green) ](peach)"
error_symbol = "[[󰄛](red) ](peach)"
success_symbol = "[(✿ ◕ ᴗ◕\\)つ━━✫・*。](dimmed)"
error_symbol = "[ Ψ\\(`_´ # \\)↝ ](red)"
vimcmd_symbol = "[󰄛 ](subtext1)" # For use with zsh-vi-mode
[directory]

80
zed/settings.json Normal file
View File

@@ -0,0 +1,80 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"ssh_connections": [
{
"host": "0199809d-3add-7188-ad6d-345995ee7324.gitpod.environment",
"port_forwards": [{ "local_port": 5173, "remote_port": 5173 }],
"projects": [
{
"paths": ["/workspace/gitpod-next"]
}
]
},
{
"host": "01995d42-f1cc-70e4-bf46-f223126298f7.gitpod.environment",
"port_forwards": [{ "local_port": 5173, "remote_port": 5173 }],
"projects": [
{
"paths": ["/workspace/gitpod-next/./"]
}
]
}
],
"vim_mode": true,
"icon_theme": {
"mode": "system",
"light": "Zed (Default)",
"dark": "Zed (Default)"
},
"base_keymap": "VSCode",
"buffer_font_family": "SF Mono",
"buffer_line_height": "standard",
"ui_font_size": 15,
"ui_font_family": "SF Mono",
"relative_line_numbers": true,
"buffer_font_size": 15,
"theme": {
"mode": "system",
"light": "Catppuccin Latte",
"dark": "Ayu Dark"
},
"tabs": {
"file_icons": true
},
"centered_layout": {
"left_padding": 0.3,
"right_padding": 0.3
},
"soft_wrap": "editor_width",
"profiles": {
"zen": {
"tab_bar": {
"show_nav_history_buttons": false
},
"toolbar": {
"breadcrumbs": false,
"quick_actions": false
},
"gutter": {
"breakpoints": false,
"runnables": false,
"min_line_number_digits": 0
},
"scrollbar": {
"show": "never",
"cursors": false
},
"centered_layout": {
"left_padding": 0.3,
"right_padding": 0.3
}
}
}
}