Compare commits
18 Commits
2805a5dd46
...
kn/add-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| f0352bfe24 | |||
| c851c5f80c | |||
| 84ad68b866 | |||
| 841507693b | |||
| 543c868789 | |||
| bdc74a3ef6 | |||
| 168208cf3d | |||
| cf58fa1f8a | |||
| 0a12f895f4 | |||
| 4044786f31 | |||
|
50e2eaadee
|
|||
|
743a528289
|
|||
| 8a109f2427 | |||
|
339fa4f166
|
|||
|
97c24b2ccd
|
|||
| 1951f2c0ac | |||
| a7bd9ec5da | |||
|
|
39477f2b01 |
5
.devcontainer/Dockerfile
Normal file
5
.devcontainer/Dockerfile
Normal 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>
|
||||||
20
.devcontainer/devcontainer.json
Normal file
20
.devcontainer/devcontainer.json
Normal 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
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -56,7 +56,7 @@ inner.horizontal = 8
|
|||||||
inner.vertical = 8
|
inner.vertical = 8
|
||||||
outer.left = 8
|
outer.left = 8
|
||||||
outer.bottom = 8
|
outer.bottom = 8
|
||||||
outer.top = 44
|
outer.top = 8
|
||||||
outer.right = 8
|
outer.right = 8
|
||||||
|
|
||||||
# 'main' binding mode declaration
|
# 'main' binding mode declaration
|
||||||
@@ -155,6 +155,11 @@ alt-r = 'mode resize'
|
|||||||
|
|
||||||
alt-f = 'layout floating tiling'
|
alt-f = 'layout floating tiling'
|
||||||
|
|
||||||
|
[workspace-to-monitor-force-assignment]
|
||||||
|
3 = 'secondary'
|
||||||
|
D = 'secondary'
|
||||||
|
M = 'secondary'
|
||||||
|
|
||||||
[mode.resize.binding]
|
[mode.resize.binding]
|
||||||
h = 'resize smart -50'
|
h = 'resize smart -50'
|
||||||
l = 'resize smart +50'
|
l = 'resize smart +50'
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ shell-integration = zsh
|
|||||||
font-family = SF Mono
|
font-family = SF Mono
|
||||||
font-size = 14
|
font-size = 14
|
||||||
font-thicken = true
|
font-thicken = true
|
||||||
theme = dark:catppuccin-macchiato,light:catppuccin-latte
|
theme = dark:catppuccin-mocha.conf,light:catppuccin-latte.conf
|
||||||
window-padding-x = 16
|
window-padding-x = 16
|
||||||
|
|
||||||
|
|||||||
22
ghostty/themes/catppuccin-latte.conf
Normal file
22
ghostty/themes/catppuccin-latte.conf
Normal 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
|
||||||
22
ghostty/themes/catppuccin-mocha.conf
Normal file
22
ghostty/themes/catppuccin-mocha.conf
Normal 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
|
||||||
141
install.sh
141
install.sh
@@ -1,68 +1,109 @@
|
|||||||
#!/bin/bash
|
#!/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=""
|
||||||
if [ ! -n "$macos" ];
|
|
||||||
then linux=1;
|
|
||||||
else
|
else
|
||||||
linux="";
|
linux=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install asdf tool-versions
|
install_neovim() {
|
||||||
ln -s "$HOME/dotfiles/.tool-versions" "$HOME/.tool-versions"
|
if command -v nvim >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# install wezterm config
|
if [[ -z "${linux:-}" ]]; then
|
||||||
ln -s "$HOME/dotfiles/.wezterm.lua" "$HOME/.wezterm.lua" || :
|
# 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
|
# install neovim config
|
||||||
if [ ! -d "$HOME/.config/nvim" ]; then
|
if [ ! -d "$HOME/.config/nvim" ]; then
|
||||||
ln -s "$HOME/dotfiles/nvim" "$HOME/.config/nvim" || :
|
ln -s "$HOME/dotfiles/nvim" "$HOME/.config/nvim" || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install starship config
|
# install starship config
|
||||||
ln -s "$HOME/dotfiles/starship.toml" "$HOME/.config/starship.toml" || :
|
ln -s "$HOME/dotfiles/starship.toml" "$HOME/.config/starship.toml" || :
|
||||||
|
|
||||||
echo $macos
|
if [ ! -n "${linux:-}" ]; then
|
||||||
|
# macos-only configs
|
||||||
|
ln -s "$HOME/dotfiles/aerospace.toml" "$HOME/.aerospace.toml" || :
|
||||||
|
|
||||||
if [ ! -n "$linux" ]; then
|
if [ ! -d "$HOME/.config/sketchybar" ]; then
|
||||||
# install aerospace config
|
ln -s "$HOME/dotfiles/sketchybar" "$HOME/.config/sketchybar" || :
|
||||||
ln -s "$HOME/dotfiles/aerospace.toml" "$HOME/.aerospace.toml" || :
|
fi
|
||||||
|
if [ ! -d "$HOME/.config/borders" ]; then
|
||||||
if [ ! -d "$HOME/.config/sketchybar" ]; then
|
ln -s "$HOME/dotfiles/borders" "$HOME/.config/borders" || :
|
||||||
ln -s "$HOME/dotfiles/sketchybar" "$HOME/.config/sketchybar" || :
|
fi
|
||||||
fi
|
if [ ! -d "$HOME/.config/neovide" ]; then
|
||||||
|
ln -s "$HOME/dotfiles/neovide" "$HOME/.config/neovide" || :
|
||||||
if [ ! -d "$HOME/.config/borders" ]; then
|
fi
|
||||||
ln -s "$HOME/dotfiles/borders" "$HOME/.config/borders" || :
|
if [ ! -d "$HOME/.config/ghostty" ]; then
|
||||||
fi
|
ln -s "$HOME/dotfiles/ghostty" "$HOME/.config/ghostty" || :
|
||||||
|
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
|
else
|
||||||
# install sway
|
# linux-only configs
|
||||||
if [ ! -d "$HOME/.config/sway" ]; then
|
if [ ! -d "$HOME/.config/sway" ]; then
|
||||||
ln -s "$HOME/dotfiles/sway" "$HOME/.config/sway" || :
|
ln -s "$HOME/dotfiles/sway" "$HOME/.config/sway" || :
|
||||||
fi
|
fi
|
||||||
|
if [ ! -d "$HOME/.config/waybar" ]; then
|
||||||
# install waybar
|
ln -s "$HOME/dotfiles/waybar" "$HOME/.config/waybar" || :
|
||||||
if [ ! -d "$HOME/.config/waybar" ]; then
|
fi
|
||||||
ln -s "$HOME/dotfiles/waybar" "$HOME/.config/waybar" || :
|
if [ ! -d "$HOME/.config/rofi" ]; then
|
||||||
fi
|
ln -s "$HOME/dotfiles/rofi" "$HOME/.config/rofi" || :
|
||||||
|
fi
|
||||||
# install rofi
|
if [ ! -d "$HOME/.config/dunst" ]; then
|
||||||
if [ ! -d "$HOME/.config/rofi" ]; then
|
ln -s "$HOME/dotfiles/dunst" "$HOME/.config/dunst" || :
|
||||||
ln -s "$HOME/dotfiles/rofi" "$HOME/.config/rofi" || :
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# install rofi
|
|
||||||
if [ ! -d "$HOME/.config/dunst" ]; then
|
|
||||||
ln -s "$HOME/dotfiles/dunst" "$HOME/.config/dunst" || :
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
183
nvim/init.lua
183
nvim/init.lua
@@ -11,7 +11,7 @@ function init_lazy_nvim()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
require("lazy").setup(PLUGINS, opts)
|
require("lazy").setup(PLUGINS, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
function define_keymaps()
|
function define_keymaps()
|
||||||
@@ -67,6 +67,32 @@ function define_keymaps()
|
|||||||
vim.keymap.set("n", "<space>g", builtin.live_grep, {})
|
vim.keymap.set("n", "<space>g", builtin.live_grep, {})
|
||||||
vim.keymap.set("n", "<space>b", builtin.buffers, {})
|
vim.keymap.set("n", "<space>b", builtin.buffers, {})
|
||||||
vim.keymap.set("n", "<space>u", builtin.lsp_references, {})
|
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
|
end
|
||||||
|
|
||||||
function setup_plugins()
|
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({
|
require("no-neck-pain").setup({
|
||||||
width = 120,
|
width = 120,
|
||||||
fallbackOnBufferDelete = true,
|
fallbackOnBufferDelete = true,
|
||||||
@@ -283,63 +297,65 @@ function setup_plugins()
|
|||||||
extensions = {},
|
extensions = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
local util = require("formatter.util")
|
local conform = require("conform")
|
||||||
require("formatter").setup({
|
conform.setup({
|
||||||
filetype = {
|
-- Pick the first formatter that exists on disk (or in node_modules/.bin if you use that)
|
||||||
javascript = {
|
-- for filetypes where you list multiple options.
|
||||||
require("formatter.filetypes.javascript").biome,
|
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,
|
go = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
|
||||||
vim.opt.tabstop = default_tabwidth
|
vim.opt.tabstop = default_tabwidth
|
||||||
vim.opt.shiftwidth = default_tabwidth
|
vim.opt.shiftwidth = default_tabwidth
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
@@ -496,12 +514,19 @@ function config_vim()
|
|||||||
local augroup = vim.api.nvim_create_augroup
|
local augroup = vim.api.nvim_create_augroup
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
augroup("__formatter__", { clear = true })
|
local conform = require("conform")
|
||||||
autocmd("BufWritePost", {
|
|
||||||
group = "__formatter__",
|
|
||||||
command = ":FormatWrite",
|
|
||||||
})
|
|
||||||
|
|
||||||
|
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 })
|
augroup("__indentation__", { clear = true })
|
||||||
autocmd("FileType", {
|
autocmd("FileType", {
|
||||||
group = "__indentation__",
|
group = "__indentation__",
|
||||||
@@ -549,14 +574,13 @@ PLUGINS = {
|
|||||||
{ "hrsh7th/cmp-cmdline" },
|
{ "hrsh7th/cmp-cmdline" },
|
||||||
{ "hrsh7th/nvim-cmp" },
|
{ "hrsh7th/nvim-cmp" },
|
||||||
{ "hrsh7th/cmp-nvim-lsp-signature-help" },
|
{ "hrsh7th/cmp-nvim-lsp-signature-help" },
|
||||||
{ "mhartington/formatter.nvim" },
|
{ "stevearc/conform.nvim" },
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
-- install jsregexp (optional!).
|
-- install jsregexp (optional!).
|
||||||
build = "make install_jsregexp",
|
build = "make install_jsregexp",
|
||||||
},
|
},
|
||||||
{ "voldikss/vim-floaterm" },
|
{ "voldikss/vim-floaterm" },
|
||||||
{ "f-person/auto-dark-mode.nvim" },
|
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = "0.1.6",
|
tag = "0.1.6",
|
||||||
@@ -598,6 +622,7 @@ PLUGINS = {
|
|||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = true,
|
config = true,
|
||||||
|
cond = vim.g.vscode,
|
||||||
},
|
},
|
||||||
{ "windwp/nvim-ts-autotag" },
|
{ "windwp/nvim-ts-autotag" },
|
||||||
{
|
{
|
||||||
@@ -608,9 +633,13 @@ PLUGINS = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
init_lazy_nvim()
|
if vim.g.vscode then
|
||||||
setup_plugins()
|
define_vscode_keymaps()
|
||||||
define_keymaps()
|
else
|
||||||
config_vim()
|
init_lazy_nvim()
|
||||||
|
setup_plugins()
|
||||||
|
config_vim()
|
||||||
|
define_keymaps()
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd("source ~/dotfiles/nvim/macmap.vim")
|
vim.cmd("source ~/dotfiles/nvim/macmap.vim")
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
|
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
|
||||||
"auto-dark-mode.nvim": { "branch": "master", "commit": "c31de126963ffe9403901b4b0990dde0e6999cc6" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
|
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
"formatter.nvim": { "branch": "master", "commit": "b9d7f853da1197b83b8edb4cc4952f7ad3a42e41" },
|
"conform.nvim": { "branch": "master", "commit": "238f542a118984a88124fc915d5b981680418707" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
|
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazygit.nvim": { "branch": "main", "commit": "4839ab642962cc76bb1bf278427dc4c59be15072" },
|
"lazygit.nvim": { "branch": "main", "commit": "4839ab642962cc76bb1bf278427dc4c59be15072" },
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
query=$(defaults read -g AppleInterfaceStyle | xargs)
|
query=$(defaults read -g AppleInterfaceStyle | xargs)
|
||||||
|
|
||||||
if [ "$query" = "Dark" ]; then
|
if [ "$query" = "Dark" ]; then
|
||||||
sketchybar --bar color=0xff313244 \
|
sketchybar --bar color=0x00000000 \
|
||||||
--set '/.*/' icon.color=0xffffffff label.color=0xffffffff
|
--set '/.*/' icon.color=0xffffffff label.color=0xffffffff
|
||||||
else
|
else
|
||||||
sketchybar --bar color=0x00000000 \
|
sketchybar --bar color=0x00000000 \
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ $character"""
|
|||||||
# Starship modules
|
# Starship modules
|
||||||
[character]
|
[character]
|
||||||
# Note the use of Catppuccin color 'peach'
|
# Note the use of Catppuccin color 'peach'
|
||||||
success_symbol = "[[](green) ❯](peach)"
|
success_symbol = "[(✿ ◕ ᴗ◕\\)つ━━✫・*。](dimmed)"
|
||||||
error_symbol = "[[](red) ❯](peach)"
|
error_symbol = "[ Ψ\\(`_´ # \\)↝ ](red)"
|
||||||
vimcmd_symbol = "[ ❮](subtext1)" # For use with zsh-vi-mode
|
vimcmd_symbol = "[ ❮](subtext1)" # For use with zsh-vi-mode
|
||||||
|
|
||||||
[directory]
|
[directory]
|
||||||
|
|||||||
80
zed/settings.json
Normal file
80
zed/settings.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user