Move NvimTree file explorer to left side
- Change side from 'right' to 'left' in nvim-tree.lua - Update edgy.nvim config to place NvimTree in left panel
This commit is contained in:
503
KEYMAPS.md
Normal file
503
KEYMAPS.md
Normal file
@@ -0,0 +1,503 @@
|
|||||||
|
# Complete Keymaps Reference
|
||||||
|
|
||||||
|
**Leader Key: `<Space>`**
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
- [Navigation](#navigation)
|
||||||
|
- [File Management](#file-management)
|
||||||
|
- [Editing](#editing)
|
||||||
|
- [LSP & Code Intelligence](#lsp--code-intelligence)
|
||||||
|
- [Git](#git)
|
||||||
|
- [Debugging](#debugging)
|
||||||
|
- [Search & Replace](#search--replace)
|
||||||
|
- [Tasks & HTTP](#tasks--http)
|
||||||
|
- [UI & Productivity](#ui--productivity)
|
||||||
|
- [Language Specific](#language-specific)
|
||||||
|
- [Window Management](#window-management)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Navigation
|
||||||
|
|
||||||
|
### Flash (Jump Anywhere)
|
||||||
|
| Key | Mode | Action |
|
||||||
|
|-----|------|--------|
|
||||||
|
| `s` | n, x, o | Flash jump (type chars to jump) |
|
||||||
|
| `S` | n, x, o | Flash treesitter select |
|
||||||
|
| `r` | o | Remote flash |
|
||||||
|
| `R` | o, x | Treesitter search |
|
||||||
|
| `<C-s>` | c | Toggle flash in search |
|
||||||
|
|
||||||
|
### Harpoon (Quick File Marks)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>ha` | Add current file to harpoon |
|
||||||
|
| `<leader>hh` | Open harpoon menu |
|
||||||
|
| `<leader>1` | Jump to harpoon file 1 |
|
||||||
|
| `<leader>2` | Jump to harpoon file 2 |
|
||||||
|
| `<leader>3` | Jump to harpoon file 3 |
|
||||||
|
| `<leader>4` | Jump to harpoon file 4 |
|
||||||
|
| `<leader>5` | Jump to harpoon file 5 |
|
||||||
|
| `<leader>hp` | Previous harpoon file |
|
||||||
|
| `<leader>hn` | Next harpoon file |
|
||||||
|
|
||||||
|
### Portal (Jumplist Navigation)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>pj` | Portal jumplist backward |
|
||||||
|
| `<leader>pk` | Portal jumplist forward |
|
||||||
|
| `<leader>pc` | Portal changelist backward |
|
||||||
|
| `<leader>pq` | Portal quickfix backward |
|
||||||
|
|
||||||
|
### Navbuddy (Code Structure)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>nb` | Open Navbuddy |
|
||||||
|
|
||||||
|
Inside Navbuddy:
|
||||||
|
- `h/j/k/l` - Navigate
|
||||||
|
- `<Enter>` - Select
|
||||||
|
- `0` - Go to root
|
||||||
|
- `q` - Close
|
||||||
|
|
||||||
|
### Telescope
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>ff` | Find files |
|
||||||
|
| `<leader>fs` | Live grep (search text) |
|
||||||
|
| `<leader>fg` | Git files |
|
||||||
|
| `<leader>fF` | Find all files |
|
||||||
|
| `<leader>fr` | Recent files |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## File Management
|
||||||
|
|
||||||
|
### File Explorer (nvim-tree)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>e` | Toggle file explorer |
|
||||||
|
| `<leader>ee` | Toggle file explorer |
|
||||||
|
| `<leader>nt` | Find current file in tree |
|
||||||
|
| `<leader>ec` | Collapse file explorer |
|
||||||
|
| `<leader>er` | Refresh file explorer |
|
||||||
|
|
||||||
|
Inside nvim-tree:
|
||||||
|
- `o` - Open file
|
||||||
|
- `s` - Open in vertical split
|
||||||
|
- `i` - Open in horizontal split
|
||||||
|
- `a` - Create new file
|
||||||
|
- `r` - Rename
|
||||||
|
- `d` - Delete
|
||||||
|
- `x` - Cut
|
||||||
|
- `y` - Copy
|
||||||
|
- `p` - Paste
|
||||||
|
- `u` - Go up one directory
|
||||||
|
|
||||||
|
### Buffers
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<S-l>` | Next buffer |
|
||||||
|
| `<S-h>` | Previous buffer |
|
||||||
|
| `<leader>bd` | Close buffer |
|
||||||
|
| `<leader>bD` | Force close buffer |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Editing
|
||||||
|
|
||||||
|
### Multi-Cursor (vim-visual-multi)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<C-d>` | Select word under cursor / Add next occurrence |
|
||||||
|
| `<C-Down>` | Add cursor below |
|
||||||
|
| `<C-Up>` | Add cursor above |
|
||||||
|
| `<C-S-l>` | Select all occurrences |
|
||||||
|
| `<C-x>` | Skip current match |
|
||||||
|
| `<C-p>` | Remove current cursor |
|
||||||
|
| `<Esc>` | Exit multi-cursor |
|
||||||
|
|
||||||
|
### Yanky (Yank Ring)
|
||||||
|
| Key | Mode | Action |
|
||||||
|
|-----|------|--------|
|
||||||
|
| `y` | n, x | Yank |
|
||||||
|
| `p` | n, x | Put after |
|
||||||
|
| `P` | n, x | Put before |
|
||||||
|
| `<C-p>` | n | Previous yank in ring |
|
||||||
|
| `<C-n>` | n | Next yank in ring |
|
||||||
|
| `<leader>yh` | n | Open yank history |
|
||||||
|
| `]p` | n | Put indented after |
|
||||||
|
| `[p` | n | Put indented before |
|
||||||
|
|
||||||
|
### Treesj (Split/Join)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>tj` | Toggle split/join |
|
||||||
|
| `<leader>ts` | Split code block |
|
||||||
|
| `<leader>tJ` | Join code block |
|
||||||
|
|
||||||
|
### Dial (Smart Increment)
|
||||||
|
| Key | Mode | Action |
|
||||||
|
|-----|------|--------|
|
||||||
|
| `<C-a>` | n, v | Increment |
|
||||||
|
| `<C-x>` | n, v | Decrement |
|
||||||
|
| `g<C-a>` | n, v | Increment (sequence) |
|
||||||
|
| `g<C-x>` | n, v | Decrement (sequence) |
|
||||||
|
|
||||||
|
Works on: numbers, booleans, dates, CSS units, HTTP methods, operators, and more!
|
||||||
|
|
||||||
|
### Surround
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `ys{motion}{char}` | Add surround |
|
||||||
|
| `ds{char}` | Delete surround |
|
||||||
|
| `cs{old}{new}` | Change surround |
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
- `ysiw"` - Surround word with quotes
|
||||||
|
- `ds"` - Delete surrounding quotes
|
||||||
|
- `cs"'` - Change " to '
|
||||||
|
|
||||||
|
### Comments
|
||||||
|
| Key | Mode | Action |
|
||||||
|
|-----|------|--------|
|
||||||
|
| `gcc` | n | Toggle line comment |
|
||||||
|
| `gc` | v | Toggle comment selection |
|
||||||
|
| `gbc` | n | Toggle block comment |
|
||||||
|
| `<leader>/` | n, v | Toggle comment |
|
||||||
|
|
||||||
|
### Substitute
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>sub` | Substitute with motion |
|
||||||
|
| `<leader>sl` | Substitute line |
|
||||||
|
| `<leader>S` | Substitute to end of line |
|
||||||
|
|
||||||
|
### Undo Tree
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>tu` | Toggle undo tree |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## LSP & Code Intelligence
|
||||||
|
|
||||||
|
### LSP Saga
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `K` | Hover documentation |
|
||||||
|
| `gd` | Peek definition |
|
||||||
|
| `gD` | Go to definition |
|
||||||
|
| `gt` | Peek type definition |
|
||||||
|
| `gT` | Go to type definition |
|
||||||
|
| `gh` | LSP finder (refs + impl) |
|
||||||
|
| `gr` | Rename |
|
||||||
|
| `gR` | Rename (project-wide) |
|
||||||
|
| `<leader>ca` | Code actions |
|
||||||
|
| `<leader>sl` | Show line diagnostics |
|
||||||
|
| `<leader>sc` | Show cursor diagnostics |
|
||||||
|
| `<leader>sb` | Show buffer diagnostics |
|
||||||
|
| `[d` | Previous diagnostic |
|
||||||
|
| `]d` | Next diagnostic |
|
||||||
|
| `<leader>ci` | Incoming calls |
|
||||||
|
| `<leader>co` | Outgoing calls |
|
||||||
|
| `<leader>so` | Toggle LSP outline |
|
||||||
|
|
||||||
|
### Inc-Rename (Live Preview)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>rn` | Rename with live preview |
|
||||||
|
|
||||||
|
### Outline
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>cs` | Toggle symbol outline |
|
||||||
|
|
||||||
|
### Formatting
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>f` | Format buffer |
|
||||||
|
| `<leader>mm` | Format with conform |
|
||||||
|
|
||||||
|
### Regexplainer
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>rx` | Toggle regex explanation |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Git
|
||||||
|
|
||||||
|
### LazyGit
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>gg` | Open LazyGit |
|
||||||
|
|
||||||
|
### Neogit
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>gn` | Open Neogit |
|
||||||
|
| `<leader>gnc` | Neogit commit |
|
||||||
|
| `<leader>gnp` | Neogit push |
|
||||||
|
| `<leader>gnl` | Neogit pull |
|
||||||
|
| `<leader>gnb` | Neogit branch |
|
||||||
|
|
||||||
|
### Diffview
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>gd` | Open diffview |
|
||||||
|
| `<leader>gD` | Close diffview |
|
||||||
|
| `<leader>gh` | File history (current file) |
|
||||||
|
| `<leader>gH` | File history (repo) |
|
||||||
|
|
||||||
|
### Git Blame
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>gB` | Toggle git blame |
|
||||||
|
| `<leader>gbc` | Copy commit SHA |
|
||||||
|
| `<leader>gbo` | Open commit URL |
|
||||||
|
| `<leader>gbf` | Open file URL |
|
||||||
|
|
||||||
|
### Octo (GitHub)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>oi` | List issues |
|
||||||
|
| `<leader>oI` | Create issue |
|
||||||
|
| `<leader>op` | List PRs |
|
||||||
|
| `<leader>oP` | Create PR |
|
||||||
|
| `<leader>or` | List repos |
|
||||||
|
| `<leader>os` | Search issues/PRs |
|
||||||
|
| `<leader>oa` | Octo actions |
|
||||||
|
|
||||||
|
### Gitsigns
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `]c` | Next hunk |
|
||||||
|
| `[c` | Previous hunk |
|
||||||
|
| `<leader>hs` | Stage hunk |
|
||||||
|
| `<leader>hr` | Reset hunk |
|
||||||
|
| `<leader>hp` | Preview hunk |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Debugging
|
||||||
|
|
||||||
|
### DAP (Debug Adapter Protocol)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>db` | Toggle breakpoint |
|
||||||
|
| `<leader>dcc` | Start/Continue debugging |
|
||||||
|
| `<leader>di` | Step into |
|
||||||
|
| `<leader>do` | Step over |
|
||||||
|
| `<leader>dO` | Step out |
|
||||||
|
| `<leader>dr` | Toggle REPL |
|
||||||
|
| `<leader>dl` | Run last debug config |
|
||||||
|
| `<leader>du` | Toggle DAP UI |
|
||||||
|
| `<leader>dt` | Float element |
|
||||||
|
| `<leader>dco` | DAP commands |
|
||||||
|
| `<leader>dcf` | List DAP configs |
|
||||||
|
| `<leader>dcb` | List breakpoints |
|
||||||
|
|
||||||
|
### Java Debugging
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>jd` | Debug class |
|
||||||
|
| `<leader>jt` | Test class |
|
||||||
|
| `<leader>jn` | Test nearest method |
|
||||||
|
| `<leader>jr` | Run Java file |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Search & Replace
|
||||||
|
|
||||||
|
### Grug-Far (Project-Wide)
|
||||||
|
| Key | Mode | Action |
|
||||||
|
|-----|------|--------|
|
||||||
|
| `<leader>sr` | n | Open search & replace |
|
||||||
|
| `<leader>sR` | n | Search current word |
|
||||||
|
| `<leader>sR` | v | Search selection |
|
||||||
|
|
||||||
|
Inside Grug-Far:
|
||||||
|
- `<localleader>r` - Replace
|
||||||
|
- `<localleader>R` - Replace all
|
||||||
|
- `<Enter>` - Go to location
|
||||||
|
- `q` - Close
|
||||||
|
|
||||||
|
### SSR (Structural Search/Replace)
|
||||||
|
| Key | Mode | Action |
|
||||||
|
|-----|------|--------|
|
||||||
|
| `<leader>sR` | n, x | Structural search/replace |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Tasks & HTTP
|
||||||
|
|
||||||
|
### Overseer (Task Runner)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>or` | Run task |
|
||||||
|
| `<leader>ot` | Toggle task list |
|
||||||
|
| `<leader>oa` | Task action |
|
||||||
|
| `<leader>oq` | Quick action |
|
||||||
|
| `<leader>ob` | Build |
|
||||||
|
| `<leader>oc` | Run shell command |
|
||||||
|
|
||||||
|
### Kulala (HTTP Client)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>kr` | Run HTTP request |
|
||||||
|
| `<leader>ka` | Run all requests |
|
||||||
|
| `<leader>kp` | Previous request |
|
||||||
|
| `<leader>kn` | Next request |
|
||||||
|
| `<leader>ki` | Inspect request |
|
||||||
|
| `<leader>kt` | Toggle headers/body |
|
||||||
|
| `<leader>kc` | Copy as cURL |
|
||||||
|
| `<leader>ke` | Set environment |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## UI & Productivity
|
||||||
|
|
||||||
|
### Zen Mode & Focus
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>zz` | Toggle Zen mode |
|
||||||
|
| `<leader>zt` | Toggle Twilight (dim code) |
|
||||||
|
|
||||||
|
### Session
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>qs` | Restore session |
|
||||||
|
| `<leader>ql` | Restore last session |
|
||||||
|
| `<leader>qd` | Don't save session |
|
||||||
|
|
||||||
|
### Learning Vim
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>ht` | Toggle Hardtime |
|
||||||
|
| `<leader>vp` | Toggle Precognition hints |
|
||||||
|
| `<leader>vP` | Peek Precognition |
|
||||||
|
|
||||||
|
### Screenkey (Demo Mode)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>sk` | Toggle Screenkey |
|
||||||
|
|
||||||
|
### Trouble (Diagnostics)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>xx` | Toggle Trouble |
|
||||||
|
| `<leader>xw` | Workspace diagnostics |
|
||||||
|
| `<leader>xd` | Document diagnostics |
|
||||||
|
| `<leader>xl` | Location list |
|
||||||
|
| `<leader>xq` | Quickfix list |
|
||||||
|
| `<leader>xt` | Open TODOs in Trouble |
|
||||||
|
|
||||||
|
### Todo Comments
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `]t` | Next TODO |
|
||||||
|
| `[t` | Previous TODO |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Language Specific
|
||||||
|
|
||||||
|
### Python
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>vs` | Select Python venv |
|
||||||
|
| `<leader>vc` | Select cached venv |
|
||||||
|
|
||||||
|
### JavaScript/TypeScript (package.json)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>ns` | Show package versions |
|
||||||
|
| `<leader>nh` | Hide package info |
|
||||||
|
| `<leader>nu` | Update package |
|
||||||
|
| `<leader>nd` | Delete package |
|
||||||
|
| `<leader>ni` | Install package |
|
||||||
|
| `<leader>nc` | Change version |
|
||||||
|
|
||||||
|
### Rust (Cargo.toml)
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>ct` | Toggle crates |
|
||||||
|
| `<leader>cr` | Reload crates |
|
||||||
|
| `<leader>cv` | Show versions popup |
|
||||||
|
| `<leader>cf` | Show features popup |
|
||||||
|
| `<leader>cd` | Show dependencies |
|
||||||
|
| `<leader>cu` | Update crate |
|
||||||
|
| `<leader>cU` | Upgrade crate |
|
||||||
|
|
||||||
|
### LeetCode
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>lr` | Run code |
|
||||||
|
| `<leader>ls` | Submit code |
|
||||||
|
| `<leader>ld` | Daily challenge |
|
||||||
|
| `<leader>ll` | List problems |
|
||||||
|
| `<leader>lc` | Open console |
|
||||||
|
| `<leader>lh` | Show hints |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Window Management
|
||||||
|
|
||||||
|
### Splits
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>sv` | Split vertical |
|
||||||
|
| `<leader>sh` | Split horizontal |
|
||||||
|
| `<leader>se` | Equal splits |
|
||||||
|
| `<leader>sx` | Close split |
|
||||||
|
| `<leader>sm` | Maximize split |
|
||||||
|
|
||||||
|
### Navigation
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<C-h>` | Move to left window |
|
||||||
|
| `<C-j>` | Move to down window |
|
||||||
|
| `<C-k>` | Move to up window |
|
||||||
|
| `<C-l>` | Move to right window |
|
||||||
|
|
||||||
|
### Resize
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<C-Up>` | Increase height |
|
||||||
|
| `<C-Down>` | Decrease height |
|
||||||
|
| `<C-Left>` | Decrease width |
|
||||||
|
| `<C-Right>` | Increase width |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## General
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `jj` | Exit insert mode |
|
||||||
|
| `<leader>nh` | Clear search highlights |
|
||||||
|
| `<leader>w` | Save file |
|
||||||
|
| `<leader>q` | Close file |
|
||||||
|
| `<leader>Q` | Quit all |
|
||||||
|
| `<leader>xa` | Save and close all |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| `:Lazy` | Plugin manager |
|
||||||
|
| `:Mason` | LSP server manager |
|
||||||
|
| `:Navbuddy` | Code navigation |
|
||||||
|
| `:Outline` | Symbol outline |
|
||||||
|
| `:Neogit` | Git interface |
|
||||||
|
| `:DiffviewOpen` | Diff view |
|
||||||
|
| `:GrugFar` | Search & replace |
|
||||||
|
| `:Octo` | GitHub |
|
||||||
|
| `:OverseerRun` | Run tasks |
|
||||||
|
| `:ZenMode` | Zen mode |
|
||||||
|
| `:Hardtime toggle` | Toggle hardtime |
|
||||||
|
| `:Screenkey` | Show keypresses |
|
||||||
|
| `:TSJToggle` | Toggle split/join |
|
||||||
209
PLUGINS.md
Normal file
209
PLUGINS.md
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
# Plugins Reference
|
||||||
|
|
||||||
|
Complete list of all plugins in this configuration.
|
||||||
|
|
||||||
|
## Navigation & Search
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `nvim-telescope/telescope.nvim` | Fuzzy finder for files, text, buffers |
|
||||||
|
| `folke/flash.nvim` | Jump anywhere with minimal keystrokes |
|
||||||
|
| `ThePrimeagen/harpoon` | Quick file marks and navigation |
|
||||||
|
| `cbochs/portal.nvim` | Navigate jumplist/changelist with preview |
|
||||||
|
| `SmiteshP/nvim-navbuddy` | Code structure navigation popup |
|
||||||
|
| `SmiteshP/nvim-navic` | Breadcrumb provider for navbuddy |
|
||||||
|
|
||||||
|
## File Management
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `nvim-tree/nvim-tree.lua` | File explorer sidebar |
|
||||||
|
| `nvim-tree/nvim-web-devicons` | File icons |
|
||||||
|
|
||||||
|
## Git
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `kdheepak/lazygit.nvim` | LazyGit integration |
|
||||||
|
| `NeogitOrg/neogit` | Magit-like git interface |
|
||||||
|
| `sindrets/diffview.nvim` | Side-by-side diff viewer |
|
||||||
|
| `lewis6991/gitsigns.nvim` | Git signs in gutter |
|
||||||
|
| `f-person/git-blame.nvim` | Inline git blame |
|
||||||
|
| `pwntester/octo.nvim` | GitHub issues/PRs in Neovim |
|
||||||
|
|
||||||
|
## LSP & Code Intelligence
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `neovim/nvim-lspconfig` | LSP configuration |
|
||||||
|
| `williamboman/mason.nvim` | LSP server installer |
|
||||||
|
| `williamboman/mason-lspconfig.nvim` | Mason + lspconfig bridge |
|
||||||
|
| `nvimdev/lspsaga.nvim` | Pretty LSP UI |
|
||||||
|
| `hrsh7th/nvim-cmp` | Completion engine |
|
||||||
|
| `hrsh7th/cmp-nvim-lsp` | LSP completion source |
|
||||||
|
| `hrsh7th/cmp-buffer` | Buffer completion source |
|
||||||
|
| `hrsh7th/cmp-path` | Path completion source |
|
||||||
|
| `hedyhli/outline.nvim` | Symbol outline sidebar |
|
||||||
|
| `smjonas/inc-rename.nvim` | Live rename preview |
|
||||||
|
| `kosayoda/nvim-lightbulb` | Code action indicator |
|
||||||
|
| `rachartier/tiny-inline-diagnostic.nvim` | Pretty inline diagnostics |
|
||||||
|
| `folke/trouble.nvim` | Diagnostics list |
|
||||||
|
| `pmizio/typescript-tools.nvim` | Enhanced TypeScript support |
|
||||||
|
|
||||||
|
## Treesitter
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `nvim-treesitter/nvim-treesitter` | Syntax highlighting |
|
||||||
|
| `nvim-treesitter/nvim-treesitter-context` | Sticky function headers |
|
||||||
|
| `nvim-treesitter/nvim-treesitter-textobjects` | Text objects |
|
||||||
|
| `folke/ts-comments.nvim` | Better comments for embedded languages |
|
||||||
|
| `windwp/nvim-ts-autotag` | Auto close/rename HTML tags |
|
||||||
|
|
||||||
|
## Editing
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `mg979/vim-visual-multi` | Multi-cursor editing |
|
||||||
|
| `gbprod/yanky.nvim` | Yank ring with history |
|
||||||
|
| `Wansmer/treesj` | Split/join code blocks |
|
||||||
|
| `monaqa/dial.nvim` | Smart increment/decrement |
|
||||||
|
| `kylechui/nvim-surround` | Surround text objects |
|
||||||
|
| `windwp/nvim-autopairs` | Auto close brackets |
|
||||||
|
| `numToStr/Comment.nvim` | Commenting |
|
||||||
|
| `folke/todo-comments.nvim` | Highlight TODOs |
|
||||||
|
| `gbprod/substitute.nvim` | Substitute operator |
|
||||||
|
| `mbbill/undotree` | Visual undo history |
|
||||||
|
| `chentoast/marks.nvim` | Better marks |
|
||||||
|
| `kevinhwang91/nvim-ufo` | Better folding |
|
||||||
|
|
||||||
|
## Search & Replace
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `MagicDuck/grug-far.nvim` | Project-wide search & replace |
|
||||||
|
| `cshuaimin/ssr.nvim` | Structural search/replace |
|
||||||
|
|
||||||
|
## Debugging
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `mfussenegger/nvim-dap` | Debug Adapter Protocol |
|
||||||
|
| `rcarriga/nvim-dap-ui` | Debug UI |
|
||||||
|
| `nvim-neotest/nvim-nio` | Async IO for dap-ui |
|
||||||
|
| `theHamsta/nvim-dap-virtual-text` | Virtual text for debugging |
|
||||||
|
| `mfussenegger/nvim-dap-python` | Python debugging |
|
||||||
|
| `jay-babu/mason-nvim-dap.nvim` | Mason + DAP bridge |
|
||||||
|
| `Weissle/persistent-breakpoints.nvim` | Save breakpoints |
|
||||||
|
|
||||||
|
## Tasks & HTTP
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `stevearc/overseer.nvim` | Task runner |
|
||||||
|
| `mistweaverco/kulala.nvim` | HTTP client |
|
||||||
|
|
||||||
|
## UI & Theme
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `CarGDev/cargdev-cyberpunk` | Custom cyberpunk theme |
|
||||||
|
| `folke/snacks.nvim` | Dashboard, notifier, picker, terminal |
|
||||||
|
| `folke/noice.nvim` | UI for messages, cmdline, popups |
|
||||||
|
| `nvim-lualine/lualine.nvim` | Statusline |
|
||||||
|
| `akinsho/bufferline.nvim` | Buffer tabs |
|
||||||
|
| `Bekaboo/dropbar.nvim` | VS Code-like breadcrumbs |
|
||||||
|
| `lewis6991/satellite.nvim` | Scrollbar with markers |
|
||||||
|
| `folke/which-key.nvim` | Keybinding hints |
|
||||||
|
| `stevearc/dressing.nvim` | Better vim.ui |
|
||||||
|
| `rcarriga/nvim-notify` | Notification manager |
|
||||||
|
| `j-hui/fidget.nvim` | LSP progress |
|
||||||
|
| `folke/edgy.nvim` | Window layout management |
|
||||||
|
|
||||||
|
## Eye Candy
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `echasnovski/mini.animate` | Smooth animations |
|
||||||
|
| `rasulomaroff/reactive.nvim` | Mode-based colors |
|
||||||
|
| `mawkler/modicator.nvim` | Line number mode colors |
|
||||||
|
| `shellRaining/hlchunk.nvim` | Scope highlighting |
|
||||||
|
| `nvim-zh/colorful-winsep.nvim` | Colorful window separators |
|
||||||
|
| `brenoprata10/nvim-highlight-colors` | Color preview |
|
||||||
|
| `lukas-reineke/indent-blankline.nvim` | Indent guides |
|
||||||
|
| `xiyaowong/transparent.nvim` | Transparent background |
|
||||||
|
|
||||||
|
## Productivity
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `folke/zen-mode.nvim` | Distraction-free mode |
|
||||||
|
| `folke/twilight.nvim` | Dim inactive code |
|
||||||
|
| `folke/persistence.nvim` | Session management |
|
||||||
|
| `rmagatti/auto-session` | Auto session restore |
|
||||||
|
| `m4xshen/hardtime.nvim` | Vim motion training |
|
||||||
|
| `tris203/precognition.nvim` | Vim motion hints |
|
||||||
|
| `NStefan002/screenkey.nvim` | Show keypresses |
|
||||||
|
| `bennypowers/nvim-regexplainer` | Regex explanation |
|
||||||
|
|
||||||
|
## Language Specific
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `linux-cultist/venv-selector.nvim` | Python venv selector |
|
||||||
|
| `vuki656/package-info.nvim` | NPM package versions |
|
||||||
|
| `saecki/crates.nvim` | Rust crate versions |
|
||||||
|
| `mfussenegger/nvim-jdtls` | Java LSP + debugging |
|
||||||
|
| `akinsho/flutter-tools.nvim` | Flutter development |
|
||||||
|
| `lervag/vimtex` | LaTeX support |
|
||||||
|
|
||||||
|
## Database
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `kristijanhusak/vim-dadbod-ui` | Database UI |
|
||||||
|
| `tpope/vim-dadbod` | Database interaction |
|
||||||
|
| `kristijanhusak/vim-dadbod-completion` | DB completion |
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `nvim-neotest/neotest` | Test runner framework |
|
||||||
|
| `nvim-neotest/neotest-jest` | Jest adapter |
|
||||||
|
| `nvim-neotest/neotest-python` | Python test adapter |
|
||||||
|
|
||||||
|
## AI & Copilot
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `zbirenbaum/copilot.lua` | GitHub Copilot |
|
||||||
|
| `zbirenbaum/copilot-cmp` | Copilot completion source |
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
|
||||||
|
| Plugin | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `wakatime/vim-wakatime` | Coding time tracking |
|
||||||
|
| `kawre/leetcode.nvim` | LeetCode integration |
|
||||||
|
| `christoomey/vim-tmux-navigator` | Tmux integration |
|
||||||
|
| `szw/vim-maximizer` | Window maximizer |
|
||||||
|
| `nvim-lua/plenary.nvim` | Lua utilities |
|
||||||
|
| `MunifTanjim/nui.nvim` | UI components |
|
||||||
|
| `kkharji/sqlite.lua` | SQLite for plugins |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Plugin Count: 80+
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
All plugins are managed by [lazy.nvim](https://github.com/folke/lazy.nvim) and auto-install on first run.
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:Lazy " Open plugin manager
|
||||||
|
:Lazy sync " Sync plugins
|
||||||
|
:Lazy update " Update plugins
|
||||||
|
:Lazy clean " Remove unused plugins
|
||||||
|
:Lazy profile " Check plugin load times
|
||||||
|
```
|
||||||
465
README.md
465
README.md
@@ -1,248 +1,339 @@
|
|||||||
# Neovim Configuration
|
# CargDev Neovim Configuration
|
||||||
|
|
||||||
A modern, fast, and well-organized Neovim configuration built with Lua.
|
A modern, feature-rich Neovim configuration with 80+ plugins, optimized for full-stack development.
|
||||||
|
|
||||||
|
```
|
||||||
|
██████╗ █████╗ ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗
|
||||||
|
█╔════╝██╔══██╗██╔══██╗██╔════╝ ██╔══██╗██╔════╝██║ ██║
|
||||||
|
█║ ███████║██████╔╝██║ ███╗██║ ██║█████╗ ██║ ██║
|
||||||
|
█║ ██╔══██║██╔══██╗██║ ██║██║ ██║██╔══╝ ╚██╗ ██╔╝
|
||||||
|
██████╗██║ ██║██║ ██║╚██████╔╝██████╔╝███████╗ ╚████╔╝
|
||||||
|
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═══╝
|
||||||
|
|
||||||
|
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
|
||||||
|
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
|
||||||
|
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
|
||||||
|
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
||||||
|
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||||
|
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
```
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **VS Code-like UI** with file explorer on right, breadcrumbs, symbol outline
|
||||||
|
- **80+ plugins** carefully configured and optimized
|
||||||
|
- **Full LSP support** for TypeScript, Python, Java, Go, Lua, and more
|
||||||
|
- **Debugging** with DAP for Node.js/NestJS, Python, Java
|
||||||
|
- **Git integration** with LazyGit, Neogit, Diffview, Octo (GitHub PRs)
|
||||||
|
- **AI assistance** with GitHub Copilot
|
||||||
|
- **HTTP client** for API testing
|
||||||
|
- **Task runner** for build/run tasks
|
||||||
|
- **Multi-cursor** editing like VS Code
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- **Neovim**: 0.9+ (0.10+ recommended)
|
```bash
|
||||||
- **Git**: For plugin management
|
# Required
|
||||||
- **Node.js**: For LSP servers and tooling
|
brew install neovim ripgrep fd node python3
|
||||||
- **ripgrep** (`rg`): For fast file searching
|
|
||||||
- **Python 3**: With `pynvim` package for Python support
|
|
||||||
|
|
||||||
### Optional Dependencies
|
# Optional but recommended
|
||||||
|
brew install lazygit jq
|
||||||
- **Pandoc**: For HTML to Markdown conversion
|
pip3 install pynvim
|
||||||
- **Prettier**: For code formatting
|
npm install -g neovim
|
||||||
- **Stylua**: For Lua formatting
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Backup existing config (if any)
|
# Backup existing config
|
||||||
mv ~/.config/nvim ~/.config/nvim.bak
|
mv ~/.config/nvim ~/.config/nvim.bak
|
||||||
|
|
||||||
# Clone this configuration
|
# Clone this configuration
|
||||||
git clone <your-repo-url> ~/.config/nvim
|
git clone <your-repo-url> ~/.config/nvim
|
||||||
|
|
||||||
# Start Neovim (plugins will auto-install)
|
# Start Neovim (plugins auto-install)
|
||||||
nvim
|
nvim
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
~/.config/nvim/
|
|
||||||
├── init.lua # Entry point
|
|
||||||
├── lua/cargdev/
|
|
||||||
│ ├── core/
|
|
||||||
│ │ ├── init.lua # Core initialization
|
|
||||||
│ │ ├── options.lua # Neovim options
|
|
||||||
│ │ ├── keymaps/ # Keymap modules
|
|
||||||
│ │ │ ├── init.lua # Keymap loader
|
|
||||||
│ │ │ ├── general.lua # General keymaps
|
|
||||||
│ │ │ ├── personal.lua # Personal workflow keymaps
|
|
||||||
│ │ │ ├── plugins.lua # Plugin-specific keymaps
|
|
||||||
│ │ │ ├── window.lua # Window management
|
|
||||||
│ │ │ ├── lsp.lua # LSP keymaps
|
|
||||||
│ │ │ ├── copilot.lua # Copilot keymaps
|
|
||||||
│ │ │ └── ...
|
|
||||||
│ │ └── function/ # Custom functions
|
|
||||||
│ ├── plugins/ # Plugin configurations
|
|
||||||
│ │ ├── lsp/ # LSP-related plugins
|
|
||||||
│ │ └── ...
|
|
||||||
│ └── lazy.lua # Lazy.nvim setup
|
|
||||||
└── ftplugin/ # Filetype-specific settings
|
|
||||||
```
|
|
||||||
|
|
||||||
## Key Features
|
|
||||||
|
|
||||||
- **Colorscheme**: [cargdev-cyberpunk](https://github.com/CarGDev/cargdev-cyberpunk) - Vibrant cyberpunk theme with neon colors and full TypeScript/LSP support
|
|
||||||
- **Plugin Manager**: [lazy.nvim](https://github.com/folke/lazy.nvim) with auto-update notifications
|
|
||||||
- **LSP**: Full LSP support with Mason for easy server management
|
|
||||||
- **Completion**: nvim-cmp with multiple sources
|
|
||||||
- **File Navigation**: Snacks.nvim (modern) + Telescope (git features)
|
|
||||||
- **File Explorer**: nvim-tree
|
|
||||||
- **Git Integration**: LazyGit, Gitsigns
|
|
||||||
- **AI Assistants**: GitHub Copilot + [Avante.nvim](https://github.com/yetone/avante.nvim) (local LLM support)
|
|
||||||
- **Debugging**: DAP with UI (Java, Node.js/NestJS, Python)
|
|
||||||
- **Formatting**: Conform.nvim with auto-format on save
|
|
||||||
- **Diagnostics**: Trouble.nvim for organized diagnostics view
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
| Document | Description |
|
| Document | Description |
|
||||||
|----------|-------------|
|
|----------|-------------|
|
||||||
| [CHANGELOG.md](./CHANGELOG.md) | Version history and changes |
|
| [KEYMAPS.md](./KEYMAPS.md) | **Complete keybinding reference** |
|
||||||
| [keyboard_mappings.md](./keyboard_mappings.md) | QMK keyboard configuration |
|
| [PLUGINS.md](./PLUGINS.md) | All plugins and their purposes |
|
||||||
| [NATIVE_AUTO_WRAPPER_GUIDE.md](./NATIVE_AUTO_WRAPPER_GUIDE.md) | Text wrapping configuration |
|
| [CHANGELOG.md](./CHANGELOG.md) | Version history |
|
||||||
| [TELESCOPE_TO_SNACKS_MIGRATION.md](./TELESCOPE_TO_SNACKS_MIGRATION.md) | Migration notes |
|
|
||||||
|
|
||||||
## Quick Reference - Essential Keymaps
|
## Quick Start
|
||||||
|
|
||||||
### Leader Key: `<Space>`
|
### Leader Key: `<Space>`
|
||||||
|
|
||||||
### File Operations
|
### Essential Keymaps
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
| Key | Action |
|
||||||
| `<leader>w` | Save file |
|
|-----|--------|
|
||||||
| `<leader>q` | Close file |
|
| `<leader>ff` | Find files |
|
||||||
| `<leader>xa` | Save and close all |
|
| `<leader>fs` | Search text in project |
|
||||||
| `<leader>bd` | Close buffer (safe) |
|
| `<leader>e` | Toggle file explorer (right side) |
|
||||||
| `<leader>bD` | Force close buffer |
|
| `<leader>gg` | Open LazyGit |
|
||||||
|
| `s` | Flash jump (type chars to jump) |
|
||||||
|
| `<leader>ha` | Harpoon add file |
|
||||||
|
| `<leader>1-5` | Jump to harpooned file |
|
||||||
|
| `K` | Hover documentation |
|
||||||
|
| `gd` | Go to definition |
|
||||||
|
| `<leader>ca` | Code actions |
|
||||||
|
| `<leader>rn` | Rename symbol (live preview) |
|
||||||
|
| `<C-d>` | Multi-cursor (select word) |
|
||||||
|
|
||||||
### Navigation
|
### Navigation
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
|
||||||
| `<leader>ff` | Find files |
|
|
||||||
| `<leader>fs` | Live grep (search text) |
|
|
||||||
| `<leader>fr` | Recent files |
|
|
||||||
| `<leader>fb` | Find buffers |
|
|
||||||
| `<leader>e` | Toggle file explorer |
|
|
||||||
|
|
||||||
### Window Management
|
| Key | Action |
|
||||||
| Keymap | Description |
|
|-----|--------|
|
||||||
|--------|-------------|
|
| `s` | Flash jump anywhere |
|
||||||
| `<leader>sv` | Split vertical |
|
| `S` | Flash treesitter select |
|
||||||
| `<leader>sh` | Split horizontal |
|
| `<leader>nb` | Navbuddy (code structure popup) |
|
||||||
| `<leader>se` | Equal splits |
|
| `<leader>cs` | Symbol outline sidebar |
|
||||||
| `<leader>sx` | Close split |
|
| `<leader>tu` | Undo tree |
|
||||||
| `<C-h/j/k/l>` | Resize splits |
|
|
||||||
|
|
||||||
### LSP
|
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
|
||||||
| `gd` | Go to definition |
|
|
||||||
| `gr` | Show references |
|
|
||||||
| `K` | Hover documentation |
|
|
||||||
| `<leader>ca` | Code actions |
|
|
||||||
| `<leader>rn` | Rename symbol |
|
|
||||||
| `<leader>f` | Format buffer |
|
|
||||||
| `<leader>mm` | Format (conform) |
|
|
||||||
|
|
||||||
### Git
|
### Git
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
| `<leader>gg` | LazyGit |
|
| `<leader>gg` | LazyGit |
|
||||||
| `<leader>gs` | Git status |
|
| `<leader>gn` | Neogit (magit-like) |
|
||||||
| `<leader>gb` | Git blame |
|
| `<leader>gd` | Diffview |
|
||||||
|
| `<leader>gh` | File history |
|
||||||
|
| `<leader>gB` | Toggle git blame |
|
||||||
|
| `<leader>oi` | GitHub issues (Octo) |
|
||||||
|
| `<leader>op` | GitHub PRs (Octo) |
|
||||||
|
|
||||||
### Diagnostics & Quickfix
|
### Editing
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
|
||||||
| `<leader>xx` | Toggle Trouble |
|
|
||||||
| `<leader>xd` | Document diagnostics |
|
|
||||||
| `<leader>qn/qp` | Next/prev quickfix |
|
|
||||||
| `<leader>qo/qq` | Open/close quickfix |
|
|
||||||
|
|
||||||
### Session
|
| Key | Action |
|
||||||
| Keymap | Description |
|
|-----|--------|
|
||||||
|--------|-------------|
|
| `<C-d>` | Add cursor on word (VS Code style) |
|
||||||
| `<leader>sS` | Save session |
|
| `<C-a>` / `<C-x>` | Smart increment/decrement |
|
||||||
| `<leader>sR` | Restore session |
|
| `<leader>tj` | Toggle split/join code blocks |
|
||||||
|
| `<leader>sr` | Search & replace (project-wide) |
|
||||||
|
| `<leader>sR` | Structural search/replace |
|
||||||
|
| `<leader>yh` | Yank history |
|
||||||
|
| `<C-p>` / `<C-n>` | Cycle yank history |
|
||||||
|
|
||||||
### Copilot
|
### LSP
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
|
||||||
| `<Tab>` | Accept suggestion |
|
|
||||||
| `<leader>zc` | Open Copilot Chat |
|
|
||||||
| `<leader>ze` | Explain code (visual) |
|
|
||||||
| `<leader>zf` | Fix code (visual) |
|
|
||||||
|
|
||||||
### Debugging (DAP)
|
| Key | Action |
|
||||||
| Keymap | Description |
|
|-----|--------|
|
||||||
|--------|-------------|
|
| `K` | Hover documentation |
|
||||||
| `<leader>dcr` | Start/Continue Debugging |
|
| `gd` | Peek definition |
|
||||||
| `<leader>db` | Toggle Breakpoint |
|
| `gD` | Go to definition |
|
||||||
| `<leader>dB` | Conditional Breakpoint |
|
| `gr` | Rename |
|
||||||
| `<leader>do` | Step Over |
|
| `gh` | LSP finder (refs, implementations) |
|
||||||
| `<leader>di` | Step Into |
|
| `<leader>ca` | Code actions |
|
||||||
| `<leader>dot` | Step Out |
|
| `<leader>rn` | Rename (live preview) |
|
||||||
|
| `<leader>sl` | Line diagnostics |
|
||||||
|
| `[d` / `]d` | Prev/next diagnostic |
|
||||||
|
|
||||||
|
### Debugging
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>db` | Toggle breakpoint |
|
||||||
|
| `<leader>dcc` | Start/continue debugging |
|
||||||
|
| `<leader>di` | Step into |
|
||||||
|
| `<leader>do` | Step over |
|
||||||
|
| `<leader>dO` | Step out |
|
||||||
| `<leader>du` | Toggle DAP UI |
|
| `<leader>du` | Toggle DAP UI |
|
||||||
| `<leader>dq` | Stop Debugging |
|
|
||||||
| `<leader>dr` | Open REPL |
|
|
||||||
| `<leader>dl` | Run Last Debug |
|
|
||||||
| `<leader>dcf` | DAP Configurations |
|
|
||||||
| `<leader>dcb` | List Breakpoints |
|
|
||||||
| `<leader>dco` | DAP Commands |
|
|
||||||
|
|
||||||
### Java Debugging
|
### Tasks & HTTP
|
||||||
| Keymap | Description |
|
|
||||||
|--------|-------------|
|
| Key | Action |
|
||||||
| `<leader>jd` | Debug Class (DAP) |
|
|-----|--------|
|
||||||
| `<leader>jt` | Test Class |
|
| `<leader>or` | Run task (Overseer) |
|
||||||
| `<leader>jn` | Test Nearest Method |
|
| `<leader>ot` | Toggle task list |
|
||||||
| `<leader>jr` | Run Java File |
|
| `<leader>kr` | Run HTTP request (in .http file) |
|
||||||
| `<leader>jm` | Run Maven Project |
|
| `<leader>ka` | Run all HTTP requests |
|
||||||
| `<leader>jg` | Run Gradle Project |
|
|
||||||
|
### Productivity
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>zz` | Zen mode |
|
||||||
|
| `<leader>zt` | Twilight (dim inactive code) |
|
||||||
|
| `<leader>qs` | Restore session |
|
||||||
|
| `<leader>ht` | Toggle Hardtime (learn vim motions) |
|
||||||
|
| `<leader>vp` | Toggle Precognition (motion hints) |
|
||||||
|
| `<leader>sk` | Toggle Screenkey (show keypresses) |
|
||||||
|
|
||||||
|
### Python
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>vs` | Select Python venv |
|
||||||
|
| Debug configs | Django, FastAPI, Flask, Launch file |
|
||||||
|
|
||||||
|
### JavaScript/TypeScript
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>ns` | Show package versions (package.json) |
|
||||||
|
| `<leader>nu` | Update package |
|
||||||
|
| Debug configs | NestJS, ts-node, Attach |
|
||||||
|
|
||||||
|
### Rust
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `<leader>cv` | Show crate versions (Cargo.toml) |
|
||||||
|
| `<leader>cu` | Update crate |
|
||||||
|
|
||||||
|
## Plugin Categories
|
||||||
|
|
||||||
|
### Navigation & Search
|
||||||
|
- **telescope** - Fuzzy finder
|
||||||
|
- **flash.nvim** - Jump anywhere with minimal keystrokes
|
||||||
|
- **harpoon** - Quick file marks
|
||||||
|
- **portal.nvim** - Jump through jumplist with preview
|
||||||
|
- **nvim-navbuddy** - Code structure navigation
|
||||||
|
|
||||||
|
### Git
|
||||||
|
- **lazygit** - Terminal UI for git
|
||||||
|
- **neogit** - Magit-like git interface
|
||||||
|
- **diffview** - Side-by-side diffs
|
||||||
|
- **gitsigns** - Git decorations
|
||||||
|
- **git-blame** - Inline blame
|
||||||
|
- **octo.nvim** - GitHub issues/PRs
|
||||||
|
|
||||||
|
### LSP & Coding
|
||||||
|
- **nvim-lspconfig** + **mason** - LSP setup
|
||||||
|
- **lspsaga** - Pretty LSP UI
|
||||||
|
- **nvim-cmp** - Completion
|
||||||
|
- **treesitter** - Syntax highlighting
|
||||||
|
- **outline.nvim** - Symbol sidebar
|
||||||
|
- **inc-rename** - Live rename preview
|
||||||
|
- **lightbulb** - Code action indicator
|
||||||
|
|
||||||
|
### Editing
|
||||||
|
- **vim-visual-multi** - Multi-cursor
|
||||||
|
- **yanky.nvim** - Yank ring
|
||||||
|
- **treesj** - Split/join blocks
|
||||||
|
- **dial.nvim** - Smart increment
|
||||||
|
- **nvim-surround** - Surround text
|
||||||
|
- **nvim-autopairs** - Auto brackets
|
||||||
|
- **Comment.nvim** - Commenting
|
||||||
|
|
||||||
|
### UI
|
||||||
|
- **snacks.nvim** - Dashboard, notifier, picker
|
||||||
|
- **noice.nvim** - UI for messages, cmdline
|
||||||
|
- **lualine** - Statusline
|
||||||
|
- **bufferline** - Buffer tabs
|
||||||
|
- **dropbar** - Breadcrumbs
|
||||||
|
- **satellite** - Scrollbar with markers
|
||||||
|
- **which-key** - Keybinding hints
|
||||||
|
- **trouble** - Diagnostics list
|
||||||
|
|
||||||
|
### Debugging
|
||||||
|
- **nvim-dap** - Debug Adapter Protocol
|
||||||
|
- **nvim-dap-ui** - Debug UI
|
||||||
|
- **nvim-dap-python** - Python debugging
|
||||||
|
- **nvim-jdtls** - Java debugging
|
||||||
|
|
||||||
|
### Productivity
|
||||||
|
- **overseer** - Task runner
|
||||||
|
- **kulala** - HTTP client
|
||||||
|
- **zen-mode** - Distraction-free
|
||||||
|
- **persistence** - Session management
|
||||||
|
- **grug-far** - Search & replace
|
||||||
|
- **ssr.nvim** - Structural search/replace
|
||||||
|
|
||||||
|
### Eye Candy
|
||||||
|
- **cargdev-cyberpunk** - Custom theme
|
||||||
|
- **mini.animate** - Smooth animations
|
||||||
|
- **reactive** - Mode-based colors
|
||||||
|
- **hlchunk** - Scope highlighting
|
||||||
|
- **nvim-highlight-colors** - Color preview
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| `:Lazy` | Open plugin manager |
|
| `:Lazy` | Plugin manager |
|
||||||
| `:Mason` | Open LSP server manager |
|
| `:Mason` | LSP server manager |
|
||||||
| `:checkhealth` | Run health checks |
|
| `:Navbuddy` | Code navigation |
|
||||||
| `:CheckConfig` | Run config validation |
|
| `:Outline` | Symbol outline |
|
||||||
| `:FormatToggle` | Toggle auto-format on save |
|
| `:Neogit` | Git interface |
|
||||||
|
| `:DiffviewOpen` | Open diff view |
|
||||||
|
| `:GrugFar` | Search & replace |
|
||||||
|
| `:Octo` | GitHub integration |
|
||||||
|
| `:OverseerRun` | Run tasks |
|
||||||
|
| `:ZenMode` | Distraction-free mode |
|
||||||
|
| `:Hardtime toggle` | Toggle vim training |
|
||||||
|
| `:Screenkey` | Show keypresses |
|
||||||
|
|
||||||
## Debugging Setup
|
## Debugging Setup
|
||||||
|
|
||||||
This configuration includes full debugging support for multiple languages using DAP (Debug Adapter Protocol).
|
### Python
|
||||||
|
```bash
|
||||||
|
:Mason # Install debugpy
|
||||||
|
```
|
||||||
|
Configs: Launch File, Django, FastAPI, Flask, Attach Remote
|
||||||
|
|
||||||
### Supported Languages
|
### Node.js / TypeScript / NestJS
|
||||||
|
```bash
|
||||||
|
:Mason # Install js-debug-adapter
|
||||||
|
```
|
||||||
|
Configs: Launch NestJS, Launch File, ts-node, Attach
|
||||||
|
|
||||||
| Language | Debug Adapter | Configuration |
|
### Java
|
||||||
|----------|---------------|---------------|
|
```bash
|
||||||
| **Java** | java-debug-adapter | Auto-configured via nvim-jdtls |
|
:Mason # Install java-debug-adapter, java-test
|
||||||
| **Node.js/NestJS/TypeScript** | js-debug-adapter (pwa-node) | Launch & Attach configurations |
|
```
|
||||||
| **Python** | debugpy | Django, FastAPI, Flask, and general Python |
|
Auto-configured via nvim-jdtls
|
||||||
|
|
||||||
### Debug Configurations
|
## HTTP Client (Kulala)
|
||||||
|
|
||||||
#### Node.js/NestJS/TypeScript
|
Create a `.http` file:
|
||||||
- **Launch NestJS** - Runs `dist/main.js` with source maps
|
|
||||||
- **Launch Current File** - Debug the current TypeScript/JavaScript file
|
|
||||||
- **Launch with ts-node** - Debug TypeScript directly without compilation
|
|
||||||
- **Attach to NestJS** - Attach to running process on port 9229
|
|
||||||
- **Attach to Process** - Pick from running Node.js processes
|
|
||||||
|
|
||||||
#### Python
|
```http
|
||||||
- **Launch File** - Debug current Python file
|
### Get users
|
||||||
- **Launch with Arguments** - Debug with custom arguments
|
GET https://api.example.com/users
|
||||||
- **Attach Remote** - Attach to debugpy server (port 5678)
|
Authorization: Bearer {{token}}
|
||||||
- **Django** - Debug Django with `manage.py runserver`
|
|
||||||
- **FastAPI** - Debug FastAPI with uvicorn
|
|
||||||
- **Flask** - Debug Flask application
|
|
||||||
|
|
||||||
#### Java
|
### Create user
|
||||||
- Auto-discovers main classes and test methods
|
POST https://api.example.com/users
|
||||||
- Hot code replacement enabled
|
Content-Type: application/json
|
||||||
- Use `<leader>jd` to debug the current class
|
|
||||||
|
|
||||||
### Installation
|
{
|
||||||
|
"name": "John"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Debug adapters are automatically installed via Mason. Run `:Mason` to verify:
|
Use `<leader>kr` to run request under cursor.
|
||||||
- `debugpy` - Python debugger
|
|
||||||
- `js-debug-adapter` - Node.js/TypeScript debugger
|
## Tips & Tricks
|
||||||
- `java-debug-adapter` - Java debugger
|
|
||||||
- `java-test` - Java test runner
|
### Learn Vim Motions
|
||||||
|
Enable Hardtime (`<leader>ht`) and Precognition (`<leader>vp`) to improve your vim skills.
|
||||||
|
|
||||||
|
### Quick File Switching
|
||||||
|
Use Harpoon to mark important files (`<leader>ha`), then jump instantly with `<leader>1-5`.
|
||||||
|
|
||||||
|
### Multi-Cursor Editing
|
||||||
|
Like VS Code: `<C-d>` to select word, keep pressing for more occurrences.
|
||||||
|
|
||||||
|
### Smart Increment
|
||||||
|
`<C-a>` on `true` → `false`, on `GET` → `POST`, on dates, colors, etc.
|
||||||
|
|
||||||
|
### Split/Join Code
|
||||||
|
`<leader>tj` on arrays, objects, function arguments to toggle between single/multi-line.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Check Configuration Health
|
|
||||||
```vim
|
```vim
|
||||||
:checkhealth
|
:checkhealth " Run health checks
|
||||||
:CheckConfig
|
:Lazy sync " Sync plugins
|
||||||
|
:Mason " Check LSP servers
|
||||||
|
:LspInfo " Check LSP status
|
||||||
```
|
```
|
||||||
|
|
||||||
### Common Issues
|
|
||||||
|
|
||||||
1. **Plugins not loading**: Run `:Lazy sync`
|
|
||||||
2. **LSP not working**: Run `:Mason` and install required servers
|
|
||||||
3. **Formatting not working**: Ensure formatters are installed (prettier, stylua, etc.)
|
|
||||||
4. **Slow startup**: Check `:Lazy profile` for slow plugins
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT License - Feel free to use and modify as needed.
|
MIT License
|
||||||
|
|||||||
@@ -9,18 +9,38 @@ local status, jdtls = pcall(require, "jdtls")
|
|||||||
if not status then
|
if not status then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local extendedClientCapabilities = jdtls.extendedClientCapabilities
|
|
||||||
|
|
||||||
local bundles = {
|
-- Ensure DAP is loaded before setting up Java debugging
|
||||||
vim.fn.glob(
|
local dap_ok, _ = pcall(require, "dap")
|
||||||
home .. "/.local/share/nvim/mason/packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar",
|
if not dap_ok then
|
||||||
true
|
vim.notify("nvim-dap not loaded yet. Debug features may not work.", vim.log.levels.WARN)
|
||||||
),
|
end
|
||||||
}
|
|
||||||
vim.list_extend(
|
local extendedClientCapabilities = jdtls.extendedClientCapabilities
|
||||||
bundles,
|
extendedClientCapabilities.resolveAdditionalTextEditsSupport = true
|
||||||
vim.split(vim.fn.glob(home .. "/.local/share/nvim/mason/packages/java-test/extension/server/*.jar", true), "\n")
|
|
||||||
|
-- Build bundles for java-debug-adapter and java-test
|
||||||
|
local bundles = {}
|
||||||
|
|
||||||
|
-- Add java-debug-adapter
|
||||||
|
local debug_jar = vim.fn.glob(
|
||||||
|
home .. "/.local/share/nvim/mason/packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar",
|
||||||
|
true
|
||||||
)
|
)
|
||||||
|
if debug_jar ~= "" then
|
||||||
|
table.insert(bundles, debug_jar)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add java-test jars
|
||||||
|
local test_jars = vim.split(
|
||||||
|
vim.fn.glob(home .. "/.local/share/nvim/mason/packages/java-test/extension/server/*.jar", true),
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
for _, jar in ipairs(test_jars) do
|
||||||
|
if jar ~= "" then
|
||||||
|
table.insert(bundles, jar)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
cmd = {
|
cmd = {
|
||||||
@@ -79,8 +99,25 @@ local config = {
|
|||||||
local function jdtls_on_attach(client, bufnr)
|
local function jdtls_on_attach(client, bufnr)
|
||||||
-- Setup DAP after language server is ready
|
-- Setup DAP after language server is ready
|
||||||
if #bundles > 0 then
|
if #bundles > 0 then
|
||||||
|
-- Ensure DAP is loaded
|
||||||
|
local dap_loaded, dap = pcall(require, "dap")
|
||||||
|
if not dap_loaded then
|
||||||
|
vim.notify("DAP not available for Java debugging", vim.log.levels.WARN)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Setup DAP with hot code replace
|
||||||
require("jdtls").setup_dap({ hotcodereplace = "auto" })
|
require("jdtls").setup_dap({ hotcodereplace = "auto" })
|
||||||
require("jdtls.dap").setup_dap_main_class_configs()
|
|
||||||
|
-- Defer main class config discovery to allow JDTLS to fully initialize
|
||||||
|
vim.defer_fn(function()
|
||||||
|
local ok, err = pcall(function()
|
||||||
|
require("jdtls.dap").setup_dap_main_class_configs()
|
||||||
|
end)
|
||||||
|
if not ok then
|
||||||
|
vim.notify("Failed to setup Java DAP main configs: " .. tostring(err), vim.log.levels.DEBUG)
|
||||||
|
end
|
||||||
|
end, 2000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -149,3 +149,4 @@ function M.setup()
|
|||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,34 @@
|
|||||||
-- Shared dashboard configuration for alpha-nvim and snacks.dashboard
|
-- Minimalist TUI-style dashboard configuration
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
-- CARGDEV NEOVIM ASCII art logo
|
||||||
M.header = {
|
M.header = {
|
||||||
|
"",
|
||||||
" ██████╗ █████╗ ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗ ",
|
" ██████╗ █████╗ ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗ ",
|
||||||
" █╔════╝██╔══██╗██╔══██╗██╔════╝ ██╔══██╗██╔════╝██║ ██║ ",
|
" █╔════╝██╔══██╗██╔══██╗██╔════╝ ██╔══██╗██╔════╝██║ ██║ ",
|
||||||
" █║ ███████║██████╔╝██║ ███╗██║ ██║█████╗ ██║ ██║ ",
|
" █║ ███████║██████╔╝██║ ███╗██║ ██║█████╗ ██║ ██║ ",
|
||||||
" █║ ██╔══██║██╔══██╗██║ ██║██║ ██║██╔══╝ ╚██╗ ██╔╝ ",
|
" █║ ██╔══██║██╔══██╗██║ ██║██║ ██║██╔══╝ ╚██╗ ██╔╝ ",
|
||||||
" ██████╗██║ ██║██║ ██║╚██████╔╝██████╔╝███████╗ ╚████╔╝ ",
|
" ██████╗██║ ██║██║ ██║╚██████╔╝██████╔╝███████╗ ╚████╔╝ ",
|
||||||
" ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═══╝ ",
|
" ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═══╝ ",
|
||||||
" ",
|
"",
|
||||||
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
|
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
|
||||||
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
|
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
|
||||||
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
|
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
|
||||||
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
|
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
|
||||||
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
|
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
|
||||||
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
|
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
|
||||||
|
"",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Menu items (single column)
|
-- Minimal VS Code-like menu items
|
||||||
M.menu_items = {
|
M.menu_items = {
|
||||||
{ key = "f", icon = " ", desc = "Find File", action = ":FzfLua files" },
|
{ key = "f", icon = "", desc = "Go to File", action = ":Telescope find_files" },
|
||||||
{ key = "n", icon = " ", desc = "New File", action = ":ene | startinsert" },
|
{ key = "r", icon = "", desc = "Recent Files", action = ":Telescope oldfiles" },
|
||||||
{ key = "g", icon = " ", desc = "Find Text", action = ":FzfLua live_grep" },
|
{ key = "g", icon = "", desc = "Find in Files", action = ":Telescope live_grep" },
|
||||||
{ key = "r", icon = " ", desc = "Recent Files", action = ":FzfLua oldfiles" },
|
{ key = "s", icon = "", desc = "Restore Session", action = ":lua require('persistence').load()" },
|
||||||
{ key = "t", icon = " ", desc = "File Tree", action = ":NvimTreeToggle" },
|
{ key = "e", icon = "", desc = "Explorer", action = ":NvimTreeToggle" },
|
||||||
{ key = "L", icon = " ", desc = "Lazy", action = ":Lazy" },
|
{ key = "c", icon = "", desc = "Settings", action = ":e $MYVIMRC" },
|
||||||
{ key = "m", icon = " ", desc = "Mason", action = ":Mason" },
|
{ key = "q", icon = "", desc = "Quit", action = ":qa" },
|
||||||
{ key = "q", icon = " ", desc = "Quit", action = ":qa" },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Get header as string (for snacks)
|
-- Get header as string (for snacks)
|
||||||
@@ -53,14 +55,4 @@ function M.get_snacks_keys()
|
|||||||
return to_snacks_keys(M.menu_items)
|
return to_snacks_keys(M.menu_items)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get alpha buttons (requires alpha dashboard module)
|
|
||||||
function M.get_alpha_buttons(dashboard)
|
|
||||||
local buttons = {}
|
|
||||||
for _, item in ipairs(M.menu_items) do
|
|
||||||
local cmd = item.action:gsub("^:", "<cmd>") .. "<CR>"
|
|
||||||
table.insert(buttons, dashboard.button(item.key, item.icon .. " " .. item.desc, cmd))
|
|
||||||
end
|
|
||||||
return buttons
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -2,112 +2,98 @@
|
|||||||
|
|
||||||
This folder contains all the keymaps organized by category for better maintainability.
|
This folder contains all the keymaps organized by category for better maintainability.
|
||||||
|
|
||||||
## 📁 File Structure
|
## File Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
keymaps/
|
keymaps/
|
||||||
├── README.md # This file
|
├── README.md # This file
|
||||||
├── general.lua # General keymaps (leader, basic navigation)
|
├── general.lua # General keymaps (leader, basic navigation, obsidian)
|
||||||
├── personal.lua # Personal workflow keymaps
|
├── personal.lua # Personal workflow keymaps
|
||||||
├── lsp.lua # LSP and function navigation keymaps
|
├── lsp.lua # LSP and function navigation keymaps
|
||||||
├── dap.lua # DAP debugging keymaps
|
├── dap.lua # DAP debugging keymaps
|
||||||
├── snacks.lua # Snacks search and navigation keymaps (replacing Telescope)
|
├── snacks.lua # Snacks search and navigation keymaps
|
||||||
├── window.lua # Window management keymaps
|
├── window.lua # Window management keymaps
|
||||||
├── copilot.lua # Copilot AI keymaps
|
├── copilot.lua # Copilot AI keymaps
|
||||||
├── gitconflict.lua # Git conflict resolution keymaps
|
├── plugins.lua # Plugin-specific keymaps (Telescope, trouble, etc.)
|
||||||
└── plugins.lua # Plugin-specific keymaps
|
├── project.lua # Project-specific keymaps
|
||||||
|
├── ufo.lua # Folding keymaps
|
||||||
|
├── leet.lua # LeetCode keymaps
|
||||||
|
├── sudoku.lua # Sudoku game keymaps
|
||||||
|
└── database.lua # Database keymaps
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🔧 How It Works
|
## How It Works
|
||||||
|
|
||||||
The main `keymaps.lua` file automatically loads all `.lua` files from this folder. Each file contains keymaps for a specific category:
|
The main `keymaps.lua` file automatically loads all `.lua` files from this folder:
|
||||||
|
|
||||||
### **general.lua**
|
```lua
|
||||||
- Leader key setup
|
local function load_keymaps()
|
||||||
- Basic navigation
|
local keymaps_path = vim.fn.stdpath("config") .. "/lua/cargdev/core/keymaps"
|
||||||
- General utility keymaps
|
local scan = vim.fn.globpath(keymaps_path, "*.lua", false, true)
|
||||||
|
|
||||||
### **personal.lua**
|
for _, file in ipairs(scan) do
|
||||||
- Your personal workflow keymaps
|
local module_name = "cargdev.core.keymaps." .. file:match("([^/]+)%.lua$")
|
||||||
- File management
|
pcall(require, module_name)
|
||||||
- Window management
|
end
|
||||||
- Coding shortcuts
|
end
|
||||||
- Copilot integration
|
```
|
||||||
|
|
||||||
### **lsp.lua**
|
## Keymap Categories
|
||||||
- Function navigation (`gd`, `gi`, `gr`, `gt`)
|
|
||||||
- Symbol search (`<leader>ds`, `<leader>ws`)
|
|
||||||
- Code actions and documentation
|
|
||||||
- Diagnostics
|
|
||||||
|
|
||||||
### **dap.lua**
|
| Category | File | Description |
|
||||||
- Debug session control (`<leader>dcr`, `<leader>dq`)
|
|----------|------|-------------|
|
||||||
- Breakpoints (`<leader>db`, `<leader>dB`)
|
| General | `general.lua` | Basic setup, escape, obsidian links |
|
||||||
- Step navigation (`<leader>do`, `<leader>di`, `<leader>dot`)
|
| Personal | `personal.lua` | Your workflow shortcuts |
|
||||||
- DAP UI toggle (`<leader>du`)
|
| LSP | `lsp.lua` | Function navigation and LSP features |
|
||||||
- REPL and configuration pickers
|
| Debugging | `dap.lua` | DAP debugging (Java, Node.js, Python) |
|
||||||
|
| Search | `snacks.lua` | File and text search (Snacks) |
|
||||||
|
| Window | `window.lua` | Window/split management |
|
||||||
|
| Copilot | `copilot.lua` | AI assistant keymaps |
|
||||||
|
| Plugins | `plugins.lua` | Plugin-specific (Telescope, trouble, etc.) |
|
||||||
|
| Project | `project.lua` | Project commands |
|
||||||
|
| Folding | `ufo.lua` | Code folding |
|
||||||
|
| LeetCode | `leet.lua` | LeetCode integration |
|
||||||
|
| Database | `database.lua` | Database operations |
|
||||||
|
|
||||||
### **snacks.lua**
|
## Adding New Keymaps
|
||||||
- File search (`<leader>ff`, `<leader>fs`)
|
|
||||||
- Buffer management
|
|
||||||
- Git integration
|
|
||||||
- Help and commands
|
|
||||||
|
|
||||||
### **plugins.lua**
|
|
||||||
- NvimTree
|
|
||||||
- Comment
|
|
||||||
- DAP (debugging)
|
|
||||||
- Trouble
|
|
||||||
- Terminal
|
|
||||||
- Session management
|
|
||||||
- Git conflicts
|
|
||||||
- LeetCode
|
|
||||||
- And more...
|
|
||||||
|
|
||||||
## ➕ Adding New Keymaps
|
|
||||||
|
|
||||||
To add new keymaps:
|
|
||||||
|
|
||||||
1. **Choose the appropriate file** based on the category
|
1. **Choose the appropriate file** based on the category
|
||||||
2. **Add your keymaps** using the standard format:
|
2. **Add your keymaps** using the standard format:
|
||||||
```lua
|
```lua
|
||||||
|
local keymap = vim.keymap
|
||||||
keymap.set("n", "<leader>key", "<cmd>command<cr>", { desc = "Description" })
|
keymap.set("n", "<leader>key", "<cmd>command<cr>", { desc = "Description" })
|
||||||
```
|
```
|
||||||
3. **The keymaps will be automatically loaded** when Neovim starts
|
3. **The keymaps will be automatically loaded** when Neovim starts
|
||||||
|
|
||||||
## 🎯 Keymap Categories
|
## Leader Key Prefixes
|
||||||
|
|
||||||
| Category | File | Description |
|
| Prefix | Category |
|
||||||
|----------|------|-------------|
|
|--------|----------|
|
||||||
| General | `general.lua` | Basic setup and utilities |
|
| `<leader>f` | Find/Files (Telescope) |
|
||||||
| Personal | `personal.lua` | Your workflow shortcuts |
|
| `<leader>g` | Git |
|
||||||
| LSP | `lsp.lua` | Function navigation and LSP features |
|
| `<leader>d` | Debug |
|
||||||
| Debugging | `dap.lua` | DAP debugging (Java, Node.js, Python) |
|
| `<leader>l` | LSP/LeetCode |
|
||||||
| Search | `snacks.lua` | File and text search |
|
| `<leader>x` | Trouble/Diagnostics |
|
||||||
| Window | `window.lua` | Window/split management |
|
| `<leader>s` | Search/Session |
|
||||||
| Copilot | `copilot.lua` | AI assistant keymaps |
|
| `<leader>t` | Toggle/Text/Treesj |
|
||||||
| Git Conflicts | `gitconflict.lua` | Conflict resolution |
|
| `<leader>h` | Harpoon |
|
||||||
| Plugins | `plugins.lua` | Plugin-specific functionality |
|
| `<leader>k` | Kulala (HTTP) |
|
||||||
|
| `<leader>o` | Overseer/Octo |
|
||||||
|
| `<leader>n` | NPM/Navbuddy |
|
||||||
|
| `<leader>c` | Code/Crates |
|
||||||
|
| `<leader>v` | Vim learning |
|
||||||
|
| `<leader>z` | Zen mode |
|
||||||
|
| `<leader>q` | Session (persistence) |
|
||||||
|
| `<leader>r` | Rename/Regex |
|
||||||
|
| `<leader>p` | Portal/Projects |
|
||||||
|
|
||||||
## 🔄 Benefits
|
## Full Reference
|
||||||
|
|
||||||
- **Modular**: Each category is in its own file
|
See [KEYMAPS.md](../../../../KEYMAPS.md) in the root directory for complete keybinding reference.
|
||||||
- **Maintainable**: Easy to find and modify specific keymaps
|
|
||||||
- **Scalable**: Easy to add new categories
|
|
||||||
- **Organized**: Clear separation of concerns
|
|
||||||
- **Auto-loading**: No need to manually import files
|
|
||||||
|
|
||||||
## 🚀 Usage
|
## Notes
|
||||||
|
|
||||||
The keymaps are automatically loaded when Neovim starts. You can:
|
|
||||||
|
|
||||||
- **View all keymaps**: `<leader>fk` (Snacks keymaps)
|
|
||||||
- **Search keymaps**: Use Snacks to search through your keymaps
|
|
||||||
- **Modify keymaps**: Edit the appropriate file and restart Neovim
|
|
||||||
|
|
||||||
## 📝 Notes
|
|
||||||
|
|
||||||
- All files are automatically loaded by `keymaps.lua`
|
- All files are automatically loaded by `keymaps.lua`
|
||||||
- Each file should have its own `local keymap = vim.keymap` declaration
|
- Each file should have its own `local keymap = vim.keymap` declaration
|
||||||
- Use descriptive comments to organize keymaps within each file
|
- Use descriptive `desc` for all keymaps (shows in which-key)
|
||||||
- Follow the existing naming conventions for consistency
|
- Follow the existing naming conventions for consistency
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
-- Database keymaps
|
-- Database keymaps
|
||||||
|
-- Using <leader>D prefix to avoid conflicts with DAP keymaps (<leader>d)
|
||||||
local keymap = vim.keymap
|
local keymap = vim.keymap
|
||||||
|
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
@@ -6,47 +7,47 @@ local keymap = vim.keymap
|
|||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
-- Toggle database UI
|
-- Toggle database UI
|
||||||
keymap.set("n", "<leader>du", "<cmd>DBUIToggle<CR>", { desc = "Toggle Database UI" })
|
keymap.set("n", "<leader>Du", "<cmd>DBUIToggle<CR>", { desc = "Toggle Database UI" })
|
||||||
|
|
||||||
-- Add a new database connection
|
-- Add a new database connection
|
||||||
keymap.set("n", "<leader>da", "<cmd>DBUIAddConnection<CR>", { desc = "Add DB Connection" })
|
keymap.set("n", "<leader>Da", "<cmd>DBUIAddConnection<CR>", { desc = "Add DB Connection" })
|
||||||
|
|
||||||
-- Find buffer (useful when you have multiple query buffers)
|
-- Find buffer (useful when you have multiple query buffers)
|
||||||
keymap.set("n", "<leader>df", "<cmd>DBUIFindBuffer<CR>", { desc = "Find DB Buffer" })
|
keymap.set("n", "<leader>Df", "<cmd>DBUIFindBuffer<CR>", { desc = "Find DB Buffer" })
|
||||||
|
|
||||||
-- Execute query (works in sql buffers)
|
-- Execute query (works in sql buffers)
|
||||||
keymap.set("n", "<leader>de", "<Plug>(DBUI_ExecuteQuery)", { desc = "Execute Query" })
|
keymap.set("n", "<leader>De", "<Plug>(DBUI_ExecuteQuery)", { desc = "Execute Query" })
|
||||||
keymap.set("v", "<leader>de", "<Plug>(DBUI_ExecuteQuery)", { desc = "Execute Selected Query" })
|
keymap.set("v", "<leader>De", "<Plug>(DBUI_ExecuteQuery)", { desc = "Execute Selected Query" })
|
||||||
|
|
||||||
-- Save query
|
-- Save query
|
||||||
keymap.set("n", "<leader>dw", "<Plug>(DBUI_SaveQuery)", { desc = "Save Query" })
|
keymap.set("n", "<leader>Dw", "<Plug>(DBUI_SaveQuery)", { desc = "Save Query" })
|
||||||
|
|
||||||
-- Rename buffer
|
-- Rename buffer
|
||||||
keymap.set("n", "<leader>dr", "<Plug>(DBUI_RenameBuf)", { desc = "Rename DB Buffer" })
|
keymap.set("n", "<leader>Dr", "<Plug>(DBUI_RenameBuf)", { desc = "Rename DB Buffer" })
|
||||||
|
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
-- QUICK CONNECTIONS
|
-- QUICK CONNECTIONS
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
-- PostgreSQL Docker (default: 5432 postgres postgres postgres)
|
-- PostgreSQL Docker (default: 5432 postgres postgres postgres)
|
||||||
keymap.set("n", "<leader>dp", "<cmd>DBPostgresDocker<CR>", { desc = "Connect PostgreSQL Docker" })
|
keymap.set("n", "<leader>Dp", "<cmd>DBPostgresDocker<CR>", { desc = "Connect PostgreSQL Docker" })
|
||||||
|
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
-- MONGODB
|
-- MONGODB
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
-- Open MongoDB shell (local)
|
-- Open MongoDB shell (local)
|
||||||
keymap.set("n", "<leader>dm", "<cmd>MongoDB<CR>", { desc = "Open MongoDB Shell" })
|
keymap.set("n", "<leader>Dm", "<cmd>MongoDB<CR>", { desc = "Open MongoDB Shell" })
|
||||||
|
|
||||||
-- Open MongoDB in Docker container
|
-- Open MongoDB in Docker container
|
||||||
keymap.set("n", "<leader>dM", "<cmd>MongoDBDocker<CR>", { desc = "MongoDB Docker Shell" })
|
keymap.set("n", "<leader>DM", "<cmd>MongoDBDocker<CR>", { desc = "MongoDB Docker Shell" })
|
||||||
|
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
-- REDIS
|
-- REDIS
|
||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
-- Open Redis CLI (local)
|
-- Open Redis CLI (local)
|
||||||
keymap.set("n", "<leader>di", "<cmd>Redis<CR>", { desc = "Open Redis CLI" })
|
keymap.set("n", "<leader>Di", "<cmd>Redis<CR>", { desc = "Open Redis CLI" })
|
||||||
|
|
||||||
-- Open Redis in Docker container
|
-- Open Redis in Docker container
|
||||||
keymap.set("n", "<leader>dI", "<cmd>RedisDocker<CR>", { desc = "Redis Docker CLI" })
|
keymap.set("n", "<leader>DI", "<cmd>RedisDocker<CR>", { desc = "Redis Docker CLI" })
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
-- Git Conflict keymaps
|
|
||||||
local keymap = vim.keymap
|
|
||||||
|
|
||||||
keymap.set("n", "]x", "<Plug>(git-conflict-next-conflict)", { desc = "Go to next git conflict" })
|
|
||||||
keymap.set("n", "[x", "<Plug>(git-conflict-prev-conflict)", { desc = "Go to previous git conflict" })
|
|
||||||
keymap.set("n", "<leader>gco", "<Plug>(git-conflict-ours)", { desc = "Choose ours (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>gct", "<Plug>(git-conflict-theirs)", { desc = "Choose theirs (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>gcb", "<Plug>(git-conflict-both)", { desc = "Choose both (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>gc0", "<Plug>(git-conflict-none)", { desc = "Choose none (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>gcl", "<Plug>(git-conflict-list)", { desc = "List all git conflicts" })
|
|
||||||
@@ -6,7 +6,7 @@ local keymap = vim.keymap
|
|||||||
-- =============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
keymap.set("n", "<leader>u", function()
|
keymap.set("n", "<leader>u", function()
|
||||||
vim.cmd("normal! ggVG")
|
vim.cmd("normal! ggVG$")
|
||||||
end, { desc = "Select the whole file" })
|
end, { desc = "Select the whole file" })
|
||||||
keymap.set("n", "<leader>4", function()
|
keymap.set("n", "<leader>4", function()
|
||||||
-- Copy current line and paste below
|
-- Copy current line and paste below
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
return {
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
event = "VimEnter",
|
|
||||||
enabled = false, -- Replaced by Snacks dashboard
|
|
||||||
config = function()
|
|
||||||
local alpha = require("alpha")
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
local config = require("cargdev.core.dashboard_config")
|
|
||||||
|
|
||||||
-- Set header from shared config
|
|
||||||
dashboard.section.header.val = config.header
|
|
||||||
|
|
||||||
-- Set menu from shared config
|
|
||||||
dashboard.section.buttons.val = config.get_alpha_buttons(dashboard)
|
|
||||||
|
|
||||||
-- Footer with fortune
|
|
||||||
local function center_text(text, width)
|
|
||||||
local padding = math.floor((width - #text) / 2)
|
|
||||||
return padding > 0 and string.rep(" ", padding) .. text or text
|
|
||||||
end
|
|
||||||
|
|
||||||
local function wrap_text(text, width)
|
|
||||||
local wrapped_lines = {}
|
|
||||||
for line in text:gmatch("[^\n]+") do
|
|
||||||
while #line > width do
|
|
||||||
local cut = line:sub(1, width)
|
|
||||||
table.insert(wrapped_lines, center_text(cut, width))
|
|
||||||
line = line:sub(width + 1)
|
|
||||||
end
|
|
||||||
table.insert(wrapped_lines, center_text(line, width))
|
|
||||||
end
|
|
||||||
return wrapped_lines
|
|
||||||
end
|
|
||||||
|
|
||||||
local viewport_width = 50
|
|
||||||
local handle = io.popen("fortune")
|
|
||||||
local quote = handle and handle:read("*a") or "Code, Create, Conquer with CarGDev"
|
|
||||||
if handle then handle:close() end
|
|
||||||
local wrapped_quote = wrap_text(quote:gsub("\n", " "), viewport_width)
|
|
||||||
|
|
||||||
dashboard.section.footer.val = { "", center_text("CarGDev - Innovating with Neovim!", viewport_width), "" }
|
|
||||||
for _, line in ipairs(wrapped_quote) do
|
|
||||||
table.insert(dashboard.section.footer.val, line)
|
|
||||||
end
|
|
||||||
|
|
||||||
dashboard.opts.opts = { position = "center", hl = "Statement", spacing = 2 }
|
|
||||||
alpha.setup(dashboard.opts)
|
|
||||||
vim.cmd([[autocmd FileType alpha setlocal nofoldenable]])
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
43
lua/cargdev/plugins/colorful-winsep.lua
Normal file
43
lua/cargdev/plugins/colorful-winsep.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
return {
|
||||||
|
"nvim-zh/colorful-winsep.nvim",
|
||||||
|
event = { "WinLeave" },
|
||||||
|
config = function()
|
||||||
|
require("colorful-winsep").setup({
|
||||||
|
hi = {
|
||||||
|
bg = "",
|
||||||
|
fg = "#806d9c",
|
||||||
|
},
|
||||||
|
no_exec_files = {
|
||||||
|
"NvimTree",
|
||||||
|
"neo-tree",
|
||||||
|
"packer",
|
||||||
|
"TelescopePrompt",
|
||||||
|
"mason",
|
||||||
|
"lazy",
|
||||||
|
"CompetiTest",
|
||||||
|
"fugitive",
|
||||||
|
},
|
||||||
|
smooth = true,
|
||||||
|
exponential_smoothing = true,
|
||||||
|
anchor = {
|
||||||
|
left = { height = 1, x = -1, y = -1 },
|
||||||
|
right = { height = 1, x = -1, y = 0 },
|
||||||
|
up = { width = 0, x = -1, y = 0 },
|
||||||
|
bottom = { width = 0, x = 1, y = 0 },
|
||||||
|
},
|
||||||
|
symbols = { "─", "│", "┌", "┐", "└", "┘" },
|
||||||
|
only_line_seq = true,
|
||||||
|
create_event = function()
|
||||||
|
local win_n = require("colorful-winsep.utils").calculate_number_windows()
|
||||||
|
if win_n == 2 then
|
||||||
|
local win_id = vim.fn.win_getid(vim.fn.winnr("h"))
|
||||||
|
local filetype = vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(win_id), "filetype")
|
||||||
|
if filetype == "NvimTree" or filetype == "neo-tree" then
|
||||||
|
require("colorful-winsep").NvsepRealClose()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
close_event = function() end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
73
lua/cargdev/plugins/crates.lua
Normal file
73
lua/cargdev/plugins/crates.lua
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
return {
|
||||||
|
"saecki/crates.nvim",
|
||||||
|
event = { "BufRead Cargo.toml" },
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {
|
||||||
|
smart_insert = true,
|
||||||
|
insert_closing_quote = true,
|
||||||
|
autoload = true,
|
||||||
|
autoupdate = true,
|
||||||
|
autoupdate_throttle = 250,
|
||||||
|
loading_indicator = true,
|
||||||
|
date_format = "%Y-%m-%d",
|
||||||
|
thousands_separator = ",",
|
||||||
|
notification_title = "crates.nvim",
|
||||||
|
curl_args = { "-sL", "--retry", "1" },
|
||||||
|
max_parallel_requests = 80,
|
||||||
|
open_programs = { "xdg-open", "open" },
|
||||||
|
expand_crate_moves_cursor = true,
|
||||||
|
enable_update_available_warning = true,
|
||||||
|
on_attach = function(bufnr) end,
|
||||||
|
text = {
|
||||||
|
loading = " Loading",
|
||||||
|
version = " %s",
|
||||||
|
prerelease = " %s",
|
||||||
|
yanked = " %s",
|
||||||
|
nomatch = " No match",
|
||||||
|
upgrade = " %s",
|
||||||
|
error = " Error fetching crate",
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
loading = "CratesNvimLoading",
|
||||||
|
version = "CratesNvimVersion",
|
||||||
|
prerelease = "CratesNvimPreRelease",
|
||||||
|
yanked = "CratesNvimYanked",
|
||||||
|
nomatch = "CratesNvimNoMatch",
|
||||||
|
upgrade = "CratesNvimUpgrade",
|
||||||
|
error = "CratesNvimError",
|
||||||
|
},
|
||||||
|
popup = {
|
||||||
|
autofocus = false,
|
||||||
|
hide_on_select = false,
|
||||||
|
copy_register = '"',
|
||||||
|
style = "minimal",
|
||||||
|
border = "rounded",
|
||||||
|
show_version_date = true,
|
||||||
|
show_dependency_version = true,
|
||||||
|
max_height = 30,
|
||||||
|
min_width = 20,
|
||||||
|
padding = 1,
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
cmp = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp = {
|
||||||
|
enabled = true,
|
||||||
|
on_attach = function(client, bufnr) end,
|
||||||
|
actions = true,
|
||||||
|
completion = true,
|
||||||
|
hover = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ct", "<cmd>lua require('crates').toggle()<cr>", desc = "Toggle crates" },
|
||||||
|
{ "<leader>cr", "<cmd>lua require('crates').reload()<cr>", desc = "Reload crates" },
|
||||||
|
{ "<leader>cv", "<cmd>lua require('crates').show_versions_popup()<cr>", desc = "Show versions" },
|
||||||
|
{ "<leader>cf", "<cmd>lua require('crates').show_features_popup()<cr>", desc = "Show features" },
|
||||||
|
{ "<leader>cd", "<cmd>lua require('crates').show_dependencies_popup()<cr>", desc = "Show dependencies" },
|
||||||
|
{ "<leader>cu", "<cmd>lua require('crates').update_crate()<cr>", desc = "Update crate" },
|
||||||
|
{ "<leader>cU", "<cmd>lua require('crates').upgrade_crate()<cr>", desc = "Upgrade crate" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,14 +1,20 @@
|
|||||||
return {
|
return {
|
||||||
"kristijanhusak/vim-dadbod-ui",
|
"kristijanhusak/vim-dadbod-ui",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "tpope/vim-dadbod", lazy = true },
|
{ "tpope/vim-dadbod" }, -- Remove lazy = true, needs to load with UI
|
||||||
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
|
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" } },
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
"DBUI",
|
"DBUI",
|
||||||
"DBUIToggle",
|
"DBUIToggle",
|
||||||
"DBUIAddConnection",
|
"DBUIAddConnection",
|
||||||
"DBUIFindBuffer",
|
"DBUIFindBuffer",
|
||||||
|
"DBUIRenameBuffer",
|
||||||
|
"DBUILastQueryInfo",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>Du", "<cmd>DBUIToggle<CR>", desc = "Toggle Database UI" },
|
||||||
|
{ "<leader>Da", "<cmd>DBUIAddConnection<CR>", desc = "Add DB Connection" },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
-- Database UI configuration
|
-- Database UI configuration
|
||||||
@@ -142,12 +148,25 @@ return {
|
|||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "sql", "mysql", "plsql" },
|
pattern = { "sql", "mysql", "plsql" },
|
||||||
callback = function()
|
callback = function()
|
||||||
require("cmp").setup.buffer({
|
local ok, cmp = pcall(require, "cmp")
|
||||||
sources = {
|
if ok then
|
||||||
{ name = "vim-dadbod-completion" },
|
cmp.setup.buffer({
|
||||||
{ name = "buffer" },
|
sources = {
|
||||||
},
|
{ name = "vim-dadbod-completion" },
|
||||||
})
|
{ name = "buffer" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Also setup completion for dbui buffers
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = { "dbui" },
|
||||||
|
callback = function()
|
||||||
|
-- Enable line numbers in dbui
|
||||||
|
vim.opt_local.number = false
|
||||||
|
vim.opt_local.relativenumber = false
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
event = "VeryLazy", -- Changed from immediate loading to lazy loading
|
event = { "VeryLazy", "FileType java" }, -- Load on VeryLazy or when opening Java files
|
||||||
cmd = { "Dap", "DapUI", "DapContinue", "DapToggleBreakpoint" }, -- Load on command
|
cmd = { "Dap", "DapUI", "DapContinue", "DapToggleBreakpoint" }, -- Load on command
|
||||||
|
ft = { "java" }, -- Also load for Java filetype
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-neotest/nvim-nio", lazy = false },
|
{ "nvim-neotest/nvim-nio", lazy = false },
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
|
|||||||
120
lua/cargdev/plugins/dial.lua
Normal file
120
lua/cargdev/plugins/dial.lua
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
return {
|
||||||
|
"monaqa/dial.nvim",
|
||||||
|
keys = {
|
||||||
|
{ "<C-a>", function() return require("dial.map").inc_normal() end, expr = true, desc = "Increment" },
|
||||||
|
{ "<C-x>", function() return require("dial.map").dec_normal() end, expr = true, desc = "Decrement" },
|
||||||
|
{ "g<C-a>", function() return require("dial.map").inc_gnormal() end, expr = true, desc = "Increment (g)" },
|
||||||
|
{ "g<C-x>", function() return require("dial.map").dec_gnormal() end, expr = true, desc = "Decrement (g)" },
|
||||||
|
{ "<C-a>", function() return require("dial.map").inc_visual() end, mode = "v", expr = true, desc = "Increment" },
|
||||||
|
{ "<C-x>", function() return require("dial.map").dec_visual() end, mode = "v", expr = true, desc = "Decrement" },
|
||||||
|
{ "g<C-a>", function() return require("dial.map").inc_gvisual() end, mode = "v", expr = true, desc = "Increment (g)" },
|
||||||
|
{ "g<C-x>", function() return require("dial.map").dec_gvisual() end, mode = "v", expr = true, desc = "Decrement (g)" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local augend = require("dial.augend")
|
||||||
|
require("dial.config").augends:register_group({
|
||||||
|
default = {
|
||||||
|
augend.integer.alias.decimal,
|
||||||
|
augend.integer.alias.hex,
|
||||||
|
augend.integer.alias.octal,
|
||||||
|
augend.integer.alias.binary,
|
||||||
|
augend.date.alias["%Y/%m/%d"],
|
||||||
|
augend.date.alias["%Y-%m-%d"],
|
||||||
|
augend.date.alias["%m/%d/%Y"],
|
||||||
|
augend.date.alias["%d/%m/%Y"],
|
||||||
|
augend.date.alias["%H:%M:%S"],
|
||||||
|
augend.date.alias["%H:%M"],
|
||||||
|
augend.constant.alias.bool,
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "true", "false" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "True", "False" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "yes", "no" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "Yes", "No" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "on", "off" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "enable", "disable" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "enabled", "disabled" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "public", "private", "protected" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "let", "const", "var" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "&&", "||" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "==", "!=" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "===", "!==" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { ">", "<" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { ">=", "<=" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "px", "em", "rem", "%" },
|
||||||
|
word = false,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "GET", "POST", "PUT", "PATCH", "DELETE" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.constant.new({
|
||||||
|
elements = { "info", "warn", "error", "debug" },
|
||||||
|
word = true,
|
||||||
|
cyclic = true,
|
||||||
|
}),
|
||||||
|
augend.hexcolor.new({
|
||||||
|
case = "lower",
|
||||||
|
}),
|
||||||
|
augend.semver.alias.semver,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
82
lua/cargdev/plugins/diffview.lua
Normal file
82
lua/cargdev/plugins/diffview.lua
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
return {
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles", "DiffviewFileHistory" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gd", "<cmd>DiffviewOpen<cr>", desc = "Diffview open" },
|
||||||
|
{ "<leader>gD", "<cmd>DiffviewClose<cr>", desc = "Diffview close" },
|
||||||
|
{ "<leader>gh", "<cmd>DiffviewFileHistory %<cr>", desc = "File history (current)" },
|
||||||
|
{ "<leader>gH", "<cmd>DiffviewFileHistory<cr>", desc = "File history (repo)" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
diff_binaries = false,
|
||||||
|
enhanced_diff_hl = true,
|
||||||
|
use_icons = true,
|
||||||
|
show_help_hints = true,
|
||||||
|
watch_index = true,
|
||||||
|
icons = {
|
||||||
|
folder_closed = "",
|
||||||
|
folder_open = "",
|
||||||
|
},
|
||||||
|
signs = {
|
||||||
|
fold_closed = "",
|
||||||
|
fold_open = "",
|
||||||
|
done = "✓",
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
default = {
|
||||||
|
layout = "diff2_horizontal",
|
||||||
|
winbar_info = false,
|
||||||
|
},
|
||||||
|
merge_tool = {
|
||||||
|
layout = "diff3_horizontal",
|
||||||
|
disable_diagnostics = true,
|
||||||
|
winbar_info = true,
|
||||||
|
},
|
||||||
|
file_history = {
|
||||||
|
layout = "diff2_horizontal",
|
||||||
|
winbar_info = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
file_panel = {
|
||||||
|
listing_style = "tree",
|
||||||
|
tree_options = {
|
||||||
|
flatten_dirs = true,
|
||||||
|
folder_statuses = "only_folded",
|
||||||
|
},
|
||||||
|
win_config = {
|
||||||
|
position = "left",
|
||||||
|
width = 35,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
file_history_panel = {
|
||||||
|
log_options = {
|
||||||
|
git = {
|
||||||
|
single_file = {
|
||||||
|
diff_merges = "combined",
|
||||||
|
},
|
||||||
|
multi_file = {
|
||||||
|
diff_merges = "first-parent",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
win_config = {
|
||||||
|
position = "bottom",
|
||||||
|
height = 16,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hooks = {},
|
||||||
|
keymaps = {
|
||||||
|
view = {
|
||||||
|
{ "n", "<tab>", "<cmd>DiffviewToggleFiles<cr>", { desc = "Toggle file panel" } },
|
||||||
|
{ "n", "q", "<cmd>DiffviewClose<cr>", { desc = "Close diffview" } },
|
||||||
|
},
|
||||||
|
file_panel = {
|
||||||
|
{ "n", "q", "<cmd>DiffviewClose<cr>", { desc = "Close diffview" } },
|
||||||
|
},
|
||||||
|
file_history_panel = {
|
||||||
|
{ "n", "q", "<cmd>DiffviewClose<cr>", { desc = "Close diffview" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
137
lua/cargdev/plugins/dropbar.lua
Normal file
137
lua/cargdev/plugins/dropbar.lua
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
return {
|
||||||
|
"Bekaboo/dropbar.nvim",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
bar = {
|
||||||
|
hover = true,
|
||||||
|
sources = function(buf, _)
|
||||||
|
local sources = require("dropbar.sources")
|
||||||
|
local utils = require("dropbar.utils")
|
||||||
|
if vim.bo[buf].ft == "markdown" then
|
||||||
|
return { sources.markdown }
|
||||||
|
end
|
||||||
|
if vim.bo[buf].buftype == "terminal" then
|
||||||
|
return { sources.terminal }
|
||||||
|
end
|
||||||
|
return {
|
||||||
|
sources.path,
|
||||||
|
utils.source.fallback({
|
||||||
|
sources.lsp,
|
||||||
|
sources.treesitter,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
padding = {
|
||||||
|
left = 1,
|
||||||
|
right = 1,
|
||||||
|
},
|
||||||
|
pick = {
|
||||||
|
pivots = "abcdefghijklmnopqrstuvwxyz",
|
||||||
|
},
|
||||||
|
truncate = true,
|
||||||
|
},
|
||||||
|
icons = {
|
||||||
|
enable = true,
|
||||||
|
kinds = {
|
||||||
|
use_devicons = true,
|
||||||
|
symbols = {
|
||||||
|
Array = " ",
|
||||||
|
Boolean = " ",
|
||||||
|
BreakStatement = " ",
|
||||||
|
Call = " ",
|
||||||
|
CaseStatement = " ",
|
||||||
|
Class = " ",
|
||||||
|
Color = " ",
|
||||||
|
Constant = " ",
|
||||||
|
Constructor = " ",
|
||||||
|
ContinueStatement = "→ ",
|
||||||
|
Copilot = " ",
|
||||||
|
Declaration = " ",
|
||||||
|
Delete = " ",
|
||||||
|
DoStatement = " ",
|
||||||
|
Enum = " ",
|
||||||
|
EnumMember = " ",
|
||||||
|
Event = " ",
|
||||||
|
Field = " ",
|
||||||
|
File = " ",
|
||||||
|
Folder = " ",
|
||||||
|
ForStatement = " ",
|
||||||
|
Function = " ",
|
||||||
|
Identifier = " ",
|
||||||
|
IfStatement = " ",
|
||||||
|
Interface = " ",
|
||||||
|
Keyword = " ",
|
||||||
|
List = " ",
|
||||||
|
Log = " ",
|
||||||
|
Lsp = " ",
|
||||||
|
Macro = " ",
|
||||||
|
MarkdownH1 = " ",
|
||||||
|
MarkdownH2 = " ",
|
||||||
|
MarkdownH3 = " ",
|
||||||
|
MarkdownH4 = " ",
|
||||||
|
MarkdownH5 = " ",
|
||||||
|
MarkdownH6 = " ",
|
||||||
|
Method = " ",
|
||||||
|
Module = " ",
|
||||||
|
Namespace = " ",
|
||||||
|
Null = " ",
|
||||||
|
Number = " ",
|
||||||
|
Object = " ",
|
||||||
|
Operator = " ",
|
||||||
|
Package = " ",
|
||||||
|
Property = " ",
|
||||||
|
Reference = " ",
|
||||||
|
Regex = " ",
|
||||||
|
Repeat = " ",
|
||||||
|
Scope = " ",
|
||||||
|
Snippet = " ",
|
||||||
|
Specifier = " ",
|
||||||
|
Statement = " ",
|
||||||
|
String = " ",
|
||||||
|
Struct = " ",
|
||||||
|
SwitchStatement = " ",
|
||||||
|
Text = " ",
|
||||||
|
Type = " ",
|
||||||
|
TypeParameter = " ",
|
||||||
|
Unit = " ",
|
||||||
|
Value = " ",
|
||||||
|
Variable = " ",
|
||||||
|
WhileStatement = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ui = {
|
||||||
|
bar = {
|
||||||
|
separator = " ",
|
||||||
|
extends = "…",
|
||||||
|
},
|
||||||
|
menu = {
|
||||||
|
separator = " ",
|
||||||
|
indicator = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
menu = {
|
||||||
|
quick_navigation = true,
|
||||||
|
entry = {
|
||||||
|
padding = {
|
||||||
|
left = 1,
|
||||||
|
right = 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
["q"] = "<C-w>q",
|
||||||
|
["<Esc>"] = "<C-w>q",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
path = {
|
||||||
|
relative_to = function()
|
||||||
|
return vim.fn.getcwd()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
40
lua/cargdev/plugins/edgy.lua
Normal file
40
lua/cargdev/plugins/edgy.lua
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
return {
|
||||||
|
"folke/edgy.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
left = {
|
||||||
|
{
|
||||||
|
ft = "NvimTree",
|
||||||
|
size = { width = 35 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
right = {
|
||||||
|
{
|
||||||
|
ft = "Outline",
|
||||||
|
size = { width = 30 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bottom = {
|
||||||
|
{
|
||||||
|
ft = "snacks_terminal",
|
||||||
|
size = { height = 0.25 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ft = "trouble",
|
||||||
|
size = { height = 0.25 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ft = "qf",
|
||||||
|
size = { height = 0.2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
animate = { enabled = false },
|
||||||
|
exit_when_last = true,
|
||||||
|
wo = {
|
||||||
|
winbar = false,
|
||||||
|
winfixwidth = true,
|
||||||
|
winfixheight = false,
|
||||||
|
signcolumn = "no",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
54
lua/cargdev/plugins/flash.lua
Normal file
54
lua/cargdev/plugins/flash.lua
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
return {
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
labels = "asdfghjklqwertyuiopzxcvbnm",
|
||||||
|
search = {
|
||||||
|
multi_window = true,
|
||||||
|
forward = true,
|
||||||
|
wrap = true,
|
||||||
|
},
|
||||||
|
jump = {
|
||||||
|
jumplist = true,
|
||||||
|
pos = "start",
|
||||||
|
history = false,
|
||||||
|
register = false,
|
||||||
|
nohlsearch = false,
|
||||||
|
autojump = false,
|
||||||
|
},
|
||||||
|
label = {
|
||||||
|
uppercase = false,
|
||||||
|
rainbow = {
|
||||||
|
enabled = true,
|
||||||
|
shade = 5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
modes = {
|
||||||
|
search = {
|
||||||
|
enabled = false, -- set to true to enable flash in search mode
|
||||||
|
},
|
||||||
|
char = {
|
||||||
|
enabled = true,
|
||||||
|
jump_labels = true,
|
||||||
|
multi_line = false,
|
||||||
|
},
|
||||||
|
treesitter = {
|
||||||
|
labels = "asdfghjklqwertyuiopzxcvbnm",
|
||||||
|
jump = { pos = "range" },
|
||||||
|
search = { incremental = false },
|
||||||
|
label = { before = true, after = true, style = "inline" },
|
||||||
|
highlight = {
|
||||||
|
backdrop = false,
|
||||||
|
matches = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
return {
|
|
||||||
"ibhagwan/fzf-lua",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
local fzf = require("fzf-lua")
|
|
||||||
fzf.setup({
|
|
||||||
"default",
|
|
||||||
winopts = {
|
|
||||||
height = 0.85,
|
|
||||||
width = 0.80,
|
|
||||||
row = 0.35,
|
|
||||||
col = 0.50,
|
|
||||||
border = "rounded",
|
|
||||||
preview = {
|
|
||||||
layout = "flex",
|
|
||||||
flip_columns = 120,
|
|
||||||
scrollbar = "float",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keymap = {
|
|
||||||
builtin = {
|
|
||||||
["<C-d>"] = "preview-page-down",
|
|
||||||
["<C-u>"] = "preview-page-up",
|
|
||||||
},
|
|
||||||
fzf = {
|
|
||||||
["ctrl-q"] = "select-all+accept",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
async_or_timeout = 5000,
|
|
||||||
jump_to_single_result = true,
|
|
||||||
ignore_current_line = true,
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
severity_limit = vim.diagnostic.severity.HINT,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
24
lua/cargdev/plugins/git-blame.lua
Normal file
24
lua/cargdev/plugins/git-blame.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
"f-person/git-blame.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
enabled = false, -- Start disabled, toggle with <leader>gB
|
||||||
|
message_template = " <author> • <date> • <summary>",
|
||||||
|
date_format = "%Y-%m-%d",
|
||||||
|
virtual_text_column = 80, -- Push to column 80 to avoid overlap
|
||||||
|
highlight_group = "Comment",
|
||||||
|
set_extmark_options = {
|
||||||
|
priority = 1, -- Lower priority so diagnostics show on top
|
||||||
|
},
|
||||||
|
display_virtual_text = true,
|
||||||
|
ignored_filetypes = { "NvimTree", "neo-tree", "lazy", "mason", "help" },
|
||||||
|
delay = 500,
|
||||||
|
message_when_not_committed = "",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gB", "<cmd>GitBlameToggle<cr>", desc = "Toggle git blame" },
|
||||||
|
{ "<leader>gbc", "<cmd>GitBlameCopySHA<cr>", desc = "Copy commit SHA" },
|
||||||
|
{ "<leader>gbo", "<cmd>GitBlameOpenCommitURL<cr>", desc = "Open commit URL" },
|
||||||
|
{ "<leader>gbf", "<cmd>GitBlameOpenFileURL<cr>", desc = "Open file URL" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
return {
|
|
||||||
"akinsho/git-conflict.nvim",
|
|
||||||
config = function()
|
|
||||||
require("git-conflict").setup({
|
|
||||||
default_mappings = true, -- enable buffer local mapping created by this plugin
|
|
||||||
disable_diagnostics = true, -- This will disable diagnostics in a buffer whilst it is conflicted
|
|
||||||
highlights = { -- They must have background color, otherwise the default color will be used
|
|
||||||
incoming = "DiffText",
|
|
||||||
current = "DiffAdd",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
55
lua/cargdev/plugins/grug-far.lua
Normal file
55
lua/cargdev/plugins/grug-far.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
"MagicDuck/grug-far.nvim",
|
||||||
|
cmd = "GrugFar",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>sr", "<cmd>GrugFar<cr>", desc = "Search and Replace" },
|
||||||
|
{
|
||||||
|
"<leader>sR",
|
||||||
|
function()
|
||||||
|
require("grug-far").grug_far({ prefills = { search = vim.fn.expand("<cword>") } })
|
||||||
|
end,
|
||||||
|
desc = "Search current word",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>sR",
|
||||||
|
function()
|
||||||
|
require("grug-far").with_visual_selection()
|
||||||
|
end,
|
||||||
|
mode = "v",
|
||||||
|
desc = "Search selection",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
headerMaxWidth = 80,
|
||||||
|
icons = {
|
||||||
|
enabled = true,
|
||||||
|
actionEntryBullet = " ",
|
||||||
|
searchInput = " ",
|
||||||
|
replaceInput = " ",
|
||||||
|
filesFilterInput = " ",
|
||||||
|
flagsInput = " ",
|
||||||
|
resultsStatusReady = " ",
|
||||||
|
resultsStatusError = " ",
|
||||||
|
resultsStatusSuccess = " ",
|
||||||
|
resultsActionMessage = " ",
|
||||||
|
resultsChangeIndicator = "│",
|
||||||
|
historyTitle = " ",
|
||||||
|
},
|
||||||
|
startInInsertMode = false,
|
||||||
|
windowCreationCommand = "vsplit",
|
||||||
|
transitionDuration = 80,
|
||||||
|
keymaps = {
|
||||||
|
replace = { n = "<localleader>r" },
|
||||||
|
qflist = { n = "<localleader>q" },
|
||||||
|
syncLocations = { n = "<localleader>s" },
|
||||||
|
syncLine = { n = "<localleader>l" },
|
||||||
|
close = { n = "q" },
|
||||||
|
historyOpen = { n = "<localleader>t" },
|
||||||
|
historyAdd = { n = "<localleader>a" },
|
||||||
|
refresh = { n = "<localleader>f" },
|
||||||
|
gotoLocation = { n = "<enter>" },
|
||||||
|
pickHistoryEntry = { n = "<enter>" },
|
||||||
|
abort = { n = "<localleader>b" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
50
lua/cargdev/plugins/hardtime.lua
Normal file
50
lua/cargdev/plugins/hardtime.lua
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
return {
|
||||||
|
"m4xshen/hardtime.nvim",
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
max_time = 1000,
|
||||||
|
max_count = 3,
|
||||||
|
disable_mouse = false,
|
||||||
|
hint = true,
|
||||||
|
notification = true,
|
||||||
|
allow_different_key = true,
|
||||||
|
enabled = false, -- DISABLED by default - use <leader>ht to enable
|
||||||
|
restriction_mode = "hint", -- Only show hints, never block
|
||||||
|
restricted_keys = {
|
||||||
|
["h"] = { "n", "x" },
|
||||||
|
["j"] = { "n", "x" },
|
||||||
|
["k"] = { "n", "x" },
|
||||||
|
["l"] = { "n", "x" },
|
||||||
|
},
|
||||||
|
disabled_keys = {}, -- Don't disable any keys
|
||||||
|
disabled_filetypes = {
|
||||||
|
"NvimTree",
|
||||||
|
"neo-tree",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"qf",
|
||||||
|
"netrw",
|
||||||
|
"help",
|
||||||
|
"oil",
|
||||||
|
"Trouble",
|
||||||
|
"trouble",
|
||||||
|
"spectre_panel",
|
||||||
|
"toggleterm",
|
||||||
|
"TelescopePrompt",
|
||||||
|
"snacks_input",
|
||||||
|
"noice",
|
||||||
|
"DressingInput",
|
||||||
|
"prompt",
|
||||||
|
},
|
||||||
|
disabled_buftypes = {
|
||||||
|
"nofile",
|
||||||
|
"prompt",
|
||||||
|
"popup",
|
||||||
|
"terminal",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ht", "<cmd>Hardtime toggle<cr>", desc = "Toggle Hardtime" },
|
||||||
|
},
|
||||||
|
}
|
||||||
33
lua/cargdev/plugins/harpoon.lua
Normal file
33
lua/cargdev/plugins/harpoon.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
return {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
|
||||||
|
harpoon:setup({
|
||||||
|
settings = {
|
||||||
|
save_on_toggle = true,
|
||||||
|
sync_on_ui_close = true,
|
||||||
|
key = function()
|
||||||
|
return vim.loop.cwd()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Keymaps
|
||||||
|
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end, { desc = "Harpoon add file" })
|
||||||
|
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = "Harpoon menu" })
|
||||||
|
|
||||||
|
-- Quick navigation to harpooned files
|
||||||
|
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end, { desc = "Harpoon file 1" })
|
||||||
|
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end, { desc = "Harpoon file 2" })
|
||||||
|
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end, { desc = "Harpoon file 3" })
|
||||||
|
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end, { desc = "Harpoon file 4" })
|
||||||
|
vim.keymap.set("n", "<leader>5", function() harpoon:list():select(5) end, { desc = "Harpoon file 5" })
|
||||||
|
|
||||||
|
-- Navigate between harpooned files
|
||||||
|
vim.keymap.set("n", "<leader>hp", function() harpoon:list():prev() end, { desc = "Harpoon prev" })
|
||||||
|
vim.keymap.set("n", "<leader>hn", function() harpoon:list():next() end, { desc = "Harpoon next" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
50
lua/cargdev/plugins/hlchunk.lua
Normal file
50
lua/cargdev/plugins/hlchunk.lua
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
return {
|
||||||
|
"shellRaining/hlchunk.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
config = function()
|
||||||
|
require("hlchunk").setup({
|
||||||
|
chunk = {
|
||||||
|
enable = true,
|
||||||
|
priority = 15,
|
||||||
|
style = {
|
||||||
|
{ fg = "#806d9c" },
|
||||||
|
{ fg = "#c21f30" },
|
||||||
|
},
|
||||||
|
use_treesitter = true,
|
||||||
|
chars = {
|
||||||
|
horizontal_line = "─",
|
||||||
|
vertical_line = "│",
|
||||||
|
left_top = "╭",
|
||||||
|
left_bottom = "╰",
|
||||||
|
right_arrow = ">",
|
||||||
|
},
|
||||||
|
textobject = "",
|
||||||
|
max_file_size = 1024 * 1024,
|
||||||
|
error_sign = true,
|
||||||
|
duration = 200,
|
||||||
|
delay = 300,
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
enable = true,
|
||||||
|
priority = 10,
|
||||||
|
style = { { fg = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Whitespace")), "fg", "gui") } },
|
||||||
|
use_treesitter = false,
|
||||||
|
chars = { "│" },
|
||||||
|
ahead_lines = 5,
|
||||||
|
delay = 100,
|
||||||
|
},
|
||||||
|
line_num = {
|
||||||
|
enable = true,
|
||||||
|
priority = 10,
|
||||||
|
style = "#806d9c",
|
||||||
|
use_treesitter = false,
|
||||||
|
},
|
||||||
|
blank = {
|
||||||
|
enable = false,
|
||||||
|
priority = 9,
|
||||||
|
chars = { "․" },
|
||||||
|
style = { { bg = "cursorline" }, { bg = "", fg = "" } },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
23
lua/cargdev/plugins/inc-rename.lua
Normal file
23
lua/cargdev/plugins/inc-rename.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
return {
|
||||||
|
"smjonas/inc-rename.nvim",
|
||||||
|
cmd = "IncRename",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>rn",
|
||||||
|
function()
|
||||||
|
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||||
|
end,
|
||||||
|
expr = true,
|
||||||
|
desc = "Incremental rename",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
cmd_name = "IncRename",
|
||||||
|
hl_group = "Substitute",
|
||||||
|
preview_empty_name = false,
|
||||||
|
show_message = true,
|
||||||
|
save_in_cmdline_history = true,
|
||||||
|
input_buffer_type = nil,
|
||||||
|
post_hook = nil,
|
||||||
|
},
|
||||||
|
}
|
||||||
25
lua/cargdev/plugins/kulala.lua
Normal file
25
lua/cargdev/plugins/kulala.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
"mistweaverco/kulala.nvim",
|
||||||
|
ft = "http",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>kr", "<cmd>lua require('kulala').run()<cr>", desc = "Run HTTP request" },
|
||||||
|
{ "<leader>ka", "<cmd>lua require('kulala').run_all()<cr>", desc = "Run all requests" },
|
||||||
|
{ "<leader>kp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Previous request" },
|
||||||
|
{ "<leader>kn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Next request" },
|
||||||
|
{ "<leader>ki", "<cmd>lua require('kulala').inspect()<cr>", desc = "Inspect request" },
|
||||||
|
{ "<leader>kt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
|
||||||
|
{ "<leader>kc", "<cmd>lua require('kulala').copy()<cr>", desc = "Copy as cURL" },
|
||||||
|
{ "<leader>ke", "<cmd>lua require('kulala').set_selected_env()<cr>", desc = "Set environment" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
default_view = "body",
|
||||||
|
split_direction = "vertical",
|
||||||
|
icons = {
|
||||||
|
inlay = {
|
||||||
|
loading = "⏳",
|
||||||
|
done = "✅",
|
||||||
|
error = "❌",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -35,34 +35,14 @@ return {
|
|||||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||||
|
|
||||||
-- Enhanced error handling for LSP diagnostics
|
-- Enhanced error handling for LSP diagnostics
|
||||||
|
-- NOTE: tiny-inline-diagnostic handles the display, so we disable virtual_text and float here
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
signs = {
|
signs = true,
|
||||||
severity = {
|
update_in_insert = false,
|
||||||
min = vim.diagnostic.severity.WARN,
|
virtual_text = false,
|
||||||
},
|
underline = true,
|
||||||
icons = {
|
severity_sort = true,
|
||||||
Error = " ",
|
float = false, -- Disabled - use <leader>sl for manual diagnostic float
|
||||||
Warn = " ",
|
|
||||||
Hint = " ",
|
|
||||||
Info = " ",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Performance optimizations
|
|
||||||
update_in_insert = false, -- Don't update diagnostics in insert mode
|
|
||||||
virtual_text = false, -- Disable virtual text for better performance
|
|
||||||
underline = true, -- Keep underline for errors
|
|
||||||
severity_sort = true, -- Sort diagnostics by severity
|
|
||||||
-- Error handling
|
|
||||||
float = {
|
|
||||||
border = "rounded",
|
|
||||||
source = "always",
|
|
||||||
format = function(diagnostic)
|
|
||||||
if diagnostic.source == "LSP" then
|
|
||||||
return string.format("%s [%s]", diagnostic.message, diagnostic.source)
|
|
||||||
end
|
|
||||||
return diagnostic.message
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Only attach to sensible buffers
|
-- Only attach to sensible buffers
|
||||||
|
|||||||
176
lua/cargdev/plugins/lspsaga.lua
Normal file
176
lua/cargdev/plugins/lspsaga.lua
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
return {
|
||||||
|
"nvimdev/lspsaga.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
event = "LspAttach",
|
||||||
|
opts = {
|
||||||
|
ui = {
|
||||||
|
border = "rounded",
|
||||||
|
devicon = true,
|
||||||
|
title = true,
|
||||||
|
expand = "",
|
||||||
|
collapse = "",
|
||||||
|
code_action = "💡",
|
||||||
|
actionfix = " ",
|
||||||
|
lines = { "┗", "┣", "┃", "━", "┏" },
|
||||||
|
kind = nil,
|
||||||
|
imp_sign = " ",
|
||||||
|
},
|
||||||
|
hover = {
|
||||||
|
max_width = 0.9,
|
||||||
|
max_height = 0.8,
|
||||||
|
open_link = "gx",
|
||||||
|
open_cmd = "!open",
|
||||||
|
},
|
||||||
|
diagnostic = {
|
||||||
|
show_code_action = false,
|
||||||
|
show_layout = "float",
|
||||||
|
show_normal_height = 10,
|
||||||
|
jump_num_shortcut = true,
|
||||||
|
max_width = 0.8,
|
||||||
|
max_height = 0.6,
|
||||||
|
max_show_width = 0.9,
|
||||||
|
max_show_height = 0.6,
|
||||||
|
text_hl_follow = false,
|
||||||
|
border_follow = true,
|
||||||
|
extend_relatedInformation = false,
|
||||||
|
diagnostic_only_current = true,
|
||||||
|
keys = {
|
||||||
|
exec_action = "o",
|
||||||
|
quit = "q",
|
||||||
|
toggle_or_jump = "<CR>",
|
||||||
|
quit_in_show = { "q", "<ESC>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
code_action = {
|
||||||
|
num_shortcut = true,
|
||||||
|
show_server_name = true,
|
||||||
|
extend_gitsigns = true,
|
||||||
|
only_in_cursor = true,
|
||||||
|
max_height = 0.3,
|
||||||
|
keys = {
|
||||||
|
quit = "q",
|
||||||
|
exec = "<CR>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lightbulb = {
|
||||||
|
enable = false, -- Using nvim-lightbulb instead
|
||||||
|
sign = false,
|
||||||
|
virtual_text = false,
|
||||||
|
},
|
||||||
|
scroll_preview = {
|
||||||
|
scroll_down = "<C-f>",
|
||||||
|
scroll_up = "<C-b>",
|
||||||
|
},
|
||||||
|
finder = {
|
||||||
|
max_height = 0.5,
|
||||||
|
left_width = 0.3,
|
||||||
|
right_width = 0.5,
|
||||||
|
methods = {},
|
||||||
|
default = "ref+imp",
|
||||||
|
layout = "float",
|
||||||
|
silent = false,
|
||||||
|
filter = {},
|
||||||
|
keys = {
|
||||||
|
shuttle = "[w",
|
||||||
|
toggle_or_open = "o",
|
||||||
|
vsplit = "s",
|
||||||
|
split = "i",
|
||||||
|
tabe = "t",
|
||||||
|
tabnew = "r",
|
||||||
|
quit = "q",
|
||||||
|
close = "<C-c>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
definition = {
|
||||||
|
width = 0.6,
|
||||||
|
height = 0.5,
|
||||||
|
keys = {
|
||||||
|
edit = "<C-c>o",
|
||||||
|
vsplit = "<C-c>v",
|
||||||
|
split = "<C-c>i",
|
||||||
|
tabe = "<C-c>t",
|
||||||
|
quit = "q",
|
||||||
|
close = "<C-c>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rename = {
|
||||||
|
in_select = true,
|
||||||
|
auto_save = false,
|
||||||
|
project_max_width = 0.5,
|
||||||
|
project_max_height = 0.5,
|
||||||
|
keys = {
|
||||||
|
quit = "<C-c>",
|
||||||
|
exec = "<CR>",
|
||||||
|
select = "x",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
symbol_in_winbar = {
|
||||||
|
enable = false, -- Using dropbar instead
|
||||||
|
separator = " › ",
|
||||||
|
hide_keyword = true,
|
||||||
|
show_file = true,
|
||||||
|
folder_level = 1,
|
||||||
|
color_mode = true,
|
||||||
|
},
|
||||||
|
outline = {
|
||||||
|
win_position = "right",
|
||||||
|
win_width = 30,
|
||||||
|
auto_preview = true,
|
||||||
|
detail = true,
|
||||||
|
auto_close = true,
|
||||||
|
close_after_jump = false,
|
||||||
|
layout = "normal",
|
||||||
|
max_height = 0.5,
|
||||||
|
left_width = 0.3,
|
||||||
|
keys = {
|
||||||
|
toggle_or_jump = "o",
|
||||||
|
quit = "q",
|
||||||
|
jump = "e",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
callhierarchy = {
|
||||||
|
layout = "float",
|
||||||
|
keys = {
|
||||||
|
edit = "e",
|
||||||
|
vsplit = "s",
|
||||||
|
split = "i",
|
||||||
|
tabe = "t",
|
||||||
|
quit = "q",
|
||||||
|
shuttle = "[w",
|
||||||
|
toggle_or_req = "u",
|
||||||
|
close = "<C-c>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
implement = {
|
||||||
|
enable = true,
|
||||||
|
sign = true,
|
||||||
|
virtual_text = true,
|
||||||
|
},
|
||||||
|
beacon = {
|
||||||
|
enable = true,
|
||||||
|
frequency = 7,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "gh", "<cmd>Lspsaga finder<cr>", desc = "LSP Finder" },
|
||||||
|
{ "<leader>ca", "<cmd>Lspsaga code_action<cr>", mode = { "n", "v" }, desc = "Code action" },
|
||||||
|
{ "gr", "<cmd>Lspsaga rename<cr>", desc = "Rename" },
|
||||||
|
{ "gR", "<cmd>Lspsaga rename ++project<cr>", desc = "Rename (project)" },
|
||||||
|
{ "gd", "<cmd>Lspsaga peek_definition<cr>", desc = "Peek definition" },
|
||||||
|
{ "gD", "<cmd>Lspsaga goto_definition<cr>", desc = "Goto definition" },
|
||||||
|
{ "gt", "<cmd>Lspsaga peek_type_definition<cr>", desc = "Peek type definition" },
|
||||||
|
{ "gT", "<cmd>Lspsaga goto_type_definition<cr>", desc = "Goto type definition" },
|
||||||
|
{ "<leader>sl", "<cmd>Lspsaga show_line_diagnostics<cr>", desc = "Line diagnostics" },
|
||||||
|
{ "<leader>sc", "<cmd>Lspsaga show_cursor_diagnostics<cr>", desc = "Cursor diagnostics" },
|
||||||
|
{ "<leader>sb", "<cmd>Lspsaga show_buf_diagnostics<cr>", desc = "Buffer diagnostics" },
|
||||||
|
{ "[d", "<cmd>Lspsaga diagnostic_jump_prev<cr>", desc = "Prev diagnostic" },
|
||||||
|
{ "]d", "<cmd>Lspsaga diagnostic_jump_next<cr>", desc = "Next diagnostic" },
|
||||||
|
{ "K", "<cmd>Lspsaga hover_doc<cr>", desc = "Hover doc" },
|
||||||
|
{ "<leader>ci", "<cmd>Lspsaga incoming_calls<cr>", desc = "Incoming calls" },
|
||||||
|
{ "<leader>co", "<cmd>Lspsaga outgoing_calls<cr>", desc = "Outgoing calls" },
|
||||||
|
{ "<leader>so", "<cmd>Lspsaga outline<cr>", desc = "Toggle outline" },
|
||||||
|
},
|
||||||
|
}
|
||||||
19
lua/cargdev/plugins/marks.lua
Normal file
19
lua/cargdev/plugins/marks.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
"chentoast/marks.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
default_mappings = true,
|
||||||
|
builtin_marks = { ".", "<", ">", "^" },
|
||||||
|
cyclic = true,
|
||||||
|
force_write_shada = false,
|
||||||
|
refresh_interval = 250,
|
||||||
|
sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
|
||||||
|
excluded_filetypes = { "NvimTree", "neo-tree", "lazy", "mason", "help" },
|
||||||
|
bookmark_0 = {
|
||||||
|
sign = "⚑",
|
||||||
|
virt_text = "bookmark",
|
||||||
|
annotate = false,
|
||||||
|
},
|
||||||
|
mappings = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
33
lua/cargdev/plugins/mini-animate.lua
Normal file
33
lua/cargdev/plugins/mini-animate.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
return {
|
||||||
|
"echasnovski/mini.animate",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
local animate = require("mini.animate")
|
||||||
|
return {
|
||||||
|
cursor = {
|
||||||
|
enable = true,
|
||||||
|
timing = animate.gen_timing.linear({ duration = 80, unit = "total" }),
|
||||||
|
},
|
||||||
|
scroll = {
|
||||||
|
enable = true,
|
||||||
|
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||||
|
},
|
||||||
|
resize = {
|
||||||
|
enable = true,
|
||||||
|
timing = animate.gen_timing.linear({ duration = 80, unit = "total" }),
|
||||||
|
},
|
||||||
|
open = {
|
||||||
|
enable = true,
|
||||||
|
timing = animate.gen_timing.linear({ duration = 80, unit = "total" }),
|
||||||
|
winconfig = animate.gen_winconfig.wipe({ direction = "from_edge" }),
|
||||||
|
winblend = animate.gen_winblend.linear({ from = 80, to = 100 }),
|
||||||
|
},
|
||||||
|
close = {
|
||||||
|
enable = true,
|
||||||
|
timing = animate.gen_timing.linear({ duration = 80, unit = "total" }),
|
||||||
|
winconfig = animate.gen_winconfig.wipe({ direction = "to_edge" }),
|
||||||
|
winblend = animate.gen_winblend.linear({ from = 100, to = 80 }),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
23
lua/cargdev/plugins/modicator.lua
Normal file
23
lua/cargdev/plugins/modicator.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
return {
|
||||||
|
"mawkler/modicator.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
init = function()
|
||||||
|
vim.o.cursorline = true
|
||||||
|
vim.o.number = true
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
show_warnings = false,
|
||||||
|
highlights = {
|
||||||
|
defaults = {
|
||||||
|
bold = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
integration = {
|
||||||
|
lualine = {
|
||||||
|
enabled = true,
|
||||||
|
mode_section = nil,
|
||||||
|
highlight = "bg",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
67
lua/cargdev/plugins/navbuddy.lua
Normal file
67
lua/cargdev/plugins/navbuddy.lua
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
return {
|
||||||
|
"SmiteshP/nvim-navbuddy",
|
||||||
|
dependencies = {
|
||||||
|
"SmiteshP/nvim-navic",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>nb", "<cmd>Navbuddy<cr>", desc = "Navbuddy" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
window = {
|
||||||
|
border = "rounded",
|
||||||
|
size = "80%",
|
||||||
|
position = "50%",
|
||||||
|
sections = {
|
||||||
|
left = { size = "20%" },
|
||||||
|
mid = { size = "40%" },
|
||||||
|
right = { preview = "leaf" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
node_markers = {
|
||||||
|
enabled = true,
|
||||||
|
icons = {
|
||||||
|
leaf = " ",
|
||||||
|
leaf_selected = " → ",
|
||||||
|
branch = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
icons = {
|
||||||
|
File = " ",
|
||||||
|
Module = " ",
|
||||||
|
Namespace = " ",
|
||||||
|
Package = " ",
|
||||||
|
Class = " ",
|
||||||
|
Method = " ",
|
||||||
|
Property = " ",
|
||||||
|
Field = " ",
|
||||||
|
Constructor = " ",
|
||||||
|
Enum = " ",
|
||||||
|
Interface = " ",
|
||||||
|
Function = " ",
|
||||||
|
Variable = " ",
|
||||||
|
Constant = " ",
|
||||||
|
String = " ",
|
||||||
|
Number = " ",
|
||||||
|
Boolean = " ",
|
||||||
|
Array = " ",
|
||||||
|
Object = " ",
|
||||||
|
Key = " ",
|
||||||
|
Null = " ",
|
||||||
|
EnumMember = " ",
|
||||||
|
Struct = " ",
|
||||||
|
Event = " ",
|
||||||
|
Operator = " ",
|
||||||
|
TypeParameter = " ",
|
||||||
|
},
|
||||||
|
use_default_mappings = true,
|
||||||
|
lsp = {
|
||||||
|
auto_attach = true,
|
||||||
|
},
|
||||||
|
source_buffer = {
|
||||||
|
follow_node = true,
|
||||||
|
highlight = true,
|
||||||
|
reorient = "smart",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
84
lua/cargdev/plugins/neogit.lua
Normal file
84
lua/cargdev/plugins/neogit.lua
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
return {
|
||||||
|
"NeogitOrg/neogit",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
cmd = "Neogit",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gn", "<cmd>Neogit<cr>", desc = "Neogit" },
|
||||||
|
{ "<leader>gnc", "<cmd>Neogit commit<cr>", desc = "Neogit commit" },
|
||||||
|
{ "<leader>gnp", "<cmd>Neogit push<cr>", desc = "Neogit push" },
|
||||||
|
{ "<leader>gnl", "<cmd>Neogit pull<cr>", desc = "Neogit pull" },
|
||||||
|
{ "<leader>gnb", "<cmd>Neogit branch<cr>", desc = "Neogit branch" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
disable_hint = false,
|
||||||
|
disable_context_highlighting = false,
|
||||||
|
disable_signs = false,
|
||||||
|
graph_style = "unicode",
|
||||||
|
git_services = {
|
||||||
|
["github.com"] = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1",
|
||||||
|
["bitbucket.org"] = "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1",
|
||||||
|
["gitlab.com"] = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}",
|
||||||
|
},
|
||||||
|
integrations = {
|
||||||
|
telescope = true,
|
||||||
|
diffview = true,
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
untracked = {
|
||||||
|
folded = false,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
unstaged = {
|
||||||
|
folded = false,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
staged = {
|
||||||
|
folded = false,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
stashes = {
|
||||||
|
folded = true,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
unpulled_upstream = {
|
||||||
|
folded = true,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
unmerged_upstream = {
|
||||||
|
folded = false,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
unpulled_pushRemote = {
|
||||||
|
folded = true,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
unmerged_pushRemote = {
|
||||||
|
folded = false,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
recent = {
|
||||||
|
folded = true,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
rebase = {
|
||||||
|
folded = true,
|
||||||
|
hidden = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
status = {
|
||||||
|
["q"] = "Close",
|
||||||
|
["<esc>"] = "Close",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
signs = {
|
||||||
|
hunk = { "", "" },
|
||||||
|
item = { "", "" },
|
||||||
|
section = { "", "" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
21
lua/cargdev/plugins/nvim-highlight-colors.lua
Normal file
21
lua/cargdev/plugins/nvim-highlight-colors.lua
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
"brenoprata10/nvim-highlight-colors",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
render = "background",
|
||||||
|
virtual_symbol = "■",
|
||||||
|
virtual_symbol_prefix = "",
|
||||||
|
virtual_symbol_suffix = " ",
|
||||||
|
virtual_symbol_position = "inline",
|
||||||
|
enable_hex = true,
|
||||||
|
enable_short_hex = true,
|
||||||
|
enable_rgb = true,
|
||||||
|
enable_hsl = true,
|
||||||
|
enable_var_usage = true,
|
||||||
|
enable_named_colors = true,
|
||||||
|
enable_tailwind = true,
|
||||||
|
custom_colors = {},
|
||||||
|
exclude_filetypes = {},
|
||||||
|
exclude_buftypes = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'mfussenegger/nvim-jdtls',
|
"mfussenegger/nvim-jdtls",
|
||||||
|
ft = "java",
|
||||||
|
dependencies = {
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
54
lua/cargdev/plugins/nvim-lightbulb.lua
Normal file
54
lua/cargdev/plugins/nvim-lightbulb.lua
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
return {
|
||||||
|
"kosayoda/nvim-lightbulb",
|
||||||
|
event = "LspAttach",
|
||||||
|
opts = {
|
||||||
|
priority = 10,
|
||||||
|
hide_in_unfocused_buffer = true,
|
||||||
|
link_highlights = true,
|
||||||
|
validate_config = "auto",
|
||||||
|
action_kinds = nil,
|
||||||
|
sign = {
|
||||||
|
enabled = true,
|
||||||
|
text = "💡",
|
||||||
|
hl = "LightBulbSign",
|
||||||
|
},
|
||||||
|
virtual_text = {
|
||||||
|
enabled = false,
|
||||||
|
text = "💡",
|
||||||
|
pos = "eol",
|
||||||
|
hl = "LightBulbVirtualText",
|
||||||
|
hl_mode = "combine",
|
||||||
|
},
|
||||||
|
float = {
|
||||||
|
enabled = false,
|
||||||
|
text = "💡",
|
||||||
|
hl = "LightBulbFloatWin",
|
||||||
|
win_opts = {
|
||||||
|
focusable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
status_text = {
|
||||||
|
enabled = false,
|
||||||
|
text = "💡",
|
||||||
|
text_unavailable = "",
|
||||||
|
},
|
||||||
|
number = {
|
||||||
|
enabled = false,
|
||||||
|
hl = "LightBulbNumber",
|
||||||
|
},
|
||||||
|
line = {
|
||||||
|
enabled = false,
|
||||||
|
hl = "LightBulbLine",
|
||||||
|
},
|
||||||
|
autocmd = {
|
||||||
|
enabled = true,
|
||||||
|
updatetime = 200,
|
||||||
|
events = { "CursorHold", "CursorHoldI" },
|
||||||
|
pattern = { "*" },
|
||||||
|
},
|
||||||
|
ignore = {
|
||||||
|
clients = {},
|
||||||
|
actions_without_kind = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ return {
|
|||||||
nvimtree.setup({
|
nvimtree.setup({
|
||||||
view = {
|
view = {
|
||||||
width = 35,
|
width = 35,
|
||||||
|
side = "left",
|
||||||
relativenumber = true,
|
relativenumber = true,
|
||||||
},
|
},
|
||||||
-- change folder arrow icons
|
-- change folder arrow icons
|
||||||
|
|||||||
16
lua/cargdev/plugins/nvim-ts-autotag.lua
Normal file
16
lua/cargdev/plugins/nvim-ts-autotag.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
opts = {
|
||||||
|
enable_close = true,
|
||||||
|
enable_rename = true,
|
||||||
|
enable_close_on_slash = true,
|
||||||
|
},
|
||||||
|
per_filetype = {
|
||||||
|
["html"] = {
|
||||||
|
enable_close = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
69
lua/cargdev/plugins/octo.lua
Normal file
69
lua/cargdev/plugins/octo.lua
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
return {
|
||||||
|
"pwntester/octo.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
cmd = "Octo",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>oi", "<cmd>Octo issue list<cr>", desc = "List issues" },
|
||||||
|
{ "<leader>oI", "<cmd>Octo issue create<cr>", desc = "Create issue" },
|
||||||
|
{ "<leader>op", "<cmd>Octo pr list<cr>", desc = "List PRs" },
|
||||||
|
{ "<leader>oP", "<cmd>Octo pr create<cr>", desc = "Create PR" },
|
||||||
|
{ "<leader>or", "<cmd>Octo repo list<cr>", desc = "List repos" },
|
||||||
|
{ "<leader>os", "<cmd>Octo search<cr>", desc = "Search issues/PRs" },
|
||||||
|
{ "<leader>oa", "<cmd>Octo actions<cr>", desc = "Octo actions" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
use_local_fs = false,
|
||||||
|
enable_builtin = true,
|
||||||
|
default_remote = { "upstream", "origin" },
|
||||||
|
ssh_aliases = {},
|
||||||
|
picker = "telescope",
|
||||||
|
picker_config = {
|
||||||
|
use_emojis = true,
|
||||||
|
mappings = {
|
||||||
|
open_in_browser = { lhs = "<C-b>", desc = "open in browser" },
|
||||||
|
copy_url = { lhs = "<C-y>", desc = "copy url to clipboard" },
|
||||||
|
checkout_pr = { lhs = "<C-o>", desc = "checkout PR" },
|
||||||
|
merge_pr = { lhs = "<C-r>", desc = "merge PR" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
comment_icon = "",
|
||||||
|
outdated_icon = " ",
|
||||||
|
resolved_icon = " ",
|
||||||
|
reaction_viewer_hint_icon = " ",
|
||||||
|
user_icon = " ",
|
||||||
|
timeline_marker = " ",
|
||||||
|
timeline_indent = "2",
|
||||||
|
right_bubble_delimiter = "",
|
||||||
|
left_bubble_delimiter = "",
|
||||||
|
github_hostname = "",
|
||||||
|
snippet_context_lines = 4,
|
||||||
|
gh_env = {},
|
||||||
|
timeout = 5000,
|
||||||
|
default_to_projects_v2 = false,
|
||||||
|
ui = {
|
||||||
|
use_signcolumn = true,
|
||||||
|
},
|
||||||
|
issues = {
|
||||||
|
order_by = {
|
||||||
|
field = "CREATED_AT",
|
||||||
|
direction = "DESC",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pull_requests = {
|
||||||
|
order_by = {
|
||||||
|
field = "CREATED_AT",
|
||||||
|
direction = "DESC",
|
||||||
|
},
|
||||||
|
always_select_remote_on_create = false,
|
||||||
|
},
|
||||||
|
file_panel = {
|
||||||
|
size = 10,
|
||||||
|
use_icons = true,
|
||||||
|
},
|
||||||
|
mappings = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
129
lua/cargdev/plugins/outline.lua
Normal file
129
lua/cargdev/plugins/outline.lua
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
return {
|
||||||
|
"hedyhli/outline.nvim",
|
||||||
|
cmd = { "Outline", "OutlineOpen" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>cs", "<cmd>Outline<cr>", desc = "Toggle symbol Outline" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
outline_window = {
|
||||||
|
position = "right",
|
||||||
|
split_command = nil,
|
||||||
|
width = 25,
|
||||||
|
relative_width = true,
|
||||||
|
auto_close = false,
|
||||||
|
auto_jump = false,
|
||||||
|
jump_highlight_duration = 300,
|
||||||
|
center_on_jump = true,
|
||||||
|
show_numbers = false,
|
||||||
|
show_relative_numbers = false,
|
||||||
|
wrap = false,
|
||||||
|
show_cursorline = true,
|
||||||
|
hide_cursor = false,
|
||||||
|
focus_on_open = true,
|
||||||
|
winhl = "",
|
||||||
|
},
|
||||||
|
outline_items = {
|
||||||
|
show_symbol_details = true,
|
||||||
|
show_symbol_lineno = false,
|
||||||
|
highlight_hovered_item = true,
|
||||||
|
auto_set_cursor = true,
|
||||||
|
auto_update_events = {
|
||||||
|
follow = { "CursorMoved" },
|
||||||
|
items = { "InsertLeave", "WinEnter", "BufEnter", "BufWinEnter", "TabEnter", "BufWritePost" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
guides = {
|
||||||
|
enabled = true,
|
||||||
|
markers = {
|
||||||
|
bottom = "└",
|
||||||
|
middle = "├",
|
||||||
|
vertical = "│",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
symbol_folding = {
|
||||||
|
autofold_depth = 1,
|
||||||
|
auto_unfold = {
|
||||||
|
hovered = true,
|
||||||
|
only = true,
|
||||||
|
},
|
||||||
|
markers = { "", "" },
|
||||||
|
},
|
||||||
|
preview_window = {
|
||||||
|
auto_preview = false,
|
||||||
|
open_hover_on_preview = false,
|
||||||
|
width = 50,
|
||||||
|
min_width = 50,
|
||||||
|
relative_width = true,
|
||||||
|
border = "rounded",
|
||||||
|
winhl = "NormalFloat:",
|
||||||
|
winblend = 0,
|
||||||
|
live = false,
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
show_help = "?",
|
||||||
|
close = { "<Esc>", "q" },
|
||||||
|
goto_location = "<Cr>",
|
||||||
|
peek_location = "o",
|
||||||
|
goto_and_close = "<S-Cr>",
|
||||||
|
restore_location = "<C-g>",
|
||||||
|
hover_symbol = "<C-space>",
|
||||||
|
toggle_preview = "K",
|
||||||
|
rename_symbol = "r",
|
||||||
|
code_actions = "a",
|
||||||
|
fold = "h",
|
||||||
|
unfold = "l",
|
||||||
|
fold_toggle = "<Tab>",
|
||||||
|
fold_toggle_all = "<S-Tab>",
|
||||||
|
fold_all = "W",
|
||||||
|
unfold_all = "E",
|
||||||
|
fold_reset = "R",
|
||||||
|
down_and_jump = "<C-j>",
|
||||||
|
up_and_jump = "<C-k>",
|
||||||
|
},
|
||||||
|
providers = {
|
||||||
|
priority = { "lsp", "coc", "markdown", "norg" },
|
||||||
|
lsp = {
|
||||||
|
blacklist_clients = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
symbols = {
|
||||||
|
filter = nil,
|
||||||
|
icon_fetcher = nil,
|
||||||
|
icon_source = nil,
|
||||||
|
icons = {
|
||||||
|
File = { icon = "", hl = "Identifier" },
|
||||||
|
Module = { icon = "", hl = "Include" },
|
||||||
|
Namespace = { icon = "", hl = "Include" },
|
||||||
|
Package = { icon = "", hl = "Include" },
|
||||||
|
Class = { icon = "", hl = "Type" },
|
||||||
|
Method = { icon = "ƒ", hl = "Function" },
|
||||||
|
Property = { icon = "", hl = "Identifier" },
|
||||||
|
Field = { icon = "", hl = "Identifier" },
|
||||||
|
Constructor = { icon = "", hl = "Special" },
|
||||||
|
Enum = { icon = "", hl = "Type" },
|
||||||
|
Interface = { icon = "", hl = "Type" },
|
||||||
|
Function = { icon = "", hl = "Function" },
|
||||||
|
Variable = { icon = "", hl = "Constant" },
|
||||||
|
Constant = { icon = "", hl = "Constant" },
|
||||||
|
String = { icon = "", hl = "String" },
|
||||||
|
Number = { icon = "#", hl = "Number" },
|
||||||
|
Boolean = { icon = "⊨", hl = "Boolean" },
|
||||||
|
Array = { icon = "", hl = "Constant" },
|
||||||
|
Object = { icon = "", hl = "Type" },
|
||||||
|
Key = { icon = "", hl = "Type" },
|
||||||
|
Null = { icon = "NULL", hl = "Type" },
|
||||||
|
EnumMember = { icon = "", hl = "Identifier" },
|
||||||
|
Struct = { icon = "", hl = "Structure" },
|
||||||
|
Event = { icon = "", hl = "Type" },
|
||||||
|
Operator = { icon = "+", hl = "Identifier" },
|
||||||
|
TypeParameter = { icon = "", hl = "Identifier" },
|
||||||
|
Component = { icon = "", hl = "Function" },
|
||||||
|
Fragment = { icon = "", hl = "Constant" },
|
||||||
|
TypeAlias = { icon = " ", hl = "Type" },
|
||||||
|
Parameter = { icon = " ", hl = "Identifier" },
|
||||||
|
StaticMethod = { icon = " ", hl = "Function" },
|
||||||
|
Macro = { icon = " ", hl = "Function" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
227
lua/cargdev/plugins/overseer.lua
Normal file
227
lua/cargdev/plugins/overseer.lua
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
return {
|
||||||
|
"stevearc/overseer.nvim",
|
||||||
|
cmd = {
|
||||||
|
"OverseerRun",
|
||||||
|
"OverseerToggle",
|
||||||
|
"OverseerOpen",
|
||||||
|
"OverseerClose",
|
||||||
|
"OverseerBuild",
|
||||||
|
"OverseerTaskAction",
|
||||||
|
"OverseerQuickAction",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>or", "<cmd>OverseerRun<cr>", desc = "Run task" },
|
||||||
|
{ "<leader>ot", "<cmd>OverseerToggle<cr>", desc = "Toggle task list" },
|
||||||
|
{ "<leader>oa", "<cmd>OverseerTaskAction<cr>", desc = "Task action" },
|
||||||
|
{ "<leader>oq", "<cmd>OverseerQuickAction<cr>", desc = "Quick action" },
|
||||||
|
{ "<leader>ob", "<cmd>OverseerBuild<cr>", desc = "Build" },
|
||||||
|
{ "<leader>oc", "<cmd>OverseerRunCmd<cr>", desc = "Run shell command" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
strategy = "terminal",
|
||||||
|
templates = { "builtin" },
|
||||||
|
auto_detect_success_color = true,
|
||||||
|
dap = true,
|
||||||
|
task_list = {
|
||||||
|
default_detail = 1,
|
||||||
|
max_width = { 100, 0.2 },
|
||||||
|
min_width = { 40, 0.1 },
|
||||||
|
width = nil,
|
||||||
|
max_height = { 20, 0.1 },
|
||||||
|
min_height = 8,
|
||||||
|
height = nil,
|
||||||
|
separator = "────────────────────────────────────────",
|
||||||
|
direction = "bottom",
|
||||||
|
bindings = {
|
||||||
|
["?"] = "ShowHelp",
|
||||||
|
["g?"] = "ShowHelp",
|
||||||
|
["<CR>"] = "RunAction",
|
||||||
|
["<C-e>"] = "Edit",
|
||||||
|
["o"] = "Open",
|
||||||
|
["<C-v>"] = "OpenVsplit",
|
||||||
|
["<C-s>"] = "OpenSplit",
|
||||||
|
["<C-f>"] = "OpenFloat",
|
||||||
|
["<C-q>"] = "OpenQuickFix",
|
||||||
|
["p"] = "TogglePreview",
|
||||||
|
["<C-l>"] = "IncreaseDetail",
|
||||||
|
["<C-h>"] = "DecreaseDetail",
|
||||||
|
["L"] = "IncreaseAllDetail",
|
||||||
|
["H"] = "DecreaseAllDetail",
|
||||||
|
["["] = "DecreaseWidth",
|
||||||
|
["]"] = "IncreaseWidth",
|
||||||
|
["{"] = "PrevTask",
|
||||||
|
["}"] = "NextTask",
|
||||||
|
["<C-k>"] = "ScrollOutputUp",
|
||||||
|
["<C-j>"] = "ScrollOutputDown",
|
||||||
|
["q"] = "Close",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
form = {
|
||||||
|
border = "rounded",
|
||||||
|
zindex = 40,
|
||||||
|
min_width = 80,
|
||||||
|
max_width = 0.9,
|
||||||
|
width = nil,
|
||||||
|
min_height = 10,
|
||||||
|
max_height = 0.9,
|
||||||
|
height = nil,
|
||||||
|
win_opts = {
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
task_launcher = {
|
||||||
|
bindings = {
|
||||||
|
i = {
|
||||||
|
["<C-s>"] = "Submit",
|
||||||
|
["<C-c>"] = "Cancel",
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<CR>"] = "Submit",
|
||||||
|
["<C-s>"] = "Submit",
|
||||||
|
["q"] = "Cancel",
|
||||||
|
["?"] = "ShowHelp",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
task_editor = {
|
||||||
|
bindings = {
|
||||||
|
i = {
|
||||||
|
["<CR>"] = "NextOrSubmit",
|
||||||
|
["<C-s>"] = "Submit",
|
||||||
|
["<Tab>"] = "Next",
|
||||||
|
["<S-Tab>"] = "Prev",
|
||||||
|
["<C-c>"] = "Cancel",
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<CR>"] = "NextOrSubmit",
|
||||||
|
["<C-s>"] = "Submit",
|
||||||
|
["<Tab>"] = "Next",
|
||||||
|
["<S-Tab>"] = "Prev",
|
||||||
|
["q"] = "Cancel",
|
||||||
|
["?"] = "ShowHelp",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
component_aliases = {
|
||||||
|
default = {
|
||||||
|
{ "display_duration", detail_level = 2 },
|
||||||
|
"on_output_summarize",
|
||||||
|
"on_exit_set_status",
|
||||||
|
"on_complete_notify",
|
||||||
|
"on_complete_dispose",
|
||||||
|
},
|
||||||
|
default_neotest = {
|
||||||
|
"unique",
|
||||||
|
{ "on_complete_notify", system = "unfocused" },
|
||||||
|
"default",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bundles = {
|
||||||
|
save_task_opts = {
|
||||||
|
bundleable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
preload_components = {},
|
||||||
|
default_template_prompt = "allow",
|
||||||
|
log = {
|
||||||
|
{
|
||||||
|
type = "echo",
|
||||||
|
level = vim.log.levels.WARN,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "file",
|
||||||
|
filename = "overseer.log",
|
||||||
|
level = vim.log.levels.WARN,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local overseer = require("overseer")
|
||||||
|
overseer.setup(opts)
|
||||||
|
|
||||||
|
-- Custom templates for common tasks
|
||||||
|
overseer.register_template({
|
||||||
|
name = "npm run dev",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "npm" },
|
||||||
|
args = { "run", "dev" },
|
||||||
|
name = "npm dev",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "javascript", "typescript", "typescriptreact", "javascriptreact" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
overseer.register_template({
|
||||||
|
name = "npm run build",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "npm" },
|
||||||
|
args = { "run", "build" },
|
||||||
|
name = "npm build",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "javascript", "typescript", "typescriptreact", "javascriptreact" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
overseer.register_template({
|
||||||
|
name = "npm test",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "npm" },
|
||||||
|
args = { "test" },
|
||||||
|
name = "npm test",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "javascript", "typescript", "typescriptreact", "javascriptreact" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
overseer.register_template({
|
||||||
|
name = "Python run file",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "python3" },
|
||||||
|
args = { vim.fn.expand("%:p") },
|
||||||
|
name = "python " .. vim.fn.expand("%:t"),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "python" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
overseer.register_template({
|
||||||
|
name = "Flutter run",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "flutter" },
|
||||||
|
args = { "run" },
|
||||||
|
name = "flutter run",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "dart" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
overseer.register_template({
|
||||||
|
name = "Go run",
|
||||||
|
builder = function()
|
||||||
|
return {
|
||||||
|
cmd = { "go" },
|
||||||
|
args = { "run", "." },
|
||||||
|
name = "go run",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { "go" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
30
lua/cargdev/plugins/package-info.lua
Normal file
30
lua/cargdev/plugins/package-info.lua
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
return {
|
||||||
|
"vuki656/package-info.nvim",
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim" },
|
||||||
|
ft = "json",
|
||||||
|
opts = {
|
||||||
|
colors = {
|
||||||
|
up_to_date = "#3C4048",
|
||||||
|
outdated = "#d19a66",
|
||||||
|
},
|
||||||
|
icons = {
|
||||||
|
enable = true,
|
||||||
|
style = {
|
||||||
|
up_to_date = "| ",
|
||||||
|
outdated = "| ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
autostart = true,
|
||||||
|
hide_up_to_date = false,
|
||||||
|
hide_unstable_versions = false,
|
||||||
|
package_manager = "npm",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ns", "<cmd>lua require('package-info').show()<cr>", desc = "Show package info" },
|
||||||
|
{ "<leader>nh", "<cmd>lua require('package-info').hide()<cr>", desc = "Hide package info" },
|
||||||
|
{ "<leader>nu", "<cmd>lua require('package-info').update()<cr>", desc = "Update package" },
|
||||||
|
{ "<leader>nd", "<cmd>lua require('package-info').delete()<cr>", desc = "Delete package" },
|
||||||
|
{ "<leader>ni", "<cmd>lua require('package-info').install()<cr>", desc = "Install package" },
|
||||||
|
{ "<leader>nc", "<cmd>lua require('package-info').change_version()<cr>", desc = "Change version" },
|
||||||
|
},
|
||||||
|
}
|
||||||
15
lua/cargdev/plugins/persistence.lua
Normal file
15
lua/cargdev/plugins/persistence.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
"folke/persistence.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
opts = {
|
||||||
|
dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"),
|
||||||
|
options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" },
|
||||||
|
pre_save = nil,
|
||||||
|
save_empty = false,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore session" },
|
||||||
|
{ "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore last session" },
|
||||||
|
{ "<leader>qd", function() require("persistence").stop() end, desc = "Don't save session" },
|
||||||
|
},
|
||||||
|
}
|
||||||
25
lua/cargdev/plugins/portal.lua
Normal file
25
lua/cargdev/plugins/portal.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
"cbochs/portal.nvim",
|
||||||
|
dependencies = { "cbochs/grapple.nvim" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>pj", "<cmd>Portal jumplist backward<cr>", desc = "Portal jumplist backward" },
|
||||||
|
{ "<leader>pk", "<cmd>Portal jumplist forward<cr>", desc = "Portal jumplist forward" },
|
||||||
|
{ "<leader>pc", "<cmd>Portal changelist backward<cr>", desc = "Portal changelist backward" },
|
||||||
|
{ "<leader>pq", "<cmd>Portal quickfix backward<cr>", desc = "Portal quickfix backward" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
escape = {
|
||||||
|
["<esc>"] = true,
|
||||||
|
["q"] = true,
|
||||||
|
},
|
||||||
|
window_options = {
|
||||||
|
relative = "cursor",
|
||||||
|
width = 80,
|
||||||
|
height = 4,
|
||||||
|
col = 2,
|
||||||
|
focusable = false,
|
||||||
|
border = "rounded",
|
||||||
|
noautocmd = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
31
lua/cargdev/plugins/precognition.lua
Normal file
31
lua/cargdev/plugins/precognition.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
"tris203/precognition.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
startVisible = false,
|
||||||
|
showBlankVirtLine = true,
|
||||||
|
highlightColor = { link = "Comment" },
|
||||||
|
hints = {
|
||||||
|
Caret = { text = "^", prio = 2 },
|
||||||
|
Dollar = { text = "$", prio = 1 },
|
||||||
|
MatchingPair = { text = "%", prio = 5 },
|
||||||
|
Zero = { text = "0", prio = 1 },
|
||||||
|
w = { text = "w", prio = 10 },
|
||||||
|
b = { text = "b", prio = 9 },
|
||||||
|
e = { text = "e", prio = 8 },
|
||||||
|
W = { text = "W", prio = 7 },
|
||||||
|
B = { text = "B", prio = 6 },
|
||||||
|
E = { text = "E", prio = 5 },
|
||||||
|
},
|
||||||
|
gutterHints = {
|
||||||
|
G = { text = "G", prio = 10 },
|
||||||
|
gg = { text = "gg", prio = 9 },
|
||||||
|
PrevParagraph = { text = "{", prio = 8 },
|
||||||
|
NextParagraph = { text = "}", prio = 8 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>vp", "<cmd>lua require('precognition').toggle()<cr>", desc = "Toggle Precognition" },
|
||||||
|
{ "<leader>vP", "<cmd>lua require('precognition').peek()<cr>", desc = "Peek Precognition" },
|
||||||
|
},
|
||||||
|
}
|
||||||
88
lua/cargdev/plugins/reactive.lua
Normal file
88
lua/cargdev/plugins/reactive.lua
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
return {
|
||||||
|
"rasulomaroff/reactive.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
builtin = {
|
||||||
|
cursorline = true,
|
||||||
|
cursor = true,
|
||||||
|
modemsg = true,
|
||||||
|
},
|
||||||
|
load = { "catppuccin-mocha-cursor", "catppuccin-mocha-cursorline" },
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("reactive").setup(opts)
|
||||||
|
|
||||||
|
-- Custom mode colors
|
||||||
|
require("reactive").add_preset({
|
||||||
|
name = "custom",
|
||||||
|
init = function()
|
||||||
|
vim.opt.guicursor:append("a:ReactiveCursor")
|
||||||
|
end,
|
||||||
|
modes = {
|
||||||
|
n = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#2a2b3c" },
|
||||||
|
CursorLineNr = { fg = "#89b4fa", bg = "#2a2b3c" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#f5e0dc" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
i = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#1e3a2f" },
|
||||||
|
CursorLineNr = { fg = "#a6e3a1", bg = "#1e3a2f" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#a6e3a1" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
v = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#2d3654" },
|
||||||
|
CursorLineNr = { fg = "#89b4fa", bg = "#2d3654" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#89b4fa" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
V = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#2d3654" },
|
||||||
|
CursorLineNr = { fg = "#89b4fa", bg = "#2d3654" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#89b4fa" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["\x16"] = { -- Visual Block mode
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#2d3654" },
|
||||||
|
CursorLineNr = { fg = "#89b4fa", bg = "#2d3654" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#89b4fa" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
R = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#3d2a2d" },
|
||||||
|
CursorLineNr = { fg = "#f38ba8", bg = "#3d2a2d" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#f38ba8" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
c = {
|
||||||
|
winhl = {
|
||||||
|
CursorLine = { bg = "#3d3a2d" },
|
||||||
|
CursorLineNr = { fg = "#f9e2af", bg = "#3d3a2d" },
|
||||||
|
},
|
||||||
|
hl = {
|
||||||
|
ReactiveCursor = { bg = "#f9e2af" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
39
lua/cargdev/plugins/regexplainer.lua
Normal file
39
lua/cargdev/plugins/regexplainer.lua
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
return {
|
||||||
|
"bennypowers/nvim-regexplainer",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
cmd = { "RegexplainerShow", "RegexplainerToggle" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>rx", "<cmd>RegexplainerToggle<cr>", desc = "Toggle Regexplainer" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
mode = "narrative",
|
||||||
|
auto = false,
|
||||||
|
filetypes = {
|
||||||
|
"html",
|
||||||
|
"js",
|
||||||
|
"cjs",
|
||||||
|
"mjs",
|
||||||
|
"ts",
|
||||||
|
"jsx",
|
||||||
|
"tsx",
|
||||||
|
"cjsx",
|
||||||
|
"mjsx",
|
||||||
|
"lua",
|
||||||
|
"python",
|
||||||
|
"java",
|
||||||
|
"go",
|
||||||
|
"rust",
|
||||||
|
},
|
||||||
|
debug = false,
|
||||||
|
display = "popup",
|
||||||
|
mappings = {
|
||||||
|
toggle = "<leader>rx",
|
||||||
|
},
|
||||||
|
narrative = {
|
||||||
|
separator = "\n",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
154
lua/cargdev/plugins/render-markdown.lua
Normal file
154
lua/cargdev/plugins/render-markdown.lua
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
return {
|
||||||
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
ft = { "markdown", "norg", "rmd", "org" },
|
||||||
|
opts = {
|
||||||
|
enabled = true,
|
||||||
|
max_file_size = 10.0, -- MB
|
||||||
|
render_modes = { "n", "c" },
|
||||||
|
anti_conceal = {
|
||||||
|
enabled = true,
|
||||||
|
ignore = {
|
||||||
|
code_background = true,
|
||||||
|
sign = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
heading = {
|
||||||
|
enabled = true,
|
||||||
|
sign = true,
|
||||||
|
position = "overlay",
|
||||||
|
icons = { " ", " ", " ", " ", " ", " " },
|
||||||
|
signs = { " " },
|
||||||
|
width = "full",
|
||||||
|
left_pad = 0,
|
||||||
|
right_pad = 0,
|
||||||
|
min_width = 0,
|
||||||
|
border = false,
|
||||||
|
border_prefix = false,
|
||||||
|
above = "▄",
|
||||||
|
below = "▀",
|
||||||
|
backgrounds = {
|
||||||
|
"RenderMarkdownH1Bg",
|
||||||
|
"RenderMarkdownH2Bg",
|
||||||
|
"RenderMarkdownH3Bg",
|
||||||
|
"RenderMarkdownH4Bg",
|
||||||
|
"RenderMarkdownH5Bg",
|
||||||
|
"RenderMarkdownH6Bg",
|
||||||
|
},
|
||||||
|
foregrounds = {
|
||||||
|
"RenderMarkdownH1",
|
||||||
|
"RenderMarkdownH2",
|
||||||
|
"RenderMarkdownH3",
|
||||||
|
"RenderMarkdownH4",
|
||||||
|
"RenderMarkdownH5",
|
||||||
|
"RenderMarkdownH6",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
code = {
|
||||||
|
enabled = true,
|
||||||
|
sign = true,
|
||||||
|
style = "full",
|
||||||
|
position = "left",
|
||||||
|
language_pad = 0,
|
||||||
|
disable_background = { "diff" },
|
||||||
|
width = "full",
|
||||||
|
left_pad = 0,
|
||||||
|
right_pad = 0,
|
||||||
|
min_width = 0,
|
||||||
|
border = "thin",
|
||||||
|
above = "▄",
|
||||||
|
below = "▀",
|
||||||
|
highlight = "RenderMarkdownCode",
|
||||||
|
highlight_inline = "RenderMarkdownCodeInline",
|
||||||
|
},
|
||||||
|
dash = {
|
||||||
|
enabled = true,
|
||||||
|
icon = "─",
|
||||||
|
width = "full",
|
||||||
|
highlight = "RenderMarkdownDash",
|
||||||
|
},
|
||||||
|
bullet = {
|
||||||
|
enabled = true,
|
||||||
|
icons = { "●", "○", "◆", "◇" },
|
||||||
|
left_pad = 0,
|
||||||
|
right_pad = 0,
|
||||||
|
highlight = "RenderMarkdownBullet",
|
||||||
|
},
|
||||||
|
checkbox = {
|
||||||
|
enabled = true,
|
||||||
|
position = "inline",
|
||||||
|
unchecked = {
|
||||||
|
icon = " ",
|
||||||
|
highlight = "RenderMarkdownUnchecked",
|
||||||
|
},
|
||||||
|
checked = {
|
||||||
|
icon = " ",
|
||||||
|
highlight = "RenderMarkdownChecked",
|
||||||
|
},
|
||||||
|
custom = {
|
||||||
|
todo = { raw = "[-]", rendered = " ", highlight = "RenderMarkdownTodo" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
quote = {
|
||||||
|
enabled = true,
|
||||||
|
icon = "▋",
|
||||||
|
repeat_linebreak = false,
|
||||||
|
highlight = "RenderMarkdownQuote",
|
||||||
|
},
|
||||||
|
pipe_table = {
|
||||||
|
enabled = true,
|
||||||
|
preset = "heavy",
|
||||||
|
style = "full",
|
||||||
|
cell = "padded",
|
||||||
|
min_width = 0,
|
||||||
|
border = {
|
||||||
|
"┏", "┳", "┓",
|
||||||
|
"┣", "╋", "┫",
|
||||||
|
"┗", "┻", "┛",
|
||||||
|
"┃", "━",
|
||||||
|
},
|
||||||
|
alignment_indicator = "━",
|
||||||
|
head = "RenderMarkdownTableHead",
|
||||||
|
row = "RenderMarkdownTableRow",
|
||||||
|
filler = "RenderMarkdownTableFill",
|
||||||
|
},
|
||||||
|
callout = {
|
||||||
|
note = { raw = "[!NOTE]", rendered = " Note", highlight = "RenderMarkdownInfo" },
|
||||||
|
tip = { raw = "[!TIP]", rendered = " Tip", highlight = "RenderMarkdownSuccess" },
|
||||||
|
important = { raw = "[!IMPORTANT]", rendered = " Important", highlight = "RenderMarkdownHint" },
|
||||||
|
warning = { raw = "[!WARNING]", rendered = " Warning", highlight = "RenderMarkdownWarn" },
|
||||||
|
caution = { raw = "[!CAUTION]", rendered = " Caution", highlight = "RenderMarkdownError" },
|
||||||
|
},
|
||||||
|
link = {
|
||||||
|
enabled = true,
|
||||||
|
image = " ",
|
||||||
|
email = " ",
|
||||||
|
hyperlink = " ",
|
||||||
|
highlight = "RenderMarkdownLink",
|
||||||
|
custom = {
|
||||||
|
web = { pattern = "^http[s]?://", icon = " ", highlight = "RenderMarkdownLink" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sign = {
|
||||||
|
enabled = true,
|
||||||
|
highlight = "RenderMarkdownSign",
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
enabled = false,
|
||||||
|
per_level = 2,
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
conceallevel = {
|
||||||
|
default = vim.api.nvim_get_option_value("conceallevel", {}),
|
||||||
|
rendered = 3,
|
||||||
|
},
|
||||||
|
concealcursor = {
|
||||||
|
default = vim.api.nvim_get_option_value("concealcursor", {}),
|
||||||
|
rendered = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
57
lua/cargdev/plugins/satellite.lua
Normal file
57
lua/cargdev/plugins/satellite.lua
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
return {
|
||||||
|
"lewis6991/satellite.nvim",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
current_only = false,
|
||||||
|
winblend = 50,
|
||||||
|
zindex = 40,
|
||||||
|
excluded_filetypes = {
|
||||||
|
"NvimTree",
|
||||||
|
"neo-tree",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"help",
|
||||||
|
"terminal",
|
||||||
|
"toggleterm",
|
||||||
|
"TelescopePrompt",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"Outline",
|
||||||
|
"lspsaga",
|
||||||
|
"spectre_panel",
|
||||||
|
},
|
||||||
|
width = 2,
|
||||||
|
handlers = {
|
||||||
|
cursor = {
|
||||||
|
enable = true,
|
||||||
|
symbols = { "⎺", "⎻", "⎼", "⎽" },
|
||||||
|
},
|
||||||
|
search = {
|
||||||
|
enable = true,
|
||||||
|
symbols = { "━" },
|
||||||
|
},
|
||||||
|
diagnostic = {
|
||||||
|
enable = true,
|
||||||
|
signs = { "-", "=", "≡" },
|
||||||
|
min_severity = vim.diagnostic.severity.HINT,
|
||||||
|
},
|
||||||
|
gitsigns = {
|
||||||
|
enable = true,
|
||||||
|
signs = {
|
||||||
|
add = "│",
|
||||||
|
change = "│",
|
||||||
|
delete = "─",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
marks = {
|
||||||
|
enable = true,
|
||||||
|
show_builtins = false,
|
||||||
|
key = "m",
|
||||||
|
},
|
||||||
|
quickfix = {
|
||||||
|
enable = true,
|
||||||
|
signs = { "-", "=", "≡" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
66
lua/cargdev/plugins/screenkey.lua
Normal file
66
lua/cargdev/plugins/screenkey.lua
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
return {
|
||||||
|
"NStefan002/screenkey.nvim",
|
||||||
|
lazy = false,
|
||||||
|
version = "*",
|
||||||
|
opts = {
|
||||||
|
win_opts = {
|
||||||
|
row = vim.o.lines - vim.o.cmdheight - 1,
|
||||||
|
col = vim.o.columns - 1,
|
||||||
|
relative = "editor",
|
||||||
|
anchor = "SE",
|
||||||
|
width = 40,
|
||||||
|
height = 3,
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
|
compress_after = 3,
|
||||||
|
clear_after = 3,
|
||||||
|
disable = {
|
||||||
|
filetypes = { "toggleterm" },
|
||||||
|
buftypes = { "terminal" },
|
||||||
|
events = false,
|
||||||
|
},
|
||||||
|
show_leader = true,
|
||||||
|
group_mappings = false,
|
||||||
|
display_infront = {},
|
||||||
|
display_behind = {},
|
||||||
|
filter = function(keys)
|
||||||
|
return keys
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
["<TAB>"] = "",
|
||||||
|
["<CR>"] = "",
|
||||||
|
["<ESC>"] = "Esc",
|
||||||
|
["<SPACE>"] = "␣",
|
||||||
|
["<BS>"] = "",
|
||||||
|
["<DEL>"] = "Del",
|
||||||
|
["<LEFT>"] = "",
|
||||||
|
["<RIGHT>"] = "",
|
||||||
|
["<UP>"] = "",
|
||||||
|
["<DOWN>"] = "",
|
||||||
|
["<HOME>"] = "Home",
|
||||||
|
["<END>"] = "End",
|
||||||
|
["<PAGEUP>"] = "PgUp",
|
||||||
|
["<PAGEDOWN>"] = "PgDn",
|
||||||
|
["<INSERT>"] = "Ins",
|
||||||
|
["<F1>"] = "",
|
||||||
|
["<F2>"] = "",
|
||||||
|
["<F3>"] = "",
|
||||||
|
["<F4>"] = "",
|
||||||
|
["<F5>"] = "",
|
||||||
|
["<F6>"] = "",
|
||||||
|
["<F7>"] = "",
|
||||||
|
["<F8>"] = "",
|
||||||
|
["<F9>"] = "",
|
||||||
|
["<F10>"] = "",
|
||||||
|
["<F11>"] = "",
|
||||||
|
["<F12>"] = "",
|
||||||
|
["CTRL"] = "Ctrl",
|
||||||
|
["ALT"] = "Alt",
|
||||||
|
["SUPER"] = "",
|
||||||
|
["<leader>"] = "<leader>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>sk", "<cmd>Screenkey<cr>", desc = "Toggle Screenkey" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -8,19 +8,26 @@ return {
|
|||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
dashboard = {
|
dashboard = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
width = 60,
|
width = 40,
|
||||||
row = nil,
|
row = nil,
|
||||||
col = nil,
|
col = nil,
|
||||||
pane_gap = 4,
|
pane_gap = 2,
|
||||||
autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||||
preset = {
|
preset = {
|
||||||
keys = dashboard_config.get_snacks_keys(),
|
keys = dashboard_config.get_snacks_keys(),
|
||||||
header = dashboard_config.get_header_string(),
|
header = dashboard_config.get_header_string(),
|
||||||
},
|
},
|
||||||
|
formats = {
|
||||||
|
key = function(item)
|
||||||
|
return { { item.key, hl = "SnacksDashboardKey" } }
|
||||||
|
end,
|
||||||
|
},
|
||||||
sections = {
|
sections = {
|
||||||
|
{ padding = 4 },
|
||||||
{ section = "header" },
|
{ section = "header" },
|
||||||
|
{ padding = 2 },
|
||||||
|
{ section = "keys", gap = 1, padding = 0 },
|
||||||
{ padding = 1 },
|
{ padding = 1 },
|
||||||
{ section = "keys", gap = 1, padding = 1 },
|
|
||||||
{ section = "startup" },
|
{ section = "startup" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -31,11 +38,17 @@ return {
|
|||||||
},
|
},
|
||||||
input = { enabled = true },
|
input = { enabled = true },
|
||||||
lazygit = { enabled = true },
|
lazygit = { enabled = true },
|
||||||
notifier = { enabled = true },
|
notifier = {
|
||||||
|
enabled = true,
|
||||||
|
timeout = 3000,
|
||||||
|
style = "minimal",
|
||||||
|
top_down = false,
|
||||||
|
margin = { top = 0, right = 1, bottom = 1 },
|
||||||
|
},
|
||||||
picker = { enabled = true },
|
picker = { enabled = true },
|
||||||
quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
scope = { enabled = true },
|
scope = { enabled = true },
|
||||||
scroll = { enabled = true },
|
scroll = { enabled = false },
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
terminal = { enabled = true },
|
terminal = { enabled = true },
|
||||||
toggle = { enabled = true },
|
toggle = { enabled = true },
|
||||||
@@ -46,11 +59,9 @@ return {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Set up vim.ui.input and vim.ui.select for snacks
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.ui.input = require("snacks.input").input
|
vim.ui.input = require("snacks.input").input
|
||||||
vim.ui.select = require("snacks.picker").select
|
vim.ui.select = require("snacks.picker").select
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
28
lua/cargdev/plugins/ssr.lua
Normal file
28
lua/cargdev/plugins/ssr.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
"cshuaimin/ssr.nvim",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>sR",
|
||||||
|
function()
|
||||||
|
require("ssr").open()
|
||||||
|
end,
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Structural search/replace",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
border = "rounded",
|
||||||
|
min_width = 50,
|
||||||
|
min_height = 5,
|
||||||
|
max_width = 120,
|
||||||
|
max_height = 25,
|
||||||
|
adjust_window = true,
|
||||||
|
keymaps = {
|
||||||
|
close = "q",
|
||||||
|
next_match = "n",
|
||||||
|
prev_match = "N",
|
||||||
|
replace_confirm = "<cr>",
|
||||||
|
replace_all = "<leader><cr>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -43,7 +43,7 @@ return {
|
|||||||
-- Binaries
|
-- Binaries
|
||||||
"exe", "dll", "so", "dylib", "bin", "app", "dmg", "deb", "rpm",
|
"exe", "dll", "so", "dylib", "bin", "app", "dmg", "deb", "rpm",
|
||||||
-- Other problematic files
|
-- Other problematic files
|
||||||
"lock", "log", "tmp", "temp", "cache", "bak", "backup"
|
"lock", "log", "tmp", "temp", "cache", "bca", "backup"
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, ext in ipairs(skip_extensions) do
|
for _, ext in ipairs(skip_extensions) do
|
||||||
|
|||||||
59
lua/cargdev/plugins/tiny-inline-diagnostic.lua
Normal file
59
lua/cargdev/plugins/tiny-inline-diagnostic.lua
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
return {
|
||||||
|
"rachartier/tiny-inline-diagnostic.nvim",
|
||||||
|
event = "LspAttach",
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
-- Disable default diagnostics virtual text and auto float
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = false,
|
||||||
|
float = false, -- Disable automatic float, use manual <leader>sl instead
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
require("tiny-inline-diagnostic").setup({
|
||||||
|
signs = {
|
||||||
|
left = "",
|
||||||
|
right = "",
|
||||||
|
diag = "●",
|
||||||
|
arrow = " ",
|
||||||
|
up_arrow = " ",
|
||||||
|
vertical = " │",
|
||||||
|
vertical_end = " └",
|
||||||
|
},
|
||||||
|
hi = {
|
||||||
|
error = "DiagnosticError",
|
||||||
|
warn = "DiagnosticWarn",
|
||||||
|
info = "DiagnosticInfo",
|
||||||
|
hint = "DiagnosticHint",
|
||||||
|
arrow = "NonText",
|
||||||
|
background = "CursorLine",
|
||||||
|
mixing_color = "None",
|
||||||
|
},
|
||||||
|
blend = {
|
||||||
|
factor = 0.22,
|
||||||
|
},
|
||||||
|
options = {
|
||||||
|
show_source = true,
|
||||||
|
throttle = 20,
|
||||||
|
softwrap = 30,
|
||||||
|
multiple_diag_under_cursor = true,
|
||||||
|
multilines = true,
|
||||||
|
show_all_diags_on_cursorline = false,
|
||||||
|
enable_on_insert = false,
|
||||||
|
overflow = {
|
||||||
|
mode = "wrap",
|
||||||
|
},
|
||||||
|
format = nil,
|
||||||
|
break_line = {
|
||||||
|
enabled = false,
|
||||||
|
after = 30,
|
||||||
|
},
|
||||||
|
virt_texts = {
|
||||||
|
priority = 2048,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
18
lua/cargdev/plugins/treesj.lua
Normal file
18
lua/cargdev/plugins/treesj.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
"Wansmer/treesj",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>tj", "<cmd>TSJToggle<cr>", desc = "Toggle split/join" },
|
||||||
|
{ "<leader>ts", "<cmd>TSJSplit<cr>", desc = "Split code block" },
|
||||||
|
{ "<leader>tJ", "<cmd>TSJJoin<cr>", desc = "Join code block" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
use_default_keymaps = false,
|
||||||
|
check_syntax_error = true,
|
||||||
|
max_join_length = 120,
|
||||||
|
cursor_behavior = "hold",
|
||||||
|
notify = true,
|
||||||
|
dot_repeat = true,
|
||||||
|
on_error = nil,
|
||||||
|
},
|
||||||
|
}
|
||||||
5
lua/cargdev/plugins/ts-comments.lua
Normal file
5
lua/cargdev/plugins/ts-comments.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"folke/ts-comments.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
24
lua/cargdev/plugins/twilight.lua
Normal file
24
lua/cargdev/plugins/twilight.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
"folke/twilight.nvim",
|
||||||
|
cmd = { "Twilight", "TwilightEnable", "TwilightDisable" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>zt", "<cmd>Twilight<cr>", desc = "Toggle Twilight" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
dimming = {
|
||||||
|
alpha = 0.25,
|
||||||
|
color = { "Normal", "#ffffff" },
|
||||||
|
term_bg = "#000000",
|
||||||
|
inactive = false,
|
||||||
|
},
|
||||||
|
context = 10,
|
||||||
|
treesitter = true,
|
||||||
|
expand = {
|
||||||
|
"function",
|
||||||
|
"method",
|
||||||
|
"table",
|
||||||
|
"if_statement",
|
||||||
|
},
|
||||||
|
exclude = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
24
lua/cargdev/plugins/undotree.lua
Normal file
24
lua/cargdev/plugins/undotree.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
"mbbill/undotree",
|
||||||
|
cmd = "UndotreeToggle",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>tu", "<cmd>UndotreeToggle<cr>", desc = "Toggle Undotree" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.g.undotree_WindowLayout = 2
|
||||||
|
vim.g.undotree_SplitWidth = 35
|
||||||
|
vim.g.undotree_DiffpanelHeight = 10
|
||||||
|
vim.g.undotree_SetFocusWhenToggle = 1
|
||||||
|
vim.g.undotree_ShortIndicators = 1
|
||||||
|
vim.g.undotree_TreeNodeShape = "◉"
|
||||||
|
vim.g.undotree_TreeVertShape = "│"
|
||||||
|
vim.g.undotree_TreeSplitShape = "╱"
|
||||||
|
vim.g.undotree_TreeReturnShape = "╲"
|
||||||
|
vim.g.undotree_DiffAutoOpen = 1
|
||||||
|
vim.g.undotree_HighlightChangedText = 1
|
||||||
|
vim.g.undotree_HighlightChangedWithSign = 1
|
||||||
|
vim.g.undotree_HighlightSyntaxAdd = "DiffAdd"
|
||||||
|
vim.g.undotree_HighlightSyntaxChange = "DiffChange"
|
||||||
|
vim.g.undotree_HighlightSyntaxDel = "DiffDelete"
|
||||||
|
end,
|
||||||
|
}
|
||||||
55
lua/cargdev/plugins/venv-selector.lua
Normal file
55
lua/cargdev/plugins/venv-selector.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
"linux-cultist/venv-selector.nvim",
|
||||||
|
branch = "regexp",
|
||||||
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"mfussenegger/nvim-dap-python",
|
||||||
|
},
|
||||||
|
ft = "python",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>vs", "<cmd>VenvSelect<cr>", desc = "Select Python venv" },
|
||||||
|
{ "<leader>vc", "<cmd>VenvSelectCached<cr>", desc = "Select cached venv" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
settings = {
|
||||||
|
search = {
|
||||||
|
root = vim.fn.getcwd(),
|
||||||
|
workspace = true,
|
||||||
|
file = true,
|
||||||
|
anaconda_envs = true,
|
||||||
|
anaconda_base = true,
|
||||||
|
pipenv = true,
|
||||||
|
poetry = true,
|
||||||
|
hatch = true,
|
||||||
|
virtualenvs = true,
|
||||||
|
pyenv = true,
|
||||||
|
venv = true,
|
||||||
|
},
|
||||||
|
options = {
|
||||||
|
on_venv_activate_callback = nil,
|
||||||
|
enable_default_searches = true,
|
||||||
|
enable_cached_venvs = true,
|
||||||
|
cached_venv_automatic_activation = true,
|
||||||
|
activate_venv_in_terminal = true,
|
||||||
|
set_environment_variables = true,
|
||||||
|
notify_user_on_venv_activation = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("venv-selector").setup(opts)
|
||||||
|
|
||||||
|
-- Auto-select venv when opening Python files
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "python",
|
||||||
|
callback = function()
|
||||||
|
local venv = vim.fn.findfile("pyproject.toml", vim.fn.getcwd() .. ";")
|
||||||
|
if venv ~= "" then
|
||||||
|
require("venv-selector").retrieve_from_cache()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
once = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
37
lua/cargdev/plugins/vim-visual-multi.lua
Normal file
37
lua/cargdev/plugins/vim-visual-multi.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
return {
|
||||||
|
"mg979/vim-visual-multi",
|
||||||
|
branch = "master",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
init = function()
|
||||||
|
-- Configuration must be set before plugin loads
|
||||||
|
vim.g.VM_default_mappings = 1
|
||||||
|
vim.g.VM_mouse_mappings = 1
|
||||||
|
vim.g.VM_theme = "iceblue"
|
||||||
|
|
||||||
|
vim.g.VM_maps = {
|
||||||
|
["Find Under"] = "<C-d>", -- Like VS Code Ctrl+D
|
||||||
|
["Find Subword Under"] = "<C-d>", -- Like VS Code Ctrl+D
|
||||||
|
["Select All"] = "<C-S-l>", -- Like VS Code Ctrl+Shift+L
|
||||||
|
["Add Cursor Down"] = "<C-Down>", -- Like VS Code
|
||||||
|
["Add Cursor Up"] = "<C-Up>", -- Like VS Code
|
||||||
|
["Skip Region"] = "<C-x>", -- Skip current and go to next
|
||||||
|
["Remove Region"] = "<C-p>", -- Remove current cursor
|
||||||
|
["Undo"] = "u",
|
||||||
|
["Redo"] = "<C-r>",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Highlight settings
|
||||||
|
vim.g.VM_Mono_hl = "DiffText"
|
||||||
|
vim.g.VM_Extend_hl = "DiffAdd"
|
||||||
|
vim.g.VM_Cursor_hl = "Visual"
|
||||||
|
vim.g.VM_Insert_hl = "DiffChange"
|
||||||
|
|
||||||
|
-- Other settings
|
||||||
|
vim.g.VM_leader = "\\"
|
||||||
|
vim.g.VM_show_warnings = 1
|
||||||
|
vim.g.VM_silent_exit = 0
|
||||||
|
vim.g.VM_quit_after_leaving_insert_mode = 0
|
||||||
|
vim.g.VM_skip_empty_lines = 1
|
||||||
|
vim.g.VM_case_setting = "smart"
|
||||||
|
end,
|
||||||
|
}
|
||||||
45
lua/cargdev/plugins/yanky.lua
Normal file
45
lua/cargdev/plugins/yanky.lua
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
return {
|
||||||
|
"gbprod/yanky.nvim",
|
||||||
|
dependencies = { "kkharji/sqlite.lua" },
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
ring = {
|
||||||
|
history_length = 100,
|
||||||
|
storage = "sqlite",
|
||||||
|
sync_with_numbered_registers = true,
|
||||||
|
cancel_event = "update",
|
||||||
|
},
|
||||||
|
picker = {
|
||||||
|
select = {
|
||||||
|
action = nil,
|
||||||
|
},
|
||||||
|
telescope = {
|
||||||
|
use_default_mappings = true,
|
||||||
|
mappings = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
system_clipboard = {
|
||||||
|
sync_with_ring = true,
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
on_put = true,
|
||||||
|
on_yank = true,
|
||||||
|
timer = 200,
|
||||||
|
},
|
||||||
|
preserve_cursor_position = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank" },
|
||||||
|
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put after" },
|
||||||
|
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put before" },
|
||||||
|
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "GPut after" },
|
||||||
|
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "GPut before" },
|
||||||
|
{ "<c-p>", "<Plug>(YankyPreviousEntry)", desc = "Previous yank" },
|
||||||
|
{ "<c-n>", "<Plug>(YankyNextEntry)", desc = "Next yank" },
|
||||||
|
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put indented after" },
|
||||||
|
{ "[p", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put indented before" },
|
||||||
|
{ "<leader>yh", "<cmd>YankyRingHistory<cr>", desc = "Yank history" },
|
||||||
|
},
|
||||||
|
}
|
||||||
55
lua/cargdev/plugins/zen-mode.lua
Normal file
55
lua/cargdev/plugins/zen-mode.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
dependencies = { "folke/twilight.nvim" },
|
||||||
|
cmd = "ZenMode",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>zz", "<cmd>ZenMode<cr>", desc = "Toggle Zen Mode" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
window = {
|
||||||
|
backdrop = 0.95,
|
||||||
|
width = 120,
|
||||||
|
height = 1,
|
||||||
|
options = {
|
||||||
|
signcolumn = "no",
|
||||||
|
number = false,
|
||||||
|
relativenumber = false,
|
||||||
|
cursorline = false,
|
||||||
|
cursorcolumn = false,
|
||||||
|
foldcolumn = "0",
|
||||||
|
list = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins = {
|
||||||
|
options = {
|
||||||
|
enabled = true,
|
||||||
|
ruler = false,
|
||||||
|
showcmd = false,
|
||||||
|
laststatus = 0,
|
||||||
|
},
|
||||||
|
twilight = { enabled = true },
|
||||||
|
gitsigns = { enabled = false },
|
||||||
|
tmux = { enabled = true },
|
||||||
|
kitty = {
|
||||||
|
enabled = false,
|
||||||
|
font = "+4",
|
||||||
|
},
|
||||||
|
alacritty = {
|
||||||
|
enabled = false,
|
||||||
|
font = "14",
|
||||||
|
},
|
||||||
|
wezterm = {
|
||||||
|
enabled = false,
|
||||||
|
font = "+4",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_open = function(win)
|
||||||
|
vim.wo.wrap = true
|
||||||
|
vim.wo.linebreak = true
|
||||||
|
end,
|
||||||
|
on_close = function()
|
||||||
|
vim.wo.wrap = false
|
||||||
|
vim.wo.linebreak = false
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user