diff --git a/README.md b/README.md new file mode 100644 index 0000000..5331b79 --- /dev/null +++ b/README.md @@ -0,0 +1,110 @@ +# Vim and Tmux Keymaps + +## Tmux Keymaps + +### General Settings +- **Enable mouse support**: `set -g mouse on` (Allows scrolling, selecting panes, resizing) +- **Set scrollback buffer**: `set -g history-limit 2000` +- **Copy selected text to clipboard**: `set-option -g set-clipboard on` +- **Use vi-style key bindings**: `setw -g mode-keys vi` + +### Reload Configuration +- **Reload tmux config**: `prefix + r` (Reloads tmux configuration) + +### Pane Navigation +- **Move panes**: + - `Alt + Left` → Move left + - `Alt + Right` → Move right + - `Alt + Up` → Move up + - `Alt + Down` → Move down +- **Split panes**: + - `prefix + |` → Vertical split + - `prefix + -` → Horizontal split +- **Sync panes**: + - `prefix + y` → Enable pane synchronization + - `prefix + y` → Disable pane synchronization + +### Status Bar and UI Enhancements +- **Battery and time status**: `set -g status-right '#{battery_status_bg} battery: #{battery_percentage}% | %Y-%m-%d %H:%M '` +- **Pane border colors**: + - Inactive: `set -g pane-border-style fg=colour240` + - Active: `set -g pane-active-border-style fg=colour33` + +### Resize Panes +- **Resize using Ctrl + Option + Arrow keys (macOS friendly)**: + - `Ctrl + Option + Left` → Resize left + - `Ctrl + Option + Right` → Resize right + - `Ctrl + Option + Up` → Resize up + - `Ctrl + Option + Down` → Resize down + +## Vim Keymaps + +### File Management +- **Save file**: `space + w` +- **Save and close all files**: `space + x + a` +- **Close all files**: `space + q` +- **Reload Neovim config**: `space + s + o` +- **Clear search highlights**: `space + n + o` + +### Number Increment/Decrement +- **Increase number**: `space + +` +- **Decrease number**: `space + -` + +### Window Management +- **Split window vertically**: `space + s + v` +- **Split window horizontally**: `space + s + h` +- **Make splits equal size**: `space + s + e` +- **Close split**: `space + s + x` + +### Tabs +- **Open new tab**: `space + t + o` +- **Close tab**: `space + t + x` +- **Next tab**: `space + t + n` +- **Previous tab**: `space + t + p` +- **Move current buffer to new tab**: `space + t + f` + +### Syntax Formatting +- **Format current file**: `space + s + y` + +### Buffer Management +- **Close current buffer**: `space + b + d` + +### Navigation +- **Next buffer**: `Ctrl + p` +- **Previous buffer**: `Ctrl + n` + +### Coding Enhancements +- **Add import React**: `space + r + e` +- **Add comma at end of line**: `space + ,` +- **Add semicolon at end of line**: `space + ;` +- **Insert console.log() below**: `space + c + o + n` +- **Run current file with Node.js**: `space + x` + +### Resize Splits +- **Decrease vertical split**: `Ctrl + l` +- **Increase vertical split**: `Ctrl + h` +- **Increase horizontal split**: `Ctrl + k` +- **Decrease horizontal split**: `Ctrl + j` + +### LSP and Navigation +- **Show references**: `g + R` +- **Go to declaration**: `g + D` +- **Show definitions**: `g + d` +- **Show implementations**: `g + i` +- **Show type definitions**: `g + t` +- **See available code actions**: `space + c + a` +- **Rename variable**: `space + r + n` +- **Show buffer diagnostics**: `space + D` +- **Show line diagnostics**: `space + d` +- **Previous diagnostic**: `[ + d` +- **Next diagnostic**: `] + d` +- **Show documentation for cursor**: `K` +- **Restart LSP**: `space + r + s` + +### File Explorer (Nvim-Tree) +- **Toggle file explorer**: `space + e + e` +- **Toggle explorer on current file**: `space + n + t` +- **Collapse explorer**: `space + e + c` +- **Refresh explorer**: `space + e + r` + +This README provides an organized list of Vim and Tmux keymaps for efficient navigation and workflow. diff --git a/keyboard_mappings.md b/keyboard_mappings.md new file mode 100644 index 0000000..7f316e1 --- /dev/null +++ b/keyboard_mappings.md @@ -0,0 +1,95 @@ +# Custom Keyboard Keymaps + +## Overview +This document details the custom key mappings and functionality of the QMK firmware configuration, including mappings relevant to Neovim and Tmux usage. + +--- + +## Custom Keycodes + +### RGB Lighting Control +- **RGB_SLD**: Sets the RGB lighting mode to static. + +### Macro Key Bindings +These macros are optimized for Neovim and Tmux workflows. + +- **ST_MACRO_0**: Opens the Neovim terminal (`Alt + Cmd + I`). +- **ST_MACRO_1**: Moves backward in Tmux (`Ctrl + B`, then `D`). +- **ST_MACRO_2**: Moves forward in Tmux (`Ctrl + B`, then `C`). +- **ST_MACRO_3**: Moves to the previous Tmux window (`Ctrl + B`, then `P`). +- **ST_MACRO_4**: Moves to the next Tmux window (`Ctrl + B`, then `N`). +- **ST_MACRO_5**: Closes the current Tmux pane (`Ctrl + B`, then `W`). +- **ST_MACRO_6**: Splits a Tmux pane vertically (`Ctrl + B`, then `Shift + |`). +- **ST_MACRO_7**: Opens a new Tmux session (`Ctrl + B`, then `Shift + ;`, then `NEW`). +- **ST_MACRO_8**: Moves left in a Tmux pane (`Ctrl + B`, then `Left Arrow`). +- **ST_MACRO_9**: Moves down in a Tmux pane (`Ctrl + B`, then `Down Arrow`). +- **ST_MACRO_10**: Moves up in a Tmux pane (`Ctrl + B`, then `Up Arrow`). +- **ST_MACRO_11**: Moves right in a Tmux pane (`Ctrl + B`, then `Right Arrow`). +- **ST_MACRO_12**: Decreases window size in Tmux (`Ctrl + B`, then `-`). +- **ST_MACRO_13**: Moves to the beginning of a line in Neovim (`Space + B D`). +- **ST_MACRO_14**: Formats the entire file in Neovim (`Space + F G`). +- **ST_MACRO_15**: Creates a new tab in Neovim (`Space + N T`). + +### Special Functions +- **MAC_LOCK**: Triggers a system-specific lock command. + +--- + +## Tap Dance Actions +Tap dance actions allow a key to perform multiple functions depending on the number of taps. + +### **DANCE_0** +- **Single Tap**: Escape key (useful for exiting insert mode in Neovim). +- **Single Hold**: `Ctrl + Up` (scrolls up in Neovim or switches buffers). +- **Double Tap**: Sends double Escape (useful for quickly leaving insert mode in Neovim). + +### **DANCE_1** +- **Single Tap**: Grave (`~`) (for quick access to tilde in Vim commands). +- **Single Hold**: `&` (used in Tmux for window management). +- **Double Tap**: Sends double grave (`~~`). + +### **DANCE_2** +- **Single Tap**: Spacebar (default action). +- **Single Hold**: `Cmd + Space` (Spotlight search on macOS, also used for command execution in Neovim). +- **Double Tap**: Sends double space (quick spacing in text documents). + +### **DANCE_3** +- **Single Tap**: `0` (moves cursor to the beginning of a line in Neovim). +- **Single Hold**: `=` (resizes panes in Tmux). +- **Double Tap**: Sends double `0`. + +--- + +## Layer Functions +The keyboard supports multiple layers for different functionalities. + +### **Layer 0 (Default Layer - Neovim and Tmux Focused)** +- **Neovim shortcuts**: Efficient navigation and command execution. +- **Tmux pane/window management**: Quick switching and resizing. + +### **Layer 1 (Function & Symbols Layer)** +- **F-keys (F1–F12)** +- **Media and RGB controls** +- **Special characters (`@, $, %, &, *, etc.`)** + +### **Layer 2 (Macros & Shortcuts Layer)** +- **Macro functions for Neovim (`ST_MACRO_1–15`)** +- **Media and navigation shortcuts** + +### **Layer 3 (Navigation & Window Management Layer)** +- **Arrow keys and window movement shortcuts** +- **Undo, cut, paste, and system controls** +- **Tmux session switching and splits** + +### **Layer 4 (Mouse & Boot Mode Layer)** +- **Mouse controls and screenshot shortcuts** +- **Boot mode activation (`QK_BOOT`)** + +--- + +## Special Modifiers +- **MO(n)**: Momentary activation of layer `n`. +- **LT(n, key)**: Hold for layer `n`, tap for `key`. +- **TG(n)**: Toggle layer `n` on/off. + +This structured keymap provides an overview of the keyboard's advanced functionality, integrating Neovim, Tmux, and QMK efficiently. diff --git a/lazigitconfig.log b/lazigitconfig.log new file mode 100644 index 0000000..4879388 --- /dev/null +++ b/lazigitconfig.log @@ -0,0 +1,296 @@ +gui: + authorColors: {} + branchColors: {} + branchColorPatterns: {} + scrollHeight: 2 + scrollPastBottom: true + scrollOffMargin: 2 + scrollOffBehavior: margin + mouseEvents: true + skipDiscardChangeWarning: false + skipStashWarning: false + skipNoStagedFilesWarning: false + skipRewordInEditorWarning: false + sidePanelWidth: 0.3333 + expandFocusedSidePanel: false + expandedSidePanelWeight: 2 + mainPanelSplitMode: flexible + enlargedSideViewLocation: left + wrapLinesInStagingView: true + language: auto + timeFormat: 02 Jan 06 + shortTimeFormat: 3:04PM + theme: + activeBorderColor: + - green + - bold + inactiveBorderColor: + - default + searchingActiveBorderColor: + - cyan + - bold + optionsTextColor: + - blue + selectedLineBgColor: + - blue + inactiveViewSelectedLineBgColor: + - bold + cherryPickedCommitFgColor: + - blue + cherryPickedCommitBgColor: + - cyan + markedBaseCommitFgColor: + - blue + markedBaseCommitBgColor: + - yellow + unstagedChangesColor: + - red + defaultFgColor: + - default + commitLength: + show: true + showListFooter: true + showFileTree: true + showNumstatInFilesView: false + showRandomTip: true + showCommandLog: true + showBottomLine: true + showPanelJumps: true + showIcons: false + nerdFontsVersion: "" + showFileIcons: true + commitAuthorShortLength: 2 + commitAuthorLongLength: 17 + commitHashLength: 8 + showBranchCommitHash: false + showDivergenceFromBaseBranch: none + commandLogSize: 8 + splitDiff: auto + screenMode: normal + border: rounded + animateExplosion: true + portraitMode: auto + filterMode: substring + spinner: + frames: + - '|' + - / + - '-' + - \ + rate: 50 + statusPanelView: dashboard + switchToFilesAfterStashPop: true + switchToFilesAfterStashApply: true + switchTabsWithPanelJumpKeys: false +git: + paging: + colorArg: always + pager: "" + useConfig: false + externalDiffCommand: "" + commit: + signOff: false + autoWrapCommitMessage: true + autoWrapWidth: 72 + merging: + manualCommit: false + args: "" + squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}} + mainBranches: + - master + - main + skipHookPrefix: WIP + autoFetch: true + autoRefresh: true + fetchAll: true + autoStageResolvedConflicts: true + branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} -- + allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium + allBranchesLogCmds: [] + overrideGpg: false + disableForcePushing: false + commitPrefix: null + commitPrefixes: {} + branchPrefix: "" + parseEmoji: false + log: + order: topo-order + showGraph: always + showWholeGraph: false + truncateCopiedCommitHashesTo: 12 +update: + method: prompt + days: 14 +refresher: + refreshInterval: 10 + fetchInterval: 60 +confirmOnQuit: false +quitOnTopLevelReturn: false +disableStartupPopups: false +customCommands: [] +services: {} +notARepository: prompt +promptToReturnFromSubprocess: true +keybinding: + universal: + quit: q + quit-alt1: + return: + quitWithoutChangingDirectory: Q + togglePanel: + prevItem: + nextItem: + prevItem-alt: k + nextItem-alt: j + prevPage: ',' + nextPage: . + scrollLeft: H + scrollRight: L + gotoTop: < + gotoBottom: '>' + toggleRangeSelect: v + rangeSelectDown: + rangeSelectUp: + prevBlock: + nextBlock: + prevBlock-alt: h + nextBlock-alt: l + nextBlock-alt2: + prevBlock-alt2: + jumpToBlock: + - "1" + - "2" + - "3" + - "4" + - "5" + nextMatch: "n" + prevMatch: "N" + startSearch: / + optionMenu: + optionMenu-alt1: '?' + select: + goInto: + confirm: + confirmInEditor: + remove: d + new: "n" + edit: e + openFile: o + scrollUpMain: + scrollDownMain: + scrollUpMain-alt1: K + scrollDownMain-alt1: J + scrollUpMain-alt2: + scrollDownMain-alt2: + executeShellCommand: ':' + createRebaseOptionsMenu: m + pushFiles: P + pullFiles: p + refresh: R + createPatchOptionsMenu: + nextTab: ']' + prevTab: '[' + nextScreenMode: + + prevScreenMode: _ + undo: z + redo: + filteringMenu: + diffingMenu: W + diffingMenu-alt: + copyToClipboard: + openRecentRepos: + submitEditorText: + extrasMenu: '@' + toggleWhitespaceInDiffView: + increaseContextInDiffView: '}' + decreaseContextInDiffView: '{' + increaseRenameSimilarityThreshold: ) + decreaseRenameSimilarityThreshold: ( + openDiffTool: + status: + checkForUpdate: u + recentRepos: + allBranchesLogGraph: a + files: + commitChanges: c + commitChangesWithoutHook: w + amendLastCommit: A + commitChangesWithEditor: C + findBaseCommitForFixup: + confirmDiscard: x + ignoreFile: i + refreshFiles: r + stashAllChanges: s + viewStashOptions: S + toggleStagedAll: a + viewResetOptions: D + fetch: f + toggleTreeView: '`' + openMergeTool: M + openStatusFilter: + copyFileInfoToClipboard: "y" + collapseAll: '-' + expandAll: = + branches: + createPullRequest: o + viewPullRequestOptions: O + copyPullRequestURL: + checkoutBranchByName: c + forceCheckoutBranch: F + rebaseBranch: r + renameBranch: R + mergeIntoCurrentBranch: M + viewGitFlowOptions: i + fastForward: f + createTag: T + pushTag: P + setUpstream: u + fetchRemote: f + sortOrder: s + worktrees: + viewWorktreeOptions: w + commits: + squashDown: s + renameCommit: r + renameCommitWithEditor: R + viewResetOptions: g + markCommitAsFixup: f + createFixupCommit: F + squashAboveCommits: S + moveDownCommit: + moveUpCommit: + amendToCommit: A + resetCommitAuthor: a + pickCommit: p + revertCommit: t + cherryPickCopy: C + pasteCommits: V + markCommitAsBaseForRebase: B + tagCommit: T + checkoutCommit: + resetCherryPick: + copyCommitAttributeToClipboard: "y" + openLogMenu: + openInBrowser: o + viewBisectOptions: b + startInteractiveRebase: i + amendAttribute: + resetAuthor: a + setAuthor: A + addCoAuthor: c + stash: + popStash: g + renameStash: r + commitFiles: + checkoutCommitFile: c + main: + toggleSelectHunk: a + pickBothHunks: b + editSelectHunk: E + submodules: + init: i + update: u + bulkMenu: b + commitMessage: + commitMenu: + diff --git a/lazy-lock.json b/lazy-lock.json index 4867329..cae09b5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -12,33 +12,33 @@ "copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" }, "dressing.nvim": { "branch": "master", "commit": "56ef6a969a4990d938c5fed40c370f65e125fc97" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "gitsigns.nvim": { "branch": "main", "commit": "9772ce68a9a6d156f3f2166bfd0a17a09ab37eba" }, + "gitsigns.nvim": { "branch": "main", "commit": "4baa13519c2168cc9a7890a3580c50226ed018fb" }, "indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" }, - "lazy.nvim": { "branch": "main", "commit": "7527af40ddd4a93a02911be570b32609b9d4ea53" }, + "lazy.nvim": { "branch": "main", "commit": "f15a93907ddad3d9139aea465ae18336d87f5ce6" }, "lazygit.nvim": { "branch": "main", "commit": "adc37c5a6d7d6e8d0a039f08f3c7837971a1c77a" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, - "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "f75e877f5266e87523eb5a18fcde2081820d087b" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "374c78d3ebb5c53f43ea6bd906b6587b5e899b9e" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "noice.nvim": { "branch": "main", "commit": "e3c68a4d2275a01268a52e2931bfccfbfb693d15" }, + "noice.nvim": { "branch": "main", "commit": "cf758e9df66451889aab56613a21b8673f045ec2" }, "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, "nvim-autopairs": { "branch": "master", "commit": "3d02855468f94bf435db41b661b58ec4f48a06b7" }, "nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" }, - "nvim-dap": { "branch": "master", "commit": "12b846bedbc7221e833b5e6611de21917d7d9184" }, + "nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" }, "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, - "nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" }, + "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, - "nvim-lspconfig": { "branch": "master", "commit": "66bc018936c6ff76beb75f89d986af6442db4001" }, + "nvim-lspconfig": { "branch": "master", "commit": "75edb91a3d2deabe76a9911cde2c13d411b3b097" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, "nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" }, "nvim-tree.lua": { "branch": "master", "commit": "70825f23db61ecd900c4cfea169bffe931926a9d" }, - "nvim-treesitter": { "branch": "master", "commit": "9e0b5e7f0d148963d6ec71c48cec1a3f8607d619" }, + "nvim-treesitter": { "branch": "master", "commit": "48f7ce34ef274af10a3b2aa24932a310b1bd055d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, @@ -54,5 +54,6 @@ "vim-buftabline": { "branch": "master", "commit": "73b9ef5dcb6cdf6488bc88adb382f20bc3e3262a" }, "vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, "vim-tmux-navigator": { "branch": "master", "commit": "d847ea942a5bb4d4fab6efebc9f30d787fd96e65" }, + "vim-wakatime": { "branch": "master", "commit": "e46d7c4f98ee0f40782008dd60cb2a79c377fb1d" }, "which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" } } diff --git a/lua/cargdev/core/keymaps.lua b/lua/cargdev/core/keymaps.lua index a2cb19f..6b51142 100644 --- a/lua/cargdev/core/keymaps.lua +++ b/lua/cargdev/core/keymaps.lua @@ -58,3 +58,10 @@ keymap.set("n", "x", ":!node %", { desc = "Running current project u -- keymap.set("n", "", ":TmuxNavigateDown", { noremap = true, silent = true }) -- keymap.set("n", "", ":TmuxNavigateUp", { noremap = true, silent = true }) -- keymap.set("n", "", ":TmuxNavigateRight", { noremap = true, silent = true }) + +-- Resize splits using Ctrl + Arrow keys + +keymap.set("n", "", ":vertical resize -5", { noremap = true, silent = true }) +keymap.set("n", "", ":vertical resize +5", { noremap = true, silent = true }) +keymap.set("n", "", ":resize +5", { noremap = true, silent = true }) +keymap.set("n", "", ":resize -5", { noremap = true, silent = true }) diff --git a/lua/cargdev/core/options.lua b/lua/cargdev/core/options.lua index 277db72..a0c3e30 100644 --- a/lua/cargdev/core/options.lua +++ b/lua/cargdev/core/options.lua @@ -2,6 +2,8 @@ vim.cmd("let g:netrw_liststyle = 3") local opt = vim.opt +vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" + opt.relativenumber = true opt.number = true @@ -37,3 +39,12 @@ opt.splitbelow = true -- split horizontal window to the bottom -- turn off swapfile opt.swapfile = false + +-- Enable soft wrapping of long lines +opt.wrap = true + +-- Break lines at convenient points (e.g. after whitespace) rather than in the middle of a word +opt.linebreak = true + +-- Optionally, add a prefix to wrapped lines to visually indicate a wrap +opt.showbreak = "↪ " diff --git a/lua/cargdev/plugins/colorscheme.lua b/lua/cargdev/plugins/colorscheme.lua index 2c1d558..19482a5 100644 --- a/lua/cargdev/plugins/colorscheme.lua +++ b/lua/cargdev/plugins/colorscheme.lua @@ -4,25 +4,25 @@ return { config = function() local transparent = false -- set to true if you would like to enable transparency - -- local bg = "#011628" - -- local bg_dark = "#011423" - -- local bg_highlight = "#143652" - -- local bg_search = "#0A64AC" - -- local bg_visual = "#275378" - -- local fg = "#CBE0F0" - -- local fg_dark = "#B4D0E9" - -- local fg_gutter = "#627E97" - -- local border = "#547998" - - local bg = "#1A1A2E" - local bg_dark = "#29294B" - local bg_highlight = "#4E4E50" - local bg_search = "#1A1743" - local bg_visual = "#70707E" - local fg = "#BFC5D2" + local bg = "#011628" + local bg_dark = "#011423" + local bg_highlight = "#143652" + local bg_search = "#0A64AC" + local bg_visual = "#275378" + local fg = "#CBE0F0" local fg_dark = "#B4D0E9" local fg_gutter = "#627E97" - local border = "#687494" + local border = "#547998" + + -- local bg = "#1A1A2E" + -- local bg_dark = "#29294B" + -- local bg_highlight = "#4E4E50" + -- local bg_search = "#1A1743" + -- local bg_visual = "#70707E" + -- local fg = "#BFC5D2" + -- local fg_dark = "#B4D0E9" + -- local fg_gutter = "#627E97" + -- local border = "#687494" require("tokyonight").setup({ style = "night", diff --git a/lua/cargdev/plugins/formatting.lua b/lua/cargdev/plugins/formatting.lua index 31c081b..49acd04 100644 --- a/lua/cargdev/plugins/formatting.lua +++ b/lua/cargdev/plugins/formatting.lua @@ -12,6 +12,7 @@ return { typescriptreact = { "prettier" }, svelte = { "prettier" }, css = { "prettier" }, + scss = { "prettier" }, html = { "prettier" }, json = { "prettier" }, yaml = { "prettier" }, diff --git a/lua/cargdev/plugins/lsp/lspconfig.lua b/lua/cargdev/plugins/lsp/lspconfig.lua index 7fa084e..cc3047c 100644 --- a/lua/cargdev/plugins/lsp/lspconfig.lua +++ b/lua/cargdev/plugins/lsp/lspconfig.lua @@ -51,7 +51,7 @@ return { keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) -- show diagnostics for file opts.desc = "Show line diagnostics" - keymap.set("n", "d", vim.diagnostic.open_float, opts) -- show diagnostics for line + keymap.set("n", "dd", vim.diagnostic.open_float, opts) -- show diagnostics for line opts.desc = "Go to previous diagnostic" keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer @@ -79,16 +79,43 @@ return { end mason_lspconfig.setup_handlers({ - -- default handler for installed servers + ["tsserver"] = function() + lspconfig["tsserver"].setup({ + capabilities = capabilities, + root_dir = lspconfig.util.root_pattern("package.json"), + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = true, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = false, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + }, + }) + end, ["eslint"] = function() lspconfig["eslint"].setup({ + experimental = { + useFlatConfig = true, + }, capabilities = capabilities, settings = { - experimental = { useFlatConfig = true }, -- ✅ Enables Flat Config Support codeActionOnSave = { enable = true }, format = { enable = true }, }, - root_dir = lspconfig.util.root_pattern("eslint.config.js", "package.json"), + root_dir = lspconfig.util.root_pattern( + "eslint.config.js", + ".eslintrc.js", + ".eslintrc.json", + ".eslintrc.yaml", + ".eslintrc.yml", + "package.json" + ), }) end, ["svelte"] = function() diff --git a/lua/cargdev/plugins/noice.lua b/lua/cargdev/plugins/noice.lua index b3b43d4..5a86f9c 100644 --- a/lua/cargdev/plugins/noice.lua +++ b/lua/cargdev/plugins/noice.lua @@ -8,48 +8,69 @@ return { config = function() require("noice").setup({ cmdline = { - enabled = true, -- Enables floating command-line window - view = "cmdline_popup", -- Use floating popup instead of bottom bar + enabled = true, + view = "cmdline_popup", format = { - cmdline = { icon = ">" }, -- Custom icon for `:` - search_down = { icon = "🔍 " }, -- Custom icon for `/` - search_up = { icon = "🔍 " }, -- Custom icon for `?` + cmdline = { icon = ">" }, + search_down = { icon = "🔍 " }, + search_up = { icon = "🔍 " }, filter = { icon = "$" }, lua = { icon = "" }, help = { icon = "?" }, }, }, messages = { - enabled = true, -- Show messages in floating windows - view = "notify", -- Use floating popup instead of bottom bar + enabled = true, + view = "mini", -- Mini popup for messages + view_error = "mini", -- Ensure errors also use mini + view_warn = "mini", + view_history = "messages", + view_search = "virtualtext", }, popupmenu = { - enabled = true, -- Floating completion menu + enabled = true, backend = "nui", }, lsp = { progress = { enabled = false, }, + message = { + enabled = true, + view = "mini", -- Show LSP messages in mini popup + }, }, views = { - notify = { - position = "top", -- Moves notifications to the bottom - win_options = { winblend = 10 }, -- Optional transparency - max_height = 2, -- Max height of the notification window - max_width = 50, -- Max width of the notification window - }, mini = { position = { - row = -2, -- Positions it closer to the bottom + row = "100%", -- Place it at the bottom of the screen + col = "50%", -- Center it horizontally + }, + border = { + style = "rounded", + }, + win_options = { + winblend = 10, -- Slight transparency + }, + max_height = 2, -- Small window size + max_width = 60, + }, + notify = { + position = { + row = "100%", -- Bottom of the screen col = "50%", }, + win_options = { + winblend = 10, + }, + max_height = 2, + max_width = 60, }, }, presets = { - bottom_search = false, -- Disable default bottom search bar - command_palette = true, -- Make commands appear in the center - long_message_to_split = true, -- Long messages go to a split + bottom_search = false, + command_palette = true, + long_message_to_split = false, }, }) end, diff --git a/lua/cargdev/plugins/nvim-tree.lua b/lua/cargdev/plugins/nvim-tree.lua index 1d725b2..bf4131e 100644 --- a/lua/cargdev/plugins/nvim-tree.lua +++ b/lua/cargdev/plugins/nvim-tree.lua @@ -56,6 +56,13 @@ return { -- Open file in the current window vim.keymap.set("n", "o", api.node.open.edit, opts) + + -- Navigate Up (Back One Folder Level) + vim.keymap.set("n", "u", api.tree.change_root_to_parent, opts) + + -- Navigate Forward (Enter a Folder) + vim.keymap.set("n", "f", api.tree.change_root_to_node, opts) + -- File Management keybindings vim.keymap.set("n", "a", function() -- Add a new file vim.cmd("set modifiable") -- Ensure modifiable mode is on diff --git a/lua/cargdev/plugins/substitute.lua b/lua/cargdev/plugins/substitute.lua index b5ff1b6..d0bd8d9 100644 --- a/lua/cargdev/plugins/substitute.lua +++ b/lua/cargdev/plugins/substitute.lua @@ -9,8 +9,8 @@ return { -- set keymaps local keymap = vim.keymap -- for conciseness - keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" }) - keymap.set("n", "ss", substitute.line, { desc = "Substitute line" }) + keymap.set("n", "ss", "S", { desc = "Substitute line" }) + keymap.set("n", "s", "s", { desc = "Substitute with motion" }) keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" }) keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" }) end, diff --git a/lua/cargdev/plugins/wakatime.lua b/lua/cargdev/plugins/wakatime.lua new file mode 100644 index 0000000..e151fc3 --- /dev/null +++ b/lua/cargdev/plugins/wakatime.lua @@ -0,0 +1 @@ +return { "wakatime/vim-wakatime", lazy = false }