Compare commits

...

3 Commits

Author SHA1 Message Date
Pratik Tripathy
14fd2092ef chore(alias): podman removed, up won't do OS upgrade 2026-02-18 23:16:39 +05:30
Pratik Tripathy
72abc331be feat: Bun, ollama, cuda env variables
- bun: global installs stored same place as npm globals
- python: add global pip installs to path
- cuda: add install to path
2026-02-18 22:53:23 +05:30
Pratik Tripathy
69af842041 fix(zed): Keymap and config fixes 2026-02-18 22:51:14 +05:30
6 changed files with 257 additions and 80 deletions

View File

@@ -1,24 +1,31 @@
// To see the default key bindings run `zed: open default keymap`
// TODO: Enable spell checking in VIM mode
// FIX: ctrl+n & ctrl+p selections don't work on terminal: cause they are hijacked by IDE
// - Use them to select next & previous
// TIP: To see the default key bindings run `zed: open default keymap`
// ISSUES:
// - Bash support: buffer symbol search doesn't work
// - Git: Not nearly as useful as Neovim > Gitsigns
// TODO:
// - Git stage multi-buffer: reduce the file name ribbon size
// - AI:
// - Set shortcuts:
// - Toggle left panel
// - Increase/Decrease panel size
[
{
"context": "Workspace",
"context": "Workspace && vim_mode == normal",
"bindings": {
"ctrl-/": "journal::NewJournalEntry",
"ctrl-1": "project_panel::ToggleFocus",
"ctrl-2": "git_panel::ToggleFocus",
"ctrl-3": "outline_panel::ToggleFocus",
"ctrl-4": "debug_panel::ToggleFocus",
"ctrl-5": "notification_panel::ToggleFocus"
"ctrl-5": "notification_panel::ToggleFocus",
"space tab": "workspace::ToggleLeftDock"
}
},
{
"context": "( ProjectPanel || GitPanel || OutlinePanel ) && not_editing",
"context": "ProjectPanel && not_editing",
"bindings": {
"q": "workspace::ToggleLeftDock"
"q": "workspace::ToggleLeftDock",
"space tab": "workspace::ToggleLeftDock"
}
},
{
@@ -39,7 +46,42 @@
}
},
{
"context": "Editor && ( vim_mode == visual || vim_mode == normal )&& !VimWaiting && !menu",
"context": "Picker",
"bindings": {
"ctrl-[": "menu::Cancel"
}
},
{
"context": "BufferSearchBar",
"bindings": {
"ctrl-[": "buffer_search::Dismiss"
}
},
{
"context": "ProjectSearchBar",
"bindings": {
"ctrl-[": "project_search::ToggleFocus"
}
},
{
"context": "Terminal",
"bindings": {
// Don't let ctrl-p & ctrl-n be high jacked
"ctrl-p": [
"terminal::SendKeystroke",
"ctrl-p"
],
"ctrl-n": [
"terminal::SendKeystroke",
"ctrl-n"
],
"ctrl-shift-up": "workspace::IncreaseActiveDockSize",
"ctrl-shift-down": "workspace::DecreaseActiveDockSize",
"ctrl-shift-enter": "workspace::NewTerminal"
}
},
{
"context": "Editor && ( vim_mode == visual || vim_mode == normal )",
"bindings": {
// Access system clipboard
"space p": "editor::Paste",
@@ -47,7 +89,7 @@
}
},
{
"context": "Editor && vim_mode == visual && !VimWaiting && !menu",
"context": "Editor && vim_mode == visual",
"bindings": {
// Move line up/down with J/K
"J": "editor::MoveLineDown",
@@ -55,7 +97,7 @@
}
},
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"context": "Editor && vim_mode == normal",
"bindings": {
// Useful Zed-VIM defaults:
// Go to declaration => gD
@@ -74,9 +116,6 @@
// Add a cursor selecting the previous copy of the current word => gL
// Skip latest word selection, and add next => g>
// Skip latest word selection, and add previous => g<
// After multi-selection: (in VIM as well)
// - `A` to append text after the selection
// - `I` to insert text before the selection
//
// https://github.com/tommcdo/vim-exchange
// https://github.com/jeetsukumaran/vim-indentwise
@@ -84,27 +123,30 @@
// AI:
// Accept edit-prediction on Linux => alt-l
// Accept next predicted word => alt-right
"space tab": "project_panel::ToggleFocus",
"space / /": "journal::NewJournalEntry",
"ctrl-escape": "workspace::ToggleCenteredLayout",
// Coding & Code Navigation
"] ]": "vim::MoveToNext",
"[ [": "vim::MoveToPrevious",
"] ]": "vim::GoToNextReference",
"[ [": "vim::GoToPreviousReference",
"] f": "vim::NextMethodStart",
"[ f": "vim::PreviousMethodStart",
"] i": "vim::NextSameIndent",
"[ i": "vim::PreviousSameIndent",
"] C": "vim::NextSectionStart",
"[ C": "vim::PreviousSectionStart",
"ctrl-space": "editor::SelectLargerSyntaxNode",
"F2": "editor::Rename",
"space r": "editor::Rename",
"space c r": "editor::FindAllReferences",
"space o": "outline::Toggle",
"space O": "project_symbols::Toggle",
"space s": "outline::Toggle",
"space S": "project_symbols::Toggle",
"ctrl-.": "editor::ToggleCodeActions",
"space j": "vim::PushSneak",
"space J": "vim::PushSneakBackward",
// Diagnostics
"space d w": "diagnostics::Deploy",
"space d t": "editor::ToggleInlineDiagnostics",
"space x x": "workspace::SuppressNotification",
// Git
"space g g": "git::Diff",
"space g p": "editor::ToggleSelectedDiffHunks",
@@ -114,35 +156,80 @@
"space g r": "git::Restore",
"space g b": "git::Branch",
"space g B": "editor::ToggleGitBlameInline",
// Buffer
"space b l": "tab_switcher::ToggleAll",
"space b x": "pane::CloseActiveItem",
"space x b": "pane::CloseActiveItem",
"space x o": "pane::CloseInactiveItems",
"space x o": "pane::CloseOtherItems",
"space b p": "pane::TogglePinTab",
// Quality of life improvements:
// Center the cursor when moving through document
"ctrl-d": ["workspace::SendKeystrokes", "Ctrl-d z z"],
"ctrl-u": ["workspace::SendKeystrokes", "Ctrl-u z z"],
"ctrl-o": ["workspace::SendKeystrokes", "Ctrl-o z z"],
"ctrl-i": ["workspace::SendKeystrokes", "Ctrl-i z z"],
"g ;": ["workspace::SendKeystrokes", "g ; z z"],
"g ,": ["workspace::SendKeystrokes", "g , z z"],
"] s": ["workspace::SendKeystrokes", "] s z z"],
"] d": ["workspace::SendKeystrokes", "] d z z"],
"n": ["workspace::SendKeystrokes", "n z z"],
"N": ["workspace::SendKeystrokes", "N z z"],
"ctrl-d": [
"workspace::SendKeystrokes",
"Ctrl-d z z"
],
"ctrl-u": [
"workspace::SendKeystrokes",
"Ctrl-u z z"
],
"ctrl-o": [
"workspace::SendKeystrokes",
"Ctrl-o z z"
],
"ctrl-i": [
"workspace::SendKeystrokes",
"Ctrl-i z z"
],
"g ;": [
"workspace::SendKeystrokes",
"g ; z z"
],
"g ,": [
"workspace::SendKeystrokes",
"g , z z"
],
"n": [
"workspace::SendKeystrokes",
"n z z"
],
"N": [
"workspace::SendKeystrokes",
"N z z"
],
//
// Better split management
"ctrl-j": ["workspace::SendKeystrokes", "ctrl-w j"],
"ctrl-k": ["workspace::SendKeystrokes", "ctrl-w k"],
"ctrl-h": ["workspace::SendKeystrokes", "ctrl-w h"],
"ctrl-l": ["workspace::SendKeystrokes", "ctrl-w l"],
"ctrl-up": ["workspace::SendKeystrokes", "ctrl-w +"],
"ctrl-down": ["workspace::SendKeystrokes", "ctrl-w -"],
"ctrl-right": ["workspace::SendKeystrokes", "ctrl-w >"],
"ctrl-left": ["workspace::SendKeystrokes", "ctrl-w <"]
"ctrl-j": [
"workspace::SendKeystrokes",
"ctrl-w j"
],
"ctrl-k": [
"workspace::SendKeystrokes",
"ctrl-w k"
],
"ctrl-h": [
"workspace::SendKeystrokes",
"ctrl-w h"
],
"ctrl-l": [
"workspace::SendKeystrokes",
"ctrl-w l"
],
"ctrl-up": [
"workspace::SendKeystrokes",
"ctrl-w +"
],
"ctrl-down": [
"workspace::SendKeystrokes",
"ctrl-w -"
],
"ctrl-right": [
"workspace::SendKeystrokes",
"ctrl-w >"
],
"ctrl-left": [
"workspace::SendKeystrokes",
"ctrl-w <"
]
}
}
]

View File

@@ -2,6 +2,40 @@
// custom settings, run `zed: open default settings` from the
// command palette
{
"show_edit_predictions": false,
"edit_predictions": {
"mode": "subtle"
},
"disable_ai": false,
"completion_menu_scrollbar": "auto",
"show_whitespaces": "trailing",
"toolbar": {
"code_actions": false
},
"relative_line_numbers": "enabled",
"prettier": {
"allowed": false
},
"search": {
"center_on_match": true,
"regex": true
},
"window_decorations": "client",
"use_system_window_tabs": false,
"preview_tabs": {
"enable_preview_multibuffer_from_code_navigation": false,
"enable_preview_from_project_panel": true,
"enable_preview_from_file_finder": true
},
"status_bar": {
"cursor_position_button": true,
"active_language_button": true
},
"git_panel": {
"collapse_untracked_diff": false,
"status_style": "label_color",
"default_width": 240.0
},
"auto_update_extensions": {
"proto": false,
"rainbow-csv": false,
@@ -16,17 +50,27 @@
"html": true,
"dockerfile": true
},
"telemetry": { "diagnostics": false, "metrics": false },
"telemetry": {
"diagnostics": false,
"metrics": false
},
// UI
"theme": {
"mode": "dark",
"light": "One Light",
"dark": "Github Dark Dimmed"
},
"icon_theme": "Modern Icons (Dark)",
"tabs": { "file_icons": true, "git_status": true },
"tab_bar": { "show_nav_history_buttons": false },
"icon_theme": "Material Icon Theme",
"tabs": {
"show_close_button": "always",
"show_diagnostics": "off",
"file_icons": true,
"git_status": true
},
"tab_bar": {
"show_tab_bar_buttons": true,
"show_nav_history_buttons": false
},
"ui_font_size": 17,
"buffer_font_size": 18,
"buffer_font_family": "MonoLisa",
@@ -41,30 +85,59 @@
"ss17": true,
"ss18": true
},
"agent_font_size": 18,
"agent_ui_font_size": 19,
"agent_buffer_font_size": 17,
"terminal": {
"font_family": "MonoLisa",
"font_size": 18,
"copy_on_select": true,
"button": true,
"scrollbar": { "show": "auto" },
"toolbar": { "breadcrumbs": true }
"scrollbar": {
"show": "auto"
},
"toolbar": {
"breadcrumbs": true
}
},
"outline_panel": {
"indent_size": 15,
"scrollbar": { "show": "auto" }
"git_status": false,
"default_width": 240.0,
"button": true,
"indent_size": 18.0,
"scrollbar": {
"show": "auto"
}
},
"project_panel": {
"indent_size": 15,
"button": true,
"hide_hidden": false,
"hide_root": true,
"git_status": true,
"folder_icons": false,
"file_icons": true,
"entry_spacing": "standard",
"indent_size": 18.0,
"show_diagnostics": "all",
"scrollbar": { "show": "auto" }
"scrollbar": {
"show": "auto"
}
},
"collaboration_panel": {
"button": false
},
"collaboration_panel": { "button": false },
"bottom_dock_layout": "right_aligned",
"file_finder": { "modal_max_width": "small" },
"file_finder": {
"modal_max_width": "small"
},
"use_smartcase_search": true,
"title_bar": { "show_branch_icon": true },
"title_bar": {
"show_menus": false,
"show_user_picture": false,
"show_onboarding_banner": true,
"show_project_items": true,
"show_branch_name": true,
"show_branch_icon": true
},
// Editor
"vim_mode": true,
"vim": {
@@ -73,10 +146,16 @@
},
"vertical_scroll_margin": 10,
"base_keymap": "VSCode",
"buffer_line_height": { "custom": 1.4 },
"buffer_line_height": {
"custom": 1.4
},
"tab_size": 4,
"soft_wrap": "editor_width",
"autosave": { "after_delay": { "milliseconds": 5000 } },
"autosave": {
"after_delay": {
"milliseconds": 2000
}
},
"format_on_save": "on",
"unnecessary_code_fade": 0.6,
"inlay_hints": {
@@ -88,15 +167,22 @@
"show_value_hints": true
},
"scrollbar": {
"cursors": true,
"git_diff": false
},
"indent_guides": { "enabled": true },
"indent_guides": {
"coloring": "fixed",
"enabled": true
},
"gutter": {
"runnables": true,
"min_line_number_digits": 2,
"breakpoints": true
},
"journal": { "path": "~/Code/", "hour_format": "hour24" },
"journal": {
"path": "~/Code/",
"hour_format": "hour24"
},
"diagnostics": {
"inline": {
"enabled": false,
@@ -105,7 +191,6 @@
}
},
// "file_scan_exclusions": [ ], // Files that Zed won't search
// Git
"git": {
"git_gutter": "tracked_files",
@@ -116,26 +201,21 @@
"min_column": 80
}
},
// AI
"agent": {
"default_profile": "write",
"default_model": {
"provider": "lmstudio",
"model": "unsloth/gpt-oss-20b"
},
"use_modifier_to_send": true,
"enable_feedback": false,
"default_profile": "ask",
"model_parameters": [],
"notify_when_agent_waiting": "all_screens"
"notify_when_agent_waiting": "never"
},
"edit_predictions_disabled_in": ["markdown"],
// LSP
"languages": {
"Markdown": {
"show_edit_predictions": false
}
},
"lsp": {
"rust-analyzer": {
"initialization_options": {

View File

@@ -88,6 +88,7 @@ export PYTHONUSERBASE="${XDG_DATA_HOME}/python"
export PYENV_ROOT="${XDG_DATA_HOME}/pyenv"
command -v pyenv >/dev/null && export PATH="$PATH:$PYENV_ROOT/bin:$PYENV_ROOT/shims"
command -v pyenv >/dev/null && eval "$(pyenv init -)"
export PATH="$XDG_DATA_HOME/python/bin:$PATH"
# Rust
export CARGO_HOME="${XDG_DATA_HOME}/rust/cargo"
@@ -122,3 +123,12 @@ export NODE_REPL_HISTORY="${XDG_CONFIG_HOME}/node/node_repl_history"
export N_PREFIX="${XDG_DATA_HOME}/n_node"
export PATH="$N_PREFIX/bin:$PATH"
command -v npm >/dev/null 2>&1 && PATH="$(npm config get prefix)/bin:$PATH"
# Bun configurations
export BUN_INSTALL_GLOBAL_DIR="$(npm config get prefix)/lib"
export BUN_INSTALL_BIN="$(npm config get prefix)/bin"
# CUDA path
export PATH="/usr/local/cuda-13.1/bin:$PATH"
export CUDA_HOME="/usr/local/cuda-13.1/"
export LD_LIBRARY_PATH="/usr/local/cuda-13.1/lib64:$LD_LIBRARY_PATH"

View File

@@ -87,7 +87,6 @@ cp_git_precommit() {
command -v tldr >/dev/null && alias tldr="tldr --platform=linux"
command -v tldr >/dev/null && alias h="tldr"
command -v fzf >/dev/null && alias path="printenv | grep ^PATH= | sed 's/^PATH=//' | tr ':' '\n' | fzf"
command -v podman >/dev/null && alias docker=podman
# Git
alias cd_root='cd $(git rev-parse --show-toplevel 2>/dev/null || echo ".")'
@@ -101,7 +100,6 @@ git_push_all_changes() {
git add . && git commit -am "${1}" && git push
}
# Directories and Directory listings
dir_size() {
if [ "$1" = "" ]; then
dir="$PWD"
@@ -117,7 +115,7 @@ up() {
# Detect package manager and set package manager commands
if command -v dnf >/dev/null 2>&1; then
update_command="sudo dnf upgrade --refresh && sudo dnf system-upgrade download --releasever=$(rpm -E %fedora) && sudo dnf autoremove"
update_command="sudo dnf update && sudo dnf upgrade --refresh && sudo dnf system-upgrade download --releasever=$(rpm -E %fedora) && sudo dnf autoremove"
elif command -v pkcon >/dev/null 2>&1; then
update_command="sudo pkcon refresh && sudo pkcon update && sudo apt dist-upgrade && sudo apt autoremove"
elif command -v apt-get >/dev/null 2>&1; then

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env sh
# TODO: Download & install patched-nerd-fonts
kitty_term() {
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

View File

@@ -1,4 +1,4 @@
#!/bin/sh
# TODO: Make folder-links and NOT link to each file
INSTALL="n"
DRY_RUN="n"
@@ -94,7 +94,7 @@ main() {
parse_input "$@"
install_file_location="$(
cd -- "$(dirname "$0")" > /dev/null 2>&1 || exit
cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit
pwd -P
)/scripts"