feat: refactoring

This commit is contained in:
Carlos
2025-08-02 11:28:22 -04:00
parent a7f6d3067b
commit d8bbe04dd9
15 changed files with 1390 additions and 611 deletions

83
DATABASE_SETUP_GUIDE.md Normal file
View File

@@ -0,0 +1,83 @@
# Database Setup Guide
## Current Status: ✅ **FIXED**
The database error has been resolved! The database plugins are now configured to prevent automatic connections that were causing the startup error.
## What Was Fixed
1. **Disabled Auto-Connections**: Set `db_ui_auto_execute_table_helpers = 0` to prevent automatic database connections
2. **Removed Keymap Conflicts**: Temporarily disabled database keymaps to prevent accidental triggers
3. **Safe Configuration**: Database plugins are loaded but won't attempt to connect automatically
## To Re-Enable Database Functionality
When you want to use database features, you can:
### 1. Re-enable Database Keymaps
Uncomment the database keymaps in `lua/cargdev/core/keymaps/plugins.lua`:
```lua
-- Change from:
-- keymap.set("n", "<leader>du", "<cmd>DBUI<CR>", { desc = "Open Database UI" })
-- To:
keymap.set("n", "<leader>du", "<cmd>DBUI<CR>", { desc = "Open Database UI" })
```
### 2. Manual Database Usage
You can still use database features manually:
- **Open Database UI**: `:DBUI`
- **Add Connection**: `:DBUIAddConnection`
- **Execute SQL**: `:DBExecute`
- **Format SQL**: `:SQLFormat`
### 3. Database Keymaps (when re-enabled)
- **`<leader>du`** - Open Database UI
- **`<leader>dua`** - Add database connection
- **`<leader>due`** - Execute SQL query
- **`<leader>dus`** - Select SQL query
- **`<leader>dut`** - Create table
- **`<leader>duf`** - Format SQL query
## Supported Databases
- **SQLite**: `sqlite3`
- **MySQL**: `mysql`
- **PostgreSQL**: `psql`
- **Redis**: `redis-cli`
## Installation Requirements
Make sure you have the database clients installed:
```bash
# macOS
brew install mysql redis mongodb/brew/mongodb-community
# Ubuntu/Debian
sudo apt install mysql-client postgresql-client redis-tools
# CentOS/RHEL
sudo yum install mysql postgresql redis
```
## Troubleshooting
If you encounter database errors again:
1. **Check for saved connections**: Look for `.dadbod` files in your project directories
2. **Clear database cache**: Remove any saved database sessions
3. **Verify adapters**: Ensure database clients are properly installed
4. **Check keymaps**: Make sure there are no conflicting keymaps
## Current Configuration
The database plugins are configured with:
-**No automatic connections**
-**Manual trigger only**
-**Proper adapters configured**
-**No startup errors**
Your Neovim should now start cleanly without any database errors! 🎉

View File

@@ -0,0 +1,202 @@
# Native Auto Wrapper Configuration
## 🎯 **Overview**
Your Neovim is now configured with native auto wrapper functionality using built-in Neovim features - no additional packages required!
## ✨ **Features**
### **Automatic Text Wrapping**
- **Text files**: Auto-wrap at 80 characters
- **Code files**: Auto-wrap comments at 100 characters
- **Documentation**: Auto-wrap at 78 characters
- **Configuration files**: Auto-wrap comments at 80 characters
### **Smart Formatting**
- **Break at word boundaries**: Lines break at natural word boundaries
- **Preserve indentation**: Wrapped lines maintain proper indentation
- **Visual indicators**: Shows break indicators (↪) for wrapped lines
- **Color column**: Visual guide at specified text width
## 🎮 **Keymaps**
### **Text Wrapping Controls**
| Keymap | Description |
|--------|-------------|
| `<leader>tw` | Toggle line wrapping |
| `<leader>tl` | Toggle line break |
| `<leader>tc` | Show 80 character column guide |
| `<leader>tC` | Hide column guide |
### **Text Formatting**
| Keymap | Description |
|--------|-------------|
| `<leader>tf` | Format current paragraph |
| `<leader>tF` | Format entire file |
| `<leader>tf` (visual) | Format selected text |
### **Text Width Settings**
| Keymap | Description |
|--------|-------------|
| `<leader>t80` | Set text width to 80 characters |
| `<leader>t100` | Set text width to 100 characters |
| `<leader>t120` | Set text width to 120 characters |
| `<leader>t0` | Disable text width (no wrapping) |
### **Auto-wrap Controls**
| Keymap | Description |
|--------|-------------|
| `<leader>ta` | Enable auto-wrap text |
| `<leader>tA` | Disable auto-wrap text |
| `<leader>tc` | Enable auto-wrap comments |
| `<leader>tC` | Disable auto-wrap comments |
### **Indentation and Display**
| Keymap | Description |
|--------|-------------|
| `<leader>ti` | Toggle break indent |
| `<leader>ts` | Show break indicator (↪) |
| `<leader>tS` | Hide break indicator |
## 📁 **File Type Specific Settings**
### **Text and Documentation Files**
- **File types**: `text`, `markdown`, `gitcommit`, `mail`
- **Text width**: 80 characters
- **Auto-wrap**: Enabled for all text
- **Line break**: At word boundaries
### **Code Files**
- **File types**: `lua`, `javascript`, `typescript`, `python`, `java`, `cpp`, `c`, `rust`, `go`
- **Text width**: 100 characters
- **Auto-wrap**: Comments only
- **Format options**: Smart comment wrapping
### **Documentation Files**
- **File types**: `help`, `man`
- **Text width**: 78 characters
- **Auto-wrap**: Enabled for all text
- **Line break**: At word boundaries
### **Configuration Files**
- **File types**: `conf`, `config`, `ini`, `toml`, `yaml`, `json`
- **Text width**: 80 characters
- **Auto-wrap**: Comments only
## 🔧 **Native Neovim Settings**
### **Core Settings**
```lua
-- Text wrapping
opt.wrap = true -- Enable line wrapping
opt.linebreak = true -- Break at word boundaries
opt.breakindent = true -- Preserve indentation
opt.showbreak = "" -- Break indicator
opt.breakindentopt = "shift:2" -- Indent wrapped lines
-- Text width
opt.textwidth = 80 -- Default text width
opt.colorcolumn = "80" -- Visual column guide
```
### **Format Options**
```lua
opt.formatoptions = "jcroqlnt" -- Format options
-- j: Remove comment leader when joining lines
-- c: Auto-wrap comments using textwidth
-- r: Auto-wrap comments when pressing Enter
-- o: Auto-wrap comments when pressing 'o' or 'O'
-- q: Allow formatting of comments with 'gq'
-- l: Long lines are not broken in insert mode
-- n: Recognize numbered lists
-- t: Auto-wrap text using textwidth
```
## 📝 **Usage Examples**
### **1. Writing Documentation**
```markdown
# This is a long title that will automatically wrap at 80 characters when you type it
This is a long paragraph that will automatically wrap at word boundaries when it reaches 80 characters, making your documentation more readable and properly formatted.
```
### **2. Writing Code Comments**
```lua
-- This is a very long comment that will automatically wrap at 100 characters when you press Enter or 'o', making your code more readable and maintaining proper indentation
local function example()
-- This comment will also wrap automatically
return "example"
end
```
### **3. Writing Git Commit Messages**
```bash
# This commit message will automatically wrap at 80 characters
git commit -m "This is a very long commit message that describes the changes made to the codebase in detail"
```
## 🎨 **Visual Features**
### **Break Indicators**
- **Symbol**: `↪` shows where lines are wrapped
- **Toggle**: Use `<leader>ts` to show/hide
### **Color Column**
- **Guide**: Visual line at text width
- **Toggle**: Use `<leader>tc` to show/hide
### **Indentation**
- **Preserved**: Wrapped lines maintain indentation
- **Smart**: Proper indentation for code blocks
## 🔍 **Troubleshooting**
### **Text Not Wrapping**
1. Check if wrapping is enabled: `:set wrap?`
2. Verify text width: `:set textwidth?`
3. Check format options: `:set formatoptions?`
### **Comments Not Wrapping**
1. Ensure format option 'c' is set: `:set formatoptions+=c`
2. Check file type: `:set filetype?`
3. Verify text width is set: `:set textwidth?`
### **Indentation Issues**
1. Enable break indent: `:set breakindent`
2. Check break indent options: `:set breakindentopt?`
3. Verify smart indent: `:set smartindent?`
## 🚀 **Advanced Configuration**
### **Custom File Type Settings**
Add to your configuration:
```lua
vim.api.nvim_create_autocmd("FileType", {
pattern = { "your_filetype" },
callback = function()
vim.opt_local.textwidth = 120
vim.opt_local.formatoptions:append("c")
end,
})
```
### **Custom Break Indicator**
```lua
vim.opt.showbreak = "" -- Custom break indicator
```
### **Custom Color Column**
```lua
vim.opt.colorcolumn = "80,100,120" -- Multiple column guides
```
## ✅ **Benefits of Native Configuration**
- **No additional packages**: Uses built-in Neovim features
- **Fast and lightweight**: No external dependencies
- **Consistent behavior**: Works the same across all Neovim installations
- **Easy to customize**: Simple Lua configuration
- **Reliable**: No plugin conflicts or compatibility issues
Your native auto wrapper is now fully configured and ready to use! 🎉

File diff suppressed because one or more lines are too long

577
checkhealth_fixed.log Normal file
View File

@@ -0,0 +1,577 @@
==============================================================================
CopilotChat: ✅
CopilotChat.nvim [core] ~
- ✅ OK nvim: NVIM v0.11.3
Build type: Release
LuaJIT 2.1.1753364724
Run "nvim -V1 -v" for more info
- ✅ OK setup: called
CopilotChat.nvim [commands] ~
- ✅ OK curl: curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.64.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe UnixSockets
- ✅ OK git: git version 2.50.1
- ✅ OK rg: ripgrep 14.1.1
features:+pcre2
simd(compile):+NEON
simd(runtime):+NEON
PCRE2 10.43 is available (JIT is available)
- ✅ OK lynx: Lynx Version 2.9.2 (31 May 2024)
libwww-FM 2.14, SSL-MM 1.4.1, OpenSSL 3.5.1, ncurses 6.5.20240427
Built on darwin24.2.0 (May 31 2024 23:03:20).
Copyrights held by the Lynx Developers Group,
the University of Kansas, CERN, and other contributors.
Distributed under the GNU General Public License (Version 2).
See https://lynx.invisible-island.net/ and the online help for more information.
See http://www.openssl.org/ for information about OpenSSL.
CopilotChat.nvim [dependencies] ~
- ✅ OK plenary: installed
- ✅ OK copilot: copilot.lua
- ✅ OK vim.ui.select: overridden by `@/Users/carlos/.local/share/nvim/lazy/dressing.nvim/lua/dressing/patch.lua`
- ✅ OK tiktoken_core: installed
- ✅ OK treesitter[markdown]: installed
- ✅ OK treesitter[diff]: installed
==============================================================================
avante: ✅
avante.nvim ~
- ✅ OK Found required plugin: nvim-lua/plenary.nvim
- ✅ OK Found required plugin: MunifTanjim/nui.nvim
- ✅ OK Found icons plugin (nvim-web-devicons or mini.icons)
- ✅ OK Using native input provider (no additional dependencies required)
TreeSitter Dependencies ~
- ✅ OK All essential TreeSitter parsers are installed
- ✅ OK TreeSitter highlighter is available
==============================================================================
copilot: 1 ❌
{copilot.lua} ~
- {copilot.lua} GitHub Copilot plugin for Neovim
Copilot Dependencies ~
- ✅ OK `node` found: v22.11.0
Copilot Authentication ~
- No environment token set (`GITHUB_COPILOT_TOKEN` or `GH_COPILOT_TOKEN`)
- ✅ OK Local credentials file found
- Location: `/Users/carlos/.config/github-copilot/apps.json`
- ❌ ERROR Copilot LSP client not available
- Check that the plugin is properly loaded and configured
- Or restart Neovim if the plugin was just installed
==============================================================================
dap: ✅
dap: Adapters ~
dap.adapter: node2 ~
- ✅ OK is executable: node
dap.adapter: java ~
- Adapter is a function. Can't validate it
dap: Sessions ~
- ✅ OK No active sessions
==============================================================================
dressing: ✅
dressing.nvim ~
- ✅ OK vim.ui.input active
- ✅ OK vim.ui.select active: telescope
==============================================================================
fzf_lua: ✅
fzf-lua [required] ~
- ✅ OK 'fzf' `0.65.0 (brew)`
- ✅ OK 'git' `git version 2.50.1`
- ✅ OK 'rg' `ripgrep 14.1.1`
- ✅ OK 'fd' `fd 10.2.0`
fzf-lua [optional] ~
- ✅ OK `nvim-web-devicons` found
- ✅ OK 'rg' `ripgrep 14.1.1`
- ✅ OK 'fd' `fd 10.2.0`
- ✅ OK 'bat' `bat 0.25.0`
- ✅ OK 'delta' `delta 0.18.2`
fzf-lua [optional:media] ~
- ✅ OK 'viu' `viu 1.5.1`
- ✅ OK 'chafa' `Chafa version 1.16.2`
- ✅ OK 'ueberzugpp' `ueberzugpp 2.9.6`
fzf-lua [env] ~
- ✅ OK `$FZF_DEFAULT_OPTS` is set to:
--color=fg:#CBE0F0,bg:#011628,hl:#B388FF,fg+:#CBE0F0,bg+:#143652,hl+:#B388FF,info:#06BCE4,prompt:#2CF9ED,pointer:#2CF9ED,marker:#2CF9ED,spinner:#2CF9ED,header:#2CF9ED
- ✅ OK `FZF_DEFAULT_OPTS_FILE` is not set
==============================================================================
img-clip: ✅
img-clip.nvim ~
- ✅ OK `pngpaste` is installed
==============================================================================
lazy: 2 ⚠️
lazy.nvim ~
- {lazy.nvim} version `11.17.1`
- ✅ OK {git} `version 2.50.1`
- ✅ OK no existing packages found by other package managers
- ✅ OK packer_compiled.lua not found
luarocks ~
- checking `luarocks` installation
- ✅ OK no plugins require `luarocks`, so you can ignore any warnings below
- ✅ OK {luarocks} `/opt/homebrew/bin/luarocks 3.12.2`
- ⚠️ WARNING `lua` version `5.1` needed, but found `Lua 5.4.8 Copyright (C) 1994-2025 Lua.org, PUC-Rio`
- ⚠️ WARNING {lua5.1} or {lua} or {lua-5.1} version `5.1` not installed
==============================================================================
luasnip: ✅
luasnip ~
- ✅ OK jsregexp is installed
==============================================================================
mason: ✅
mason.nvim ~
- ✅ OK mason.nvim version v2.0.1
- ✅ OK PATH: prepend
- ✅ OK Providers:
mason.providers.registry-api
mason.providers.client
- ✅ OK neovim version >= 0.10.0
mason.nvim [Registries] ~
- ✅ OK Registry `github.com/mason-org/mason-registry version: 2025-07-28-rusty-action` is installed.
mason.nvim [Core utils] ~
- ✅ OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP, with modifications by Apple Inc.`
- ✅ OK wget: `GNU Wget 1.25.0, a non-interactive network retriever.`
- ✅ OK curl: `curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.64.0`
- ✅ OK gzip: `Apple gzip 457.120.3`
- ✅ OK tar: `bsdtar 3.5.3 - libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 `
- ✅ OK bash: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)`
- ✅ OK sh: `Ok`
mason.nvim [Languages] ~
- ✅ OK Go: `go version go1.24.5 darwin/arm64`
- ✅ OK luarocks: `/opt/homebrew/bin/luarocks 3.12.2`
- ✅ OK cargo: `cargo 1.82.0 (8f40fc59f 2024-08-21)`
- ✅ OK Ruby: `ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin24]`
- ✅ OK node: `v22.11.0`
- ✅ OK npm: `11.4.2`
- ✅ OK PHP: `PHP 8.4.10 (cli) (built: Jul 2 2025 02:22:42) (NTS)`
- ✅ OK Composer: `Composer version 2.8.10 2025-07-10 19:08:33`
- ✅ OK RubyGem: `3.5.3`
- ✅ OK python: `Python 3.13.5`
- ✅ OK java: `openjdk version "23.0.2" 2025-01-21`
- ✅ OK javac: `javac 23.0.2`
- ✅ OK julia: `julia version 1.11.6`
- ✅ OK pip: `pip 25.1.1 from /opt/homebrew/lib/python3.13/site-packages/pip (python 3.13)`
- ✅ OK python venv: `Ok`
==============================================================================
mason-lspconfig: ✅
mason-lspconfig.nvim ~
- ✅ OK Neovim v0.11
- ✅ OK mason.nvim v2
==============================================================================
mcphub: 1 ⚠️
mcphub.nvim ~
- mcphub.nvim version: 6.1.0
- mcp-hub binary:
- mcp-hub required version: 4.2.0
- mcp-hub installed version: 4.2.0
- ✅ OK mcp-hub version 4.2.0 is compatible
Plugin Dependencies: ~
- ✅ OK plenary.nvim installed
Libraries: ~
- ✅ OK curl installed
- ✅ OK node installed
- ✅ OK uv installed
Chat plugins ~
- ⚠️ WARNING codecompanion.nvim not found
- ✅ OK avante.nvim installed
- ✅ OK CopilotChat.nvim installed
==============================================================================
nvim-treesitter: ✅
Installation ~
- ✅ OK `tree-sitter` found 0.25.8 (parser generator, only needed for :TSInstallFromGrammar)
- ✅ OK `node` found v22.11.0 (only needed for :TSInstallFromGrammar)
- ✅ OK `git` executable found.
- ✅ OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: Apple clang version 17.0.0 (clang-1700.0.13.5)
- ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "arm64",
release = "24.5.0",
sysname = "Darwin",
version = "Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:33 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8122"
} ~
Parser/Features H L F I J
- bash ✓ ✓ ✓ . ✓
- c ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- diff ✓ . ✓ . ✓
- dockerfile ✓ . . . ✓
- gitignore ✓ . . . ✓
- graphql ✓ . . ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- java ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- json ✓ ✓ ✓ ✓ .
- latex ✓ . ✓ . ✓
- lua ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- prisma ✓ . ✓ . ✓
- query ✓ ✓ ✓ ✓ ✓
- regex ✓ . . . .
- sql ✓ . ✓ ✓ ✓
- svelte ✓ ✓ ✓ ✓ ✓
- tsx ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- yaml ✓ ✓ ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
==============================================================================
render-markdown: ✅
render-markdown.nvim [version] ~
- ✅ OK plugin 8.6.9
- ✅ OK neovim >= 0.11
render-markdown.nvim [configuration] ~
- ✅ OK valid
render-markdown.nvim [treesitter] ~
- ✅ OK markdown: parser installed
- ✅ OK markdown: highlights ~/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/highlights.scm
- ✅ OK markdown: highlighter enabled
- ✅ OK markdown_inline: parser installed
- ✅ OK markdown_inline: highlights ~/.local/share/nvim/lazy/nvim-treesitter/queries/markdown_inline/highlights.scm
- ✅ OK html: parser installed
render-markdown.nvim [icons] ~
- ✅ OK using: nvim-web-devicons
render-markdown.nvim [executables] ~
render-markdown.nvim [conflicts] ~
- ✅ OK headlines: not installed
- ✅ OK markview: not installed
- ✅ OK obsidian: not installed
==============================================================================
snacks: 4 ⚠️ 3 ❌
Snacks ~
- ✅ OK setup called
Snacks.bigfile ~
- ✅ OK setup {enabled}
Snacks.dashboard ~
- ✅ OK setup {enabled}
- ❌ ERROR setup did not run
Snacks.explorer ~
- ✅ OK setup {enabled}
Snacks.image ~
- ✅ OK setup {enabled}
- ✅ OK 'kitty' `kitty 0.42.2 created by Kovid Goyal`
- ✅ OK 'magick' `Version: ImageMagick 7.1.2-0 Q16-HDRI aarch64 23234 https://imagemagick.org`
- ✅ OK 'convert' `WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"`
- ✅ OK `wezterm` detected and supported
- ⚠️ WARNING `wezterm` does not support placeholders. Fallback rendering will be used
- ⚠️ WARNING Inline images are disabled
- ✅ OK `tmux` detected and supported
- ✅ OK Terminal Dimensions:
- {size}: `0` x `0` pixels
- {scale}: `1.00`
- {cell}: `0` x `0` pixels
- ✅ OK Available Treesitter languages:
`css`, `html`, `javascript`, `latex`, `markdown_inline`, `markdown`, `svelte`, `tsx`
- ⚠️ WARNING Missing Treesitter languages:
`norg`, `scss`, `typst`, `vue`
- ⚠️ WARNING Image rendering in docs with missing treesitter parsers won't work
- ✅ OK 'gs' `10.05.1`
- ✅ OK PDF files are supported
- ✅ OK 'tectonic' `tectonic 0.15.0Tectonic 0.15.0`
- ✅ OK LaTeX math equations are supported
- ✅ OK 'mmdc' `node:internal/modules/esm/resolve:838`
- ✅ OK Mermaid diagrams are supported
- ✅ OK your terminal supports the kitty graphics protocol
Snacks.input ~
- ✅ OK setup {enabled}
- ❌ ERROR `vim.ui.input` is not set to `Snacks.input`
Snacks.lazygit ~
- ✅ OK {lazygit} installed
Snacks.notifier ~
- ✅ OK setup {enabled}
- ✅ OK is ready
Snacks.picker ~
- ✅ OK setup {enabled}
- ❌ ERROR `vim.ui.select` is not set to `Snacks.picker.select`
- ✅ OK Available Treesitter languages:
`regex`
- ✅ OK 'git' `git version 2.50.1`
- ✅ OK 'rg' `ripgrep 14.1.1`
- ✅ OK `Snacks.picker.grep()` is available
- ✅ OK 'fd' `fd 10.2.0`
- ✅ OK `Snacks.picker.files()` is available
- ✅ OK `Snacks.picker.explorer()` is available
- ✅ OK `SQLite3` is available
Snacks.quickfile ~
- ✅ OK setup {enabled}
Snacks.scope ~
- ✅ OK setup {enabled}
Snacks.scroll ~
- ✅ OK setup {enabled}
Snacks.statuscolumn ~
- ✅ OK setup {enabled}
Snacks.terminal ~
- ✅ OK shell configured
- `vim.o.shell`: /bin/zsh
- `parsed`: { "/bin/zsh" }
Snacks.toggle ~
- ✅ OK {which-key} is installed
Snacks.words ~
- ✅ OK setup {enabled}
==============================================================================
telescope: ✅
Checking for required plugins ~
- ✅ OK plenary installed.
- ✅ OK nvim-treesitter installed.
Checking external dependencies ~
- ✅ OK rg: found ripgrep 14.1.1
- ✅ OK fd: found fd 10.2.0
===== Installed extensions ===== ~
Telescope Extension: `dap` ~
- No healthcheck provided
Telescope Extension: `fzf` ~
- ✅ OK lib working as expected
- ✅ OK file_sorter correctly configured
- ✅ OK generic_sorter correctly configured
==============================================================================
vim.deprecated: ✅
- ✅ OK No deprecated functions detected
==============================================================================
vim.health: 1 ❌
Configuration ~
- ✅ OK no issues found
Runtime ~
- ✅ OK $VIMRUNTIME: /opt/homebrew/Cellar/neovim/0.11.3/share/nvim/runtime
Performance ~
- ✅ OK Build type: Release
Remote Plugins ~
- ✅ OK Up to date
terminal ~
- key_backspace (kbs) terminfo entry: `key_backspace=^H`
- key_dc (kdch1) terminfo entry: `key_dc=\E[3~`
- $TERM_PROGRAM="vscode"
- $COLORTERM="truecolor"
tmux ~
- ✅ OK escape-time: 10
- ✅ OK focus-events: on
- $TERM: xterm-256color
- default-terminal: tmux-256color
- ❌ ERROR $TERM differs from the tmux `default-terminal` setting. Colors might look wrong.
- ADVICE:
- $TERM may have been set by some rc (.bashrc, .zshrc, ...).
External Tools ~
- ✅ OK ripgrep 14.1.1 (/opt/homebrew/bin/rg)
==============================================================================
vim.lsp: 15 ⚠️
- LSP log level : WARN
- Log path: /Users/carlos/.local/state/nvim/lsp.log
- Log size: 9416 KB
vim.lsp: Active Clients ~
- No active clients
vim.lsp: Enabled Configurations ~
- ⚠️ WARNING 'css_variables' config not found. Ensure that vim.lsp.config('css_variables') was called.
- css_variables:
- ⚠️ WARNING 'cssls' config not found. Ensure that vim.lsp.config('cssls') was called.
- cssls:
- ⚠️ WARNING 'cssmodules_ls' config not found. Ensure that vim.lsp.config('cssmodules_ls') was called.
- cssmodules_ls:
- ⚠️ WARNING 'emmet_ls' config not found. Ensure that vim.lsp.config('emmet_ls') was called.
- emmet_ls:
- ⚠️ WARNING 'eslint' config not found. Ensure that vim.lsp.config('eslint') was called.
- eslint:
- ⚠️ WARNING 'gopls' config not found. Ensure that vim.lsp.config('gopls') was called.
- gopls:
- ⚠️ WARNING 'graphql' config not found. Ensure that vim.lsp.config('graphql') was called.
- graphql:
- ⚠️ WARNING 'html' config not found. Ensure that vim.lsp.config('html') was called.
- html:
- ⚠️ WARNING 'jdtls' config not found. Ensure that vim.lsp.config('jdtls') was called.
- jdtls:
- ⚠️ WARNING 'lua_ls' config not found. Ensure that vim.lsp.config('lua_ls') was called.
- lua_ls:
- ⚠️ WARNING 'prismals' config not found. Ensure that vim.lsp.config('prismals') was called.
- prismals:
- ⚠️ WARNING 'pyright' config not found. Ensure that vim.lsp.config('pyright') was called.
- pyright:
- ⚠️ WARNING 'svelte' config not found. Ensure that vim.lsp.config('svelte') was called.
- svelte:
- ⚠️ WARNING 'tailwindcss' config not found. Ensure that vim.lsp.config('tailwindcss') was called.
- tailwindcss:
- ⚠️ WARNING 'ts_ls' config not found. Ensure that vim.lsp.config('ts_ls') was called.
- ts_ls:
vim.lsp: File Watcher ~
- file watching "(workspace/didChangeWatchedFiles)" disabled on all clients
vim.lsp: Position Encodings ~
- No active clients
==============================================================================
vim.provider: ✅
Clipboard (optional) ~
- ✅ OK Clipboard tool found: pbcopy
Node.js provider (optional) ~
- Node.js: v22.11.0
- Nvim node.js host: /Users/carlos/.config/yarn/global//node_modules/neovim/bin/cli.js
Perl provider (optional) ~
- Disabled (loaded_perl_provider=0).
Python 3 provider (optional) ~
- pyenv: Path: /opt/homebrew/Cellar/pyenv/2.6.5/libexec/pyenv
- pyenv: Root: /Users/carlos/.pyenv
- `g:python3_host_prog` is not set. Searching for python3.12 in the environment.
- Executable: /opt/homebrew/bin/python3.12
- Python version: 3.12.11
- pynvim version: 0.5.2
- ✅ OK Latest pynvim is installed.
Python virtualenv ~
- ✅ OK no $VIRTUAL_ENV
Ruby provider (optional) ~
- Disabled (loaded_ruby_provider=0).
==============================================================================
vim.treesitter: ✅
Treesitter features ~
- Treesitter ABI support: min 13, max 15
- WASM parser support: false
Treesitter parsers ~
- ✅ OK Parser: bash ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/bash.so
- ✅ OK Parser: c ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/c.so
- ✅ OK Parser: c ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/c.so
- ✅ OK Parser: css ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/css.so
- ✅ OK Parser: diff ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/diff.so
- ✅ OK Parser: dockerfile ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/dockerfile.so
- ✅ OK Parser: gitignore ABI: 13, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/gitignore.so
- ✅ OK Parser: graphql ABI: 13, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/graphql.so
- ✅ OK Parser: html ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/html.so
- ✅ OK Parser: java ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/java.so
- ✅ OK Parser: javascript ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/javascript.so
- ✅ OK Parser: json ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/json.so
- ✅ OK Parser: latex ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/latex.so
- ✅ OK Parser: lua ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/lua.so
- ✅ OK Parser: lua ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/lua.so
- ✅ OK Parser: markdown ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/markdown.so
- ✅ OK Parser: markdown ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/markdown.so
- ✅ OK Parser: markdown_inline ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/markdown_inline.so
- ✅ OK Parser: markdown_inline ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/markdown_inline.so
- ✅ OK Parser: prisma ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/prisma.so
- ✅ OK Parser: query ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/query.so
- ✅ OK Parser: query ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/query.so
- ✅ OK Parser: regex ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/regex.so
- ✅ OK Parser: sql ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/sql.so
- ✅ OK Parser: svelte ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/svelte.so
- ✅ OK Parser: tsx ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/tsx.so
- ✅ OK Parser: typescript ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/typescript.so
- ✅ OK Parser: vim ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/vim.so
- ✅ OK Parser: vim ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/vim.so
- ✅ OK Parser: vimdoc ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/vimdoc.so
- ✅ OK Parser: vimdoc ABI: 14, path: /opt/homebrew/Cellar/neovim/0.11.3/lib/nvim/parser/vimdoc.so
- ✅ OK Parser: yaml ABI: 14, path: /Users/carlos/.local/share/nvim/lazy/nvim-treesitter/parser/yaml.so

View File

@@ -114,4 +114,82 @@ keymap.set("n", "gco", "<cmd>lua require('Comment.api').insert_below()<cr>", { d
keymap.set("n", "gcO", "<cmd>lua require('Comment.api').insert_above()<cr>", { desc = "Insert comment above" }) keymap.set("n", "gcO", "<cmd>lua require('Comment.api').insert_above()<cr>", { desc = "Insert comment above" })
keymap.set("n", "gcA", "<cmd>lua require('Comment.api').insert_eol()<cr>", { desc = "Insert comment at end of line" }) keymap.set("n", "gcA", "<cmd>lua require('Comment.api').insert_eol()<cr>", { desc = "Insert comment at end of line" })
keymap.set("n", "gb", "<cmd>lua require('Comment.api').toggle_current_blockwise()<cr>", { desc = "Toggle block comment" }) keymap.set("n", "gb", "<cmd>lua require('Comment.api').toggle_current_blockwise()<cr>", { desc = "Toggle block comment" })
keymap.set("n", "gbc", "<cmd>lua require('Comment.api').toggle_current_blockwise()<cr>", { desc = "Toggle current block comment" }) keymap.set("n", "gbc", "<cmd>lua require('Comment.api').toggle_current_blockwise()<cr>", { desc = "Toggle current block comment" })
-- =============================================================================
-- DATABASE KEYMAPS (Temporarily disabled to prevent conflicts)
-- =============================================================================
-- -- Dadbod UI
-- keymap.set("n", "<leader>du", "<cmd>DBUI<CR>", { desc = "Open Database UI" })
-- keymap.set("n", "<leader>dul", "<cmd>DBUILastQueryInfo<CR>", { desc = "Show last query info" })
-- keymap.set("n", "<leader>duf", "<cmd>DBUIFindBuffer<CR>", { desc = "Find database buffer" })
-- -- Database connections
-- keymap.set("n", "<leader>dua", "<cmd>DBUIAddConnection<CR>", { desc = "Add database connection" })
-- keymap.set("n", "<leader>dur", "<cmd>DBUIRenameBuffer<CR>", { desc = "Rename database buffer" })
-- keymap.set("n", "<leader>dud", "<cmd>DBUIRefresh<CR>", { desc = "Refresh database" })
-- -- Database queries
-- keymap.set("n", "<leader>due", "<cmd>DBExecute<CR>", { desc = "Execute SQL query" })
-- keymap.set("n", "<leader>dus", "<cmd>DBSelect<CR>", { desc = "Select SQL query" })
-- keymap.set("n", "<leader>dui", "<cmd>DBInsert<CR>", { desc = "Insert SQL query" })
-- keymap.set("n", "<leader>duu", "<cmd>DBUpdate<CR>", { desc = "Update SQL query" })
-- keymap.set("n", "<leader>dudel", "<cmd>DBDelete<CR>", { desc = "Delete SQL query" })
-- -- Database table operations
-- keymap.set("n", "<leader>dut", "<cmd>DBUITableCreate<CR>", { desc = "Create table" })
-- keymap.set("n", "<leader>duti", "<cmd>DBUITableIndex<CR>", { desc = "Show table indexes" })
-- keymap.set("n", "<leader>dutc", "<cmd>DBUITableCount<CR>", { desc = "Count table rows" })
-- keymap.set("n", "<leader>dutx", "<cmd>DBUITableExplain<CR>", { desc = "Explain table query" })
-- keymap.set("n", "<leader>dutz", "<cmd>DBUITableSize<CR>", { desc = "Show table size" })
-- -- SQL formatting
-- keymap.set("n", "<leader>duf", "<cmd>SQLFormat<CR>", { desc = "Format SQL query" })
-- -- Database utilities
-- keymap.set("n", "<leader>duh", "<cmd>DBUIHideNotifications<CR>", { desc = "Hide database notifications" })
-- keymap.set("n", "<leader>dus", "<cmd>DBUISaveBuffer<CR>", { desc = "Save database buffer" })
-- keymap.set("n", "<leader>dul", "<cmd>DBUILoadBuffer<CR>", { desc = "Load database buffer" })
-- Redis specific
keymap.set("n", "<leader>rds", "<cmd>Redis<CR>", { desc = "Open Redis" })
keymap.set("n", "<leader>rdk", "<cmd>RedisKeys<CR>", { desc = "Show Redis keys" })
keymap.set("n", "<leader>rdi", "<cmd>RedisInfo<CR>", { desc = "Show Redis info" })
-- MongoDB specific
keymap.set("n", "<leader>mdb", "<cmd>MongoDB<CR>", { desc = "Open MongoDB" })
keymap.set("n", "<leader>mdc", "<cmd>MongoDBConnect<CR>", { desc = "Connect to MongoDB" })
keymap.set("n", "<leader>mdd", "<cmd>MongoDBDisconnect<CR>", { desc = "Disconnect from MongoDB" })
-- =============================================================================
-- NATIVE AUTO WRAPPER KEYMAPS
-- =============================================================================
-- Text wrapping controls
keymap.set("n", "<leader>tw", "<cmd>set wrap!<cr>", { desc = "Toggle line wrapping" })
keymap.set("n", "<leader>tl", "<cmd>set linebreak!<cr>", { desc = "Toggle line break" })
keymap.set("n", "<leader>tc", "<cmd>set colorcolumn=80<cr>", { desc = "Show 80 char column" })
keymap.set("n", "<leader>tC", "<cmd>set colorcolumn=<cr>", { desc = "Hide column guide" })
-- Format text using native Neovim commands
keymap.set("n", "<leader>tf", "gqap", { desc = "Format paragraph" })
keymap.set("v", "<leader>tf", "gq", { desc = "Format selection" })
keymap.set("n", "<leader>tF", "gggqG", { desc = "Format entire file" })
-- Text width adjustments
keymap.set("n", "<leader>t80", "<cmd>set textwidth=80<cr>", { desc = "Set text width to 80" })
keymap.set("n", "<leader>t100", "<cmd>set textwidth=100<cr>", { desc = "Set text width to 100" })
keymap.set("n", "<leader>t120", "<cmd>set textwidth=120<cr>", { desc = "Set text width to 120" })
keymap.set("n", "<leader>t0", "<cmd>set textwidth=0<cr>", { desc = "Disable text width" })
-- Auto-wrap controls
keymap.set("n", "<leader>ta", "<cmd>set formatoptions+=t<cr>", { desc = "Enable auto-wrap text" })
keymap.set("n", "<leader>tA", "<cmd>set formatoptions-=t<cr>", { desc = "Disable auto-wrap text" })
keymap.set("n", "<leader>tc", "<cmd>set formatoptions+=c<cr>", { desc = "Enable auto-wrap comments" })
keymap.set("n", "<leader>tC", "<cmd>set formatoptions-=c<cr>", { desc = "Disable auto-wrap comments" })
-- Indent and wrap
keymap.set("n", "<leader>ti", "<cmd>set breakindent!<cr>", { desc = "Toggle break indent" })
keymap.set("n", "<leader>ts", "<cmd>set showbreak=↪ <cr>", { desc = "Show break indicator" })
keymap.set("n", "<leader>tS", "<cmd>set showbreak=<cr>", { desc = "Hide break indicator" })

View File

@@ -22,7 +22,7 @@ keymap.set("n", "<leader>fC", "<cmd>Telescope commands<cr>", { desc = "Find comm
keymap.set("n", "<leader>fg", "<cmd>Telescope git_commits<cr>", { desc = "Git commits" }) keymap.set("n", "<leader>fg", "<cmd>Telescope git_commits<cr>", { desc = "Git commits" })
keymap.set("n", "<leader>fG", "<cmd>Telescope git_bcommits<cr>", { desc = "Git buffer commits" }) keymap.set("n", "<leader>fG", "<cmd>Telescope git_bcommits<cr>", { desc = "Git buffer commits" })
keymap.set("n", "<leader>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" }) keymap.set("n", "<leader>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" })
keymap.set("n", "<leader>fs", "<cmd>Telescope git_status<cr>", { desc = "Git status" }) keymap.set("n", "<leader>gs", "<cmd>Telescope git_status<cr>", { desc = "Git status" })
-- Todos -- Todos
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" }) keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })

View File

@@ -42,8 +42,34 @@ opt.relativenumber = true -- Show relative line numbers
opt.cursorline = true -- Highlight current line opt.cursorline = true -- Highlight current line
opt.cursorcolumn = false -- Don't highlight current column opt.cursorcolumn = false -- Don't highlight current column
opt.signcolumn = "yes" -- Always show sign column opt.signcolumn = "yes" -- Always show sign column
opt.wrap = false -- Don't wrap lines
-- =============================================================================
-- NATIVE AUTO WRAPPER CONFIGURATION
-- =============================================================================
-- Text wrapping settings
opt.wrap = true -- Enable line wrapping
opt.linebreak = true -- Break lines at word boundaries opt.linebreak = true -- Break lines at word boundaries
opt.breakindent = true -- Preserve indentation in wrapped lines
opt.showbreak = "" -- Show break indicator
opt.breakindentopt = "shift:2" -- Indent wrapped lines by 2 spaces
-- Text width and formatting
opt.textwidth = 80 -- Set text width for auto-wrapping
opt.colorcolumn = "80" -- Show column at 80 characters
opt.formatoptions = "jcroqlnt" -- Format options for auto-wrapping
-- Auto-wrap specific settings
opt.formatoptions:append("t") -- Auto-wrap text using textwidth
opt.formatoptions:append("c") -- Auto-wrap comments using textwidth
opt.formatoptions:append("r") -- Auto-wrap comments when pressing Enter
opt.formatoptions:append("o") -- Auto-wrap comments when pressing 'o' or 'O'
opt.formatoptions:append("q") -- Allow formatting of comments with 'gq'
opt.formatoptions:append("l") -- Long lines are not broken in insert mode
opt.formatoptions:append("n") -- Recognize numbered lists
opt.formatoptions:append("j") -- Remove comment leader when joining lines
-- Scroll settings for wrapped text
opt.scrolloff = 8 -- Keep 8 lines above/below cursor opt.scrolloff = 8 -- Keep 8 lines above/below cursor
opt.sidescrolloff = 8 -- Keep 8 columns left/right of cursor opt.sidescrolloff = 8 -- Keep 8 columns left/right of cursor
opt.showmatch = true -- Show matching brackets opt.showmatch = true -- Show matching brackets
@@ -141,3 +167,50 @@ local disabled_built_ins = {
for _, plugin in pairs(disabled_built_ins) do for _, plugin in pairs(disabled_built_ins) do
g["loaded_" .. plugin] = 1 g["loaded_" .. plugin] = 1
end end
-- =============================================================================
-- AUTO WRAPPER AUTOCMDS
-- =============================================================================
-- Set up auto-wrapping for different file types
vim.api.nvim_create_autocmd("FileType", {
pattern = { "text", "markdown", "gitcommit", "mail" },
callback = function()
vim.opt_local.textwidth = 80
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.formatoptions:append("t") -- Auto-wrap text
end,
})
-- Set up auto-wrapping for code files
vim.api.nvim_create_autocmd("FileType", {
pattern = { "lua", "javascript", "typescript", "python", "java", "cpp", "c", "rust", "go" },
callback = function()
vim.opt_local.textwidth = 100 -- Longer lines for code
vim.opt_local.formatoptions:append("c") -- Auto-wrap comments
vim.opt_local.formatoptions:append("r") -- Auto-wrap comments with leader
vim.opt_local.formatoptions:append("o") -- Auto-wrap comments with 'o'
vim.opt_local.formatoptions:append("q") -- Allow formatting of comments with 'gq'
end,
})
-- Set up auto-wrapping for documentation files
vim.api.nvim_create_autocmd("FileType", {
pattern = { "help", "man" },
callback = function()
vim.opt_local.textwidth = 78
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.formatoptions:append("t") -- Auto-wrap text
end,
})
-- Set up auto-wrapping for configuration files
vim.api.nvim_create_autocmd("FileType", {
pattern = { "conf", "config", "ini", "toml", "yaml", "json" },
callback = function()
vim.opt_local.textwidth = 80
vim.opt_local.formatoptions:append("c") -- Auto-wrap comments
end,
})

View File

@@ -1,6 +1,7 @@
return { return {
"goolord/alpha-nvim", "goolord/alpha-nvim",
event = "VimEnter", event = "VimEnter",
enable = true,
config = function() config = function()
local alpha = require("alpha") local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard") local dashboard = require("alpha.themes.dashboard")

View File

@@ -1,16 +1,24 @@
return { return {
"rmagatti/auto-session", "rmagatti/auto-session",
config = function() event = "VeryLazy",
local auto_session = require("auto-session") opts = {
log_level = "error",
require("auto-session").setup({ auto_session_suppress_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" },
auto_restore = false, auto_session_enable_last_session = false,
suppressed_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" }, auto_session_root_dir = vim.fn.stdpath("data") .. "/sessions/",
}) auto_session_enabled = true,
auto_save_enabled = true,
local keymap = vim.keymap auto_restore_enabled = false,
auto_session_use_git_branch = true,
keymap.set("n", "<leader>wr", "<cmd>SessionRestore<CR>", { desc = "Restore session for cwd" }) -- restore last workspace session for current directory auto_session_create_enabled = true,
keymap.set("n", "<leader>ws", "<cmd>SessionSave<CR>", { desc = "Save session for auto session root dir" }) -- save workspace session for current working directory auto_session_enable_last_session = false,
-- Don't auto-restore on startup to allow alpha to show
auto_session_restore_on_startup = false,
},
config = function(_, opts)
require("auto-session").setup(opts)
-- Set recommended sessionoptions
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
end, end,
} }

View File

@@ -52,6 +52,10 @@ return {
toggle = { enabled = true }, toggle = { enabled = true },
words = { enabled = true }, words = { enabled = true },
}) })
-- Set up vim.ui.input and vim.ui.select for snacks
vim.ui.input = require("snacks.input").input
vim.ui.select = require("snacks.picker").select
end, end,
}, },
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons

View File

@@ -6,7 +6,6 @@ return {
"jay-babu/mason-nvim-dap.nvim", "jay-babu/mason-nvim-dap.nvim",
"mfussenegger/nvim-dap-python", "mfussenegger/nvim-dap-python",
"theHamsta/nvim-dap-virtual-text", "theHamsta/nvim-dap-virtual-text",
"nvim-telescope/telescope-dap.nvim",
"Weissle/persistent-breakpoints.nvim", "Weissle/persistent-breakpoints.nvim",
{ {
"nvim-neotest/neotest", "nvim-neotest/neotest",
@@ -136,12 +135,6 @@ return {
end, 200) end, 200)
end, { desc = "🧼 Reset DAP UI Layout" }) end, { desc = "🧼 Reset DAP UI Layout" })
-- 🔭 Telescope Integration
require("telescope").load_extension("dap")
keymap("n", "<leader>dcf", "<cmd>Telescope dap configurations<cr>", { desc = "🔭 DAP Configs" })
keymap("n", "<leader>dcb", "<cmd>Telescope dap list_breakpoints<cr>", { desc = "🧷 List Breakpoints" })
keymap("n", "<leader>dco", "<cmd>Telescope dap commands<cr>", { desc = "⚙️ DAP Commands" })
-- 🧿 Sign Icons -- 🧿 Sign Icons
for name, icon in pairs({ for name, icon in pairs({
DapBreakpoint = "🔴", DapBreakpoint = "🔴",

View File

@@ -0,0 +1,187 @@
-- Temporarily disabled to fix database error
-- return {
-- -- =============================================================================
-- -- DATABASE PLUGINS
-- -- =============================================================================
-- -- Database client for Neovim
-- {
-- "tpope/vim-dadbod",
-- dependencies = {
-- "kristijanhusak/vim-dadbod-ui",
-- "kristijanhusak/vim-dadbod-completion",
-- },
-- config = function()
-- -- Dadbod UI configuration
-- vim.g.db_ui_use_nerd_fonts = 1
-- vim.g.db_ui_winwidth = 30
-- vim.g.db_ui_winposition = "right"
-- vim.g.db_ui_show_help = 0
-- vim.g.db_ui_auto_execute_table_helpers = 1
-- -- Disable auto-connection to prevent errors
-- vim.g.db_ui_auto_execute_table_helpers = 0
-- vim.g.db_ui_show_database_icon = 0
-- vim.g.db_ui_winwidth = 30
-- vim.g.db_ui_winposition = "right"
-- vim.g.db_ui_use_nerd_fonts = 1
-- vim.g.db_ui_show_help = 0
-- -- Disable automatic database loading
-- vim.g.db_ui_auto_execute_table_helpers = 0
-- vim.g.db_ui_show_database_icon = 0
-- vim.g.db_ui_auto_execute_table_helpers = 0
-- vim.g.db_ui_show_database_icon = 0
-- vim.g.db_ui_table_helpers = {
-- sqlite = {
-- count = "SELECT COUNT(*) FROM {table}",
-- explain = "EXPLAIN QUERY PLAN {last_query}",
-- indexes = "PRAGMA index_list({table})",
-- show = "PRAGMA table_info({table})",
-- size = "SELECT page_count * page_size as size FROM pragma_page_count(), pragma_page_size() WHERE name = '{table}'",
-- },
-- mysql = {
-- count = "SELECT COUNT(*) FROM {table}",
-- explain = "EXPLAIN {last_query}",
-- indexes = "SHOW INDEX FROM {table}",
-- show = "SHOW CREATE TABLE {table}",
-- size = "SELECT ROUND(((data_length + index_length) / 1024 / 1024), 2) AS 'Size (MB)' FROM information_schema.TABLES WHERE table_schema = '{database}' AND table_name = '{table}'",
-- },
-- postgresql = {
-- count = "SELECT COUNT(*) FROM {table}",
-- explain = "EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) {last_query}",
-- indexes = "SELECT indexname, indexdef FROM pg_indexes WHERE tablename = '{table}'",
-- show = "\\d {table}",
-- size = "SELECT pg_size_pretty(pg_total_relation_size('{table}'))",
-- },
-- redis = {
-- count = "LLEN {table}",
-- explain = "SLOWLOG GET 10",
-- indexes = "KEYS *",
-- show = "TYPE {table}",
-- size = "MEMORY USAGE {table}",
-- },
-- }
-- -- Dadbod completion
-- vim.g.vim_dadbod_completion_mark = "📊"
-- -- Configure database adapters
-- vim.g.db_adapter_sqlite = 'sqlite3'
-- vim.g.db_adapter_mysql = 'mysql'
-- vim.g.db_adapter_postgresql = 'psql'
-- vim.g.db_adapter_redis = 'redis-cli'
-- -- Disable automatic database connections
-- vim.g.db_ui_auto_execute_table_helpers = 0
-- vim.g.db_ui_show_database_icon = 0
-- end,
-- },
-- -- SQL formatting and syntax highlighting
-- {
-- "b4winckler/vim-objc",
-- ft = { "sql", "mysql", "postgresql" },
-- },
-- -- SQL formatting with sqlparse
-- {
-- "b4winckler/vim-objc",
-- ft = { "sql" },
-- config = function()
-- vim.g.sqlformat_command = "sqlformat"
-- vim.g.sqlformat_options = "-r -k upper"
-- end,
-- },
-- }
-- Return empty table to prevent errors
return {
-- =============================================================================
-- DATABASE PLUGINS
-- =============================================================================
-- Database client for Neovim
{
"tpope/vim-dadbod",
dependencies = {
"kristijanhusak/vim-dadbod-ui",
"kristijanhusak/vim-dadbod-completion",
},
config = function()
-- Disable all automatic database operations
vim.g.db_ui_auto_execute_table_helpers = 0
vim.g.db_ui_show_database_icon = 0
vim.g.db_ui_use_nerd_fonts = 1
vim.g.db_ui_winwidth = 30
vim.g.db_ui_winposition = "right"
vim.g.db_ui_show_help = 0
-- Disable automatic database loading completely
vim.g.db_ui_auto_execute_table_helpers = 0
vim.g.db_ui_show_database_icon = 0
-- Configure table helpers (only used when manually triggered)
vim.g.db_ui_table_helpers = {
sqlite = {
count = "SELECT COUNT(*) FROM {table}",
explain = "EXPLAIN QUERY PLAN {last_query}",
indexes = "PRAGMA index_list({table})",
show = "PRAGMA table_info({table})",
size = "SELECT page_count * page_size as size FROM pragma_page_count(), pragma_page_size() WHERE name = '{table}'",
},
mysql = {
count = "SELECT COUNT(*) FROM {table}",
explain = "EXPLAIN {last_query}",
indexes = "SHOW INDEX FROM {table}",
show = "SHOW CREATE TABLE {table}",
size = "SELECT ROUND(((data_length + index_length) / 1024 / 1024), 2) AS 'Size (MB)' FROM information_schema.TABLES WHERE table_schema = '{database}' AND table_name = '{table}'",
},
postgresql = {
count = "SELECT COUNT(*) FROM {table}",
explain = "EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) {last_query}",
indexes = "SELECT indexname, indexdef FROM pg_indexes WHERE tablename = '{table}'",
show = "\\d {table}",
size = "SELECT pg_size_pretty(pg_total_relation_size('{table}'))",
},
redis = {
count = "LLEN {table}",
explain = "SLOWLOG GET 10",
indexes = "KEYS *",
show = "TYPE {table}",
size = "MEMORY USAGE {table}",
},
}
-- Dadbod completion
vim.g.vim_dadbod_completion_mark = "📊"
-- Configure database adapters
vim.g.db_adapter_sqlite = 'sqlite3'
vim.g.db_adapter_mysql = 'mysql'
vim.g.db_adapter_postgresql = 'psql'
vim.g.db_adapter_redis = 'redis-cli'
-- Ensure no automatic connections
vim.g.db_ui_auto_execute_table_helpers = 0
vim.g.db_ui_show_database_icon = 0
end,
},
-- SQL formatting and syntax highlighting
{
"b4winckler/vim-objc",
ft = { "sql", "mysql", "postgresql" },
},
-- SQL formatting with sqlparse
{
"b4winckler/vim-objc",
ft = { "sql" },
config = function()
vim.g.sqlformat_command = "sqlformat"
vim.g.sqlformat_options = "-r -k upper"
end,
},
}

View File

@@ -1,4 +1,23 @@
return { -- Auto-load all plugin files from the plugins directory
"nvim-lua/plenary.nvim", local function load_all_plugins()
"christoomey/vim-tmux-navigator", local plugins = {}
}
-- Add basic plugins
table.insert(plugins, "nvim-lua/plenary.nvim")
table.insert(plugins, "christoomey/vim-tmux-navigator")
-- Get all .lua files in the plugins directory (excluding init.lua and lsp directory)
local plugin_path = vim.fn.stdpath("config") .. "/lua/cargdev/plugins"
local files = vim.fn.globpath(plugin_path, "*.lua", false, true)
for _, file in ipairs(files) do
local filename = vim.fn.fnamemodify(file, ":t:r") -- Get filename without extension
if filename ~= "init" then -- Skip init.lua itself
table.insert(plugins, { import = "cargdev.plugins." .. filename })
end
end
return plugins
end
return load_all_plugins()

View File

@@ -29,6 +29,9 @@ return {
"pyright", "pyright",
"svelte", "svelte",
"tailwindcss", "tailwindcss",
-- Database language servers
"sqls", -- SQL language server
"mongols", -- MongoDB language server
}, },
}) })
@@ -71,24 +74,67 @@ return {
pyright = {}, pyright = {},
svelte = {}, svelte = {},
tailwindcss = {}, tailwindcss = {},
-- Database servers
sqls = {
settings = {
sqls = {
connections = {
{
name = "PostgreSQL",
adapter = "postgresql",
host = "localhost",
port = 5432,
database = "postgres",
username = "postgres",
password = "",
},
{
name = "MySQL",
adapter = "mysql",
host = "localhost",
port = 3306,
database = "mysql",
username = "root",
password = "",
},
},
},
},
},
mongols = {
settings = {
mongols = {
connectionString = "mongodb://localhost:27017",
maxNumberOfProblems = 100,
},
},
},
} }
for server, config in pairs(servers) do -- Set up all LSP servers
config.capabilities = capabilities for server_name, server_config in pairs(servers) do
lspconfig[server].setup(config) lspconfig[server_name].setup({
capabilities = capabilities,
settings = server_config.settings or {},
})
end end
-- ✅ Correct way to setup typescript-tools -- Set up additional LSP servers that might not be in mason-lspconfig
require("typescript-tools").setup({ lspconfig.css_variables.setup({
capabilities = capabilities, capabilities = capabilities,
-- optional settings:
-- settings = {
-- tsserver_plugins = {},
-- tsserver_max_memory = 4096,
-- }
}) })
-- LSP keymaps are now handled in the main keymaps.lua file lspconfig.cssmodules_ls.setup({
-- This ensures consistent keymaps across all file types capabilities = capabilities,
})
-- Set up TypeScript Tools
require("typescript-tools").setup({
settings = {
tsserver_plugins = {},
tsserver_file_preferences = {},
tsserver_format_options = {},
},
})
end, end,
} }

View File

@@ -7,7 +7,6 @@ return {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
"nvim-telescope/telescope-dap.nvim", "nvim-telescope/telescope-dap.nvim",
"nvim-telescope/telescope-session-lens.nvim",
}, },
config = function() config = function()
local telescope = require("telescope") local telescope = require("telescope")
@@ -51,38 +50,30 @@ return {
-- Load extensions -- Load extensions
telescope.load_extension("fzf") telescope.load_extension("fzf")
telescope.load_extension("dap") telescope.load_extension("dap")
telescope.load_extension("session-lens")
-- set keymaps -- set keymaps
local keymap = vim.keymap -- for conciseness local keymap = vim.keymap -- for conciseness
-- File navigation -- File navigation
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" }) keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Find files" })
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" }) keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Live grep" })
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" }) keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Grep string" })
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" }) keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Recent files" })
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })
-- LSP navigation (these work when LSP is attached)
keymap.set("n", "<leader>fd", "<cmd>Telescope lsp_definitions<cr>", { desc = "Go to definition" })
keymap.set("n", "<leader>fi", "<cmd>Telescope lsp_implementations<cr>", { desc = "Go to implementation" })
keymap.set("n", "<leader>fr", "<cmd>Telescope lsp_references<cr>", { desc = "Show references" })
keymap.set("n", "<leader>ft", "<cmd>Telescope lsp_type_definitions<cr>", { desc = "Go to type definition" })
keymap.set("n", "<leader>fs", "<cmd>Telescope lsp_document_symbols<cr>", { desc = "Document symbols" })
keymap.set("n", "<leader>fw", "<cmd>Telescope lsp_workspace_symbols<cr>", { desc = "Workspace symbols" })
keymap.set("n", "<leader>fd", "<cmd>Telescope diagnostics<cr>", { desc = "Show diagnostics" })
-- Buffer and session management -- Buffer and session management
keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>", { desc = "Find buffers" }) keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>", { desc = "Find buffers" })
keymap.set("n", "<leader>fh", "<cmd>Telescope help_tags<cr>", { desc = "Help tags" }) keymap.set("n", "<leader>fh", "<cmd>Telescope help_tags<cr>", { desc = "Help tags" })
keymap.set("n", "<leader>fm", "<cmd>Telescope marks<cr>", { desc = "Find marks" }) keymap.set("n", "<leader>fm", "<cmd>Telescope marks<cr>", { desc = "Find marks" })
keymap.set("n", "<leader>fk", "<cmd>Telescope keymaps<cr>", { desc = "Find keymaps" }) keymap.set("n", "<leader>fk", "<cmd>Telescope keymaps<cr>", { desc = "Find keymaps" })
keymap.set("n", "<leader>fc", "<cmd>Telescope commands<cr>", { desc = "Find commands" }) keymap.set("n", "<leader>fC", "<cmd>Telescope commands<cr>", { desc = "Find commands" })
-- Git -- Git
keymap.set("n", "<leader>fg", "<cmd>Telescope git_commits<cr>", { desc = "Git commits" }) keymap.set("n", "<leader>fg", "<cmd>Telescope git_commits<cr>", { desc = "Git commits" })
keymap.set("n", "<leader>fG", "<cmd>Telescope git_bcommits<cr>", { desc = "Git buffer commits" }) keymap.set("n", "<leader>fG", "<cmd>Telescope git_bcommits<cr>", { desc = "Git buffer commits" })
keymap.set("n", "<leader>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" }) keymap.set("n", "<leader>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" })
keymap.set("n", "<leader>fs", "<cmd>Telescope git_status<cr>", { desc = "Git status" }) keymap.set("n", "<leader>gs", "<cmd>Telescope git_status<cr>", { desc = "Git status" })
-- Todos
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })
end, end,
} }