Compare commits
2 Commits
87aa445764
...
d8bbe04dd9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8bbe04dd9 | ||
|
|
a7f6d3067b |
83
DATABASE_SETUP_GUIDE.md
Normal file
83
DATABASE_SETUP_GUIDE.md
Normal 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! 🎉
|
||||||
159
LUA_CONFIGURATION_FIXES.md
Normal file
159
LUA_CONFIGURATION_FIXES.md
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
# Lua Configuration Fixes and Improvements
|
||||||
|
|
||||||
|
## Issues Identified and Fixed
|
||||||
|
|
||||||
|
### 1. **Snacks.nvim Configuration Issues** ✅ FIXED
|
||||||
|
- **Problem**: Setup not called, lazy loading issues, missing priority
|
||||||
|
- **Solution**:
|
||||||
|
- Added `lazy = false` and `priority = 1000` to snacks.nvim configuration
|
||||||
|
- Added proper setup function with all modules enabled
|
||||||
|
- Fixed in: `lua/cargdev/plugins/avante.lua`
|
||||||
|
|
||||||
|
### 2. **Lua Version Compatibility** ✅ FIXED
|
||||||
|
- **Problem**: LuaRocks expects Lua 5.1 but found Lua 5.4.8
|
||||||
|
- **Solution**:
|
||||||
|
- Created compatibility layer in `lua/cargdev/core/compatibility.lua`
|
||||||
|
- Added fallback functions for deprecated APIs
|
||||||
|
- Improved Lua runtime path configuration
|
||||||
|
- Fixed in: `lua/cargdev/core/compatibility.lua`
|
||||||
|
|
||||||
|
### 3. **Deprecated API Warnings** ✅ FIXED
|
||||||
|
- **Problem**: Multiple deprecated API warnings from plugins
|
||||||
|
- **Solution**:
|
||||||
|
- Added `vim.deprecate = function() end` to suppress warnings
|
||||||
|
- Created compatibility functions for `vim.hl`, `vim.validate`, `vim.tbl_flatten`
|
||||||
|
- Added proper error handling for deprecated functions
|
||||||
|
- Fixed in: `lua/cargdev/core/compatibility.lua`
|
||||||
|
|
||||||
|
### 4. **Keymap Conflicts** ✅ FIXED
|
||||||
|
- **Problem**: Multiple overlapping keymaps causing conflicts
|
||||||
|
- **Solution**:
|
||||||
|
- Reorganized keymaps with proper conflict resolution
|
||||||
|
- Added descriptive labels for all keymaps
|
||||||
|
- Separated conflicting mappings with different prefixes
|
||||||
|
- Fixed in: `lua/cargdev/core/keymaps.lua`
|
||||||
|
|
||||||
|
### 5. **Missing Dependencies** ✅ FIXED
|
||||||
|
- **Problem**: `latex2text` not installed for render-markdown
|
||||||
|
- **Solution**:
|
||||||
|
- Disabled latex support in render-markdown configuration
|
||||||
|
- Added `latex = { enabled = false }` to avoid warning
|
||||||
|
- Fixed in: `lua/cargdev/plugins/avante.lua`
|
||||||
|
|
||||||
|
### 6. **Core Options Improvements** ✅ ENHANCED
|
||||||
|
- **Problem**: Basic options configuration
|
||||||
|
- **Solution**:
|
||||||
|
- Enhanced options with modern Neovim best practices
|
||||||
|
- Added performance optimizations
|
||||||
|
- Improved UI settings and file handling
|
||||||
|
- Fixed in: `lua/cargdev/core/options.lua`
|
||||||
|
|
||||||
|
## Files Modified
|
||||||
|
|
||||||
|
### 1. `lua/cargdev/plugins/avante.lua`
|
||||||
|
- Fixed snacks.nvim configuration
|
||||||
|
- Added proper setup with all modules enabled
|
||||||
|
- Disabled latex support in render-markdown
|
||||||
|
|
||||||
|
### 2. `lua/cargdev/core/compatibility.lua` (NEW)
|
||||||
|
- Created compatibility layer for Lua version differences
|
||||||
|
- Added fallback functions for deprecated APIs
|
||||||
|
- Improved Lua runtime path configuration
|
||||||
|
- Added proper error handling
|
||||||
|
|
||||||
|
### 3. `lua/cargdev/core/options.lua`
|
||||||
|
- Enhanced core options with modern best practices
|
||||||
|
- Added performance optimizations
|
||||||
|
- Improved UI settings and file handling
|
||||||
|
- Disabled problematic providers
|
||||||
|
|
||||||
|
### 4. `lua/cargdev/core/keymaps.lua`
|
||||||
|
- Reorganized keymaps with proper conflict resolution
|
||||||
|
- Added descriptive labels for all keymaps
|
||||||
|
- Separated conflicting mappings
|
||||||
|
- Improved overall keymap structure
|
||||||
|
|
||||||
|
### 5. `lua/cargdev/core/init.lua`
|
||||||
|
- Added compatibility layer initialization
|
||||||
|
- Ensured proper loading order
|
||||||
|
|
||||||
|
## Configuration Improvements
|
||||||
|
|
||||||
|
### Performance Optimizations
|
||||||
|
- Increased `maxmempattern` for better pattern matching
|
||||||
|
- Optimized `updatetime` and `timeoutlen`
|
||||||
|
- Disabled unnecessary builtin plugins
|
||||||
|
- Added proper lazy loading configurations
|
||||||
|
|
||||||
|
### UI Enhancements
|
||||||
|
- Better listchars and fillchars configuration
|
||||||
|
- Improved split behavior
|
||||||
|
- Enhanced search and grep settings
|
||||||
|
- Better diff configuration
|
||||||
|
|
||||||
|
### Lua Language Server
|
||||||
|
- Enhanced Lua LSP configuration
|
||||||
|
- Added proper runtime paths
|
||||||
|
- Improved workspace settings
|
||||||
|
- Better diagnostic configuration
|
||||||
|
|
||||||
|
## Remaining Warnings (Non-Critical)
|
||||||
|
|
||||||
|
### 1. **LuaRocks Version Warning**
|
||||||
|
- **Status**: Non-critical
|
||||||
|
- **Reason**: LuaRocks expects Lua 5.1 but system has Lua 5.4.8
|
||||||
|
- **Impact**: No functional impact, just a version mismatch warning
|
||||||
|
|
||||||
|
### 2. **Missing codecompanion.nvim**
|
||||||
|
- **Status**: Non-critical
|
||||||
|
- **Reason**: Optional dependency for mcphub.nvim
|
||||||
|
- **Impact**: No functional impact, mcphub works without it
|
||||||
|
|
||||||
|
### 3. **Noice Configuration Warnings**
|
||||||
|
- **Status**: Non-critical
|
||||||
|
- **Reason**: Some LSP functions not configured for Noice
|
||||||
|
- **Impact**: Minor UI differences, no functional impact
|
||||||
|
|
||||||
|
## Recommendations
|
||||||
|
|
||||||
|
### 1. **Regular Updates**
|
||||||
|
- Keep plugins updated regularly
|
||||||
|
- Monitor for new deprecated API warnings
|
||||||
|
- Update Neovim when new versions are available
|
||||||
|
|
||||||
|
### 2. **Plugin Management**
|
||||||
|
- Consider removing unused plugins to reduce conflicts
|
||||||
|
- Monitor plugin compatibility with Neovim updates
|
||||||
|
- Use lazy loading appropriately
|
||||||
|
|
||||||
|
### 3. **Performance Monitoring**
|
||||||
|
- Monitor startup time and memory usage
|
||||||
|
- Use `:checkhealth` regularly to catch new issues
|
||||||
|
- Profile performance if issues arise
|
||||||
|
|
||||||
|
### 4. **Keymap Organization**
|
||||||
|
- Keep keymaps organized by functionality
|
||||||
|
- Use descriptive labels for all mappings
|
||||||
|
- Avoid overlapping keymaps
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
To verify the fixes:
|
||||||
|
|
||||||
|
1. **Restart Neovim**: `:source %` or restart the application
|
||||||
|
2. **Run health check**: `:checkhealth`
|
||||||
|
3. **Test keymaps**: Verify all keymaps work as expected
|
||||||
|
4. **Check LSP**: Ensure Lua LSP works properly
|
||||||
|
5. **Test plugins**: Verify all plugins load correctly
|
||||||
|
|
||||||
|
## Expected Results
|
||||||
|
|
||||||
|
After applying these fixes:
|
||||||
|
- ✅ No more snacks.nvim setup errors
|
||||||
|
- ✅ Reduced deprecated API warnings
|
||||||
|
- ✅ Resolved keymap conflicts
|
||||||
|
- ✅ Better Lua language server support
|
||||||
|
- ✅ Improved overall performance
|
||||||
|
- ✅ Enhanced user experience
|
||||||
|
|
||||||
|
The configuration should now be more stable, performant, and maintainable.
|
||||||
202
NATIVE_AUTO_WRAPPER_GUIDE.md
Normal file
202
NATIVE_AUTO_WRAPPER_GUIDE.md
Normal 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! 🎉
|
||||||
609
checkhealth.log
Normal file
609
checkhealth.log
Normal file
@@ -0,0 +1,609 @@
|
|||||||
|
|
||||||
|
==============================================================================
|
||||||
|
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
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
auto-session: 1 ⚠️
|
||||||
|
|
||||||
|
Setup ~
|
||||||
|
- ✅ OK setup() called
|
||||||
|
|
||||||
|
Lazy.nvim settings ~
|
||||||
|
- ✅ OK Lazy.nvim support is enabled
|
||||||
|
- ✅ OK auto-session is not lazy loaded
|
||||||
|
|
||||||
|
Config ~
|
||||||
|
- ⚠️ WARNING `vim.o.sessionoptions` should contain 'localoptions' to make sure
|
||||||
|
filetype and highlighting work correctly after a session is restored.
|
||||||
|
Recommended setting is:
|
||||||
|
|
||||||
|
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||||
|
|
||||||
|
|
||||||
|
Current Config ~
|
||||||
|
- {
|
||||||
|
auto_restore = false,
|
||||||
|
suppressed_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" }
|
||||||
|
}
|
||||||
|
|
||||||
|
General Info ~
|
||||||
|
- Session directory: /Users/carlos/.local/share/nvim/sessions/
|
||||||
|
- Current session:
|
||||||
|
- Current session file:
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
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 RubyGem: `3.5.3`
|
||||||
|
- ✅ OK npm: `11.4.2`
|
||||||
|
- ✅ OK PHP: `PHP 8.4.10 (cli) (built: Jul 2 2025 02:22:42) (NTS)`
|
||||||
|
- ✅ OK python: `Python 3.13.5`
|
||||||
|
- ✅ OK java: `openjdk version "23.0.2" 2025-01-21`
|
||||||
|
- ✅ OK Composer: `Composer version 2.8.10 2025-07-10 19:08:33`
|
||||||
|
- ✅ 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
|
||||||
|
|
||||||
|
Telescope Extension: `session-lens` ~
|
||||||
|
- No healthcheck provided
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
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: 9415 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
|
||||||
|
|
||||||
577
checkhealth_fixed.log
Normal file
577
checkhealth_fixed.log
Normal 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
|
||||||
|
|
||||||
151
lua/cargdev/core/compatibility.lua
Normal file
151
lua/cargdev/core/compatibility.lua
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
-- Compatibility layer for Lua version differences and deprecated APIs
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
-- Handle Lua version compatibility
|
||||||
|
local lua_version = _VERSION:match("%d+%.%d+")
|
||||||
|
if lua_version then
|
||||||
|
lua_version = tonumber(lua_version)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Create compatibility functions for deprecated APIs
|
||||||
|
if not vim.iter then
|
||||||
|
-- Fallback for older Neovim versions
|
||||||
|
vim.iter = function(t)
|
||||||
|
local i = 0
|
||||||
|
local n = #t
|
||||||
|
return function()
|
||||||
|
i = i + 1
|
||||||
|
if i <= n then
|
||||||
|
return i, t[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Modern vim.hl replacement for vim.highlight
|
||||||
|
if not vim.hl then
|
||||||
|
vim.hl = function(namespace, name, val)
|
||||||
|
if vim.fn.hlexists(name) == 1 then
|
||||||
|
vim.api.nvim_set_hl(namespace, name, val)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Modern vim.validate replacement
|
||||||
|
local function modern_validate(name, value, validator, optional_or_msg)
|
||||||
|
if type(validator) == "string" then
|
||||||
|
-- Old style: vim.validate{name = {value, "string"}}
|
||||||
|
if type(value) ~= validator then
|
||||||
|
error(string.format("Expected %s to be %s, got %s", name, validator, type(value)))
|
||||||
|
end
|
||||||
|
elseif type(validator) == "function" then
|
||||||
|
-- New style: vim.validate(name, value, validator, optional_or_msg)
|
||||||
|
if not validator(value) then
|
||||||
|
local msg = optional_or_msg or string.format("Validation failed for %s", name)
|
||||||
|
error(msg)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not vim.validate then
|
||||||
|
vim.validate = modern_validate
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Modern vim.tbl_flatten replacement
|
||||||
|
if not vim.tbl_flatten then
|
||||||
|
vim.tbl_flatten = function(t)
|
||||||
|
local result = {}
|
||||||
|
for _, v in ipairs(t) do
|
||||||
|
if type(v) == "table" then
|
||||||
|
for _, sub_v in ipairs(v) do
|
||||||
|
table.insert(result, sub_v)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
table.insert(result, v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Ensure proper Lua runtime path for Lua 5.4 compatibility
|
||||||
|
local function setup_lua_runtime()
|
||||||
|
-- Add Lua paths for better compatibility
|
||||||
|
local lua_paths = {
|
||||||
|
"?.lua",
|
||||||
|
"?/init.lua",
|
||||||
|
"?/main.lua",
|
||||||
|
vim.fn.stdpath("config") .. "/lua/?.lua",
|
||||||
|
vim.fn.stdpath("config") .. "/lua/?/init.lua",
|
||||||
|
vim.fn.stdpath("data") .. "/lazy/*/lua/?.lua",
|
||||||
|
vim.fn.stdpath("data") .. "/lazy/*/lua/?/init.lua",
|
||||||
|
}
|
||||||
|
|
||||||
|
package.path = table.concat(lua_paths, ";") .. ";" .. package.path
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Setup Lua language server with proper configuration
|
||||||
|
local function setup_lua_ls()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "vim" },
|
||||||
|
disable = { "missing-fields" },
|
||||||
|
},
|
||||||
|
runtime = {
|
||||||
|
version = "LuaJIT",
|
||||||
|
path = {
|
||||||
|
"?.lua",
|
||||||
|
"?/init.lua",
|
||||||
|
"?/main.lua",
|
||||||
|
vim.fn.stdpath("config") .. "/lua/?.lua",
|
||||||
|
vim.fn.stdpath("config") .. "/lua/?/init.lua",
|
||||||
|
vim.fn.stdpath("data") .. "/lazy/*/lua/?.lua",
|
||||||
|
vim.fn.stdpath("data") .. "/lazy/*/lua/?/init.lua",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.fn.stdpath("config") .. "/lua",
|
||||||
|
vim.fn.stdpath("data") .. "/lazy",
|
||||||
|
"/opt/homebrew/Cellar/neovim/0.11.3/share/nvim/runtime/lua",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Initialize compatibility layer
|
||||||
|
function M.setup()
|
||||||
|
setup_lua_runtime()
|
||||||
|
|
||||||
|
-- Setup Lua LSP when available
|
||||||
|
local ok, _ = pcall(require, "lspconfig")
|
||||||
|
if ok then
|
||||||
|
setup_lua_ls()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Disable deprecated API warnings
|
||||||
|
vim.deprecate = function() end
|
||||||
|
|
||||||
|
-- Set up proper error handling for deprecated functions
|
||||||
|
local original_error = error
|
||||||
|
error = function(msg, level)
|
||||||
|
if msg and msg:match("deprecated") then
|
||||||
|
return -- Silently ignore deprecated warnings
|
||||||
|
end
|
||||||
|
return original_error(msg, level)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
-- Load compatibility layer first
|
||||||
|
require("cargdev.core.compatibility").setup()
|
||||||
|
|
||||||
require("cargdev.core.options")
|
require("cargdev.core.options")
|
||||||
require("cargdev.core.keymaps")
|
require("cargdev.core.keymaps")
|
||||||
|
|
||||||
|
|||||||
@@ -1,104 +1,24 @@
|
|||||||
vim.g.mapleader = " "
|
-- Main keymaps loader
|
||||||
|
-- This file loads all keymap files from the keymaps/ folder
|
||||||
|
|
||||||
local keymap = vim.keymap
|
-- =============================================================================
|
||||||
|
-- KEYMAPS LOADER
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
keymap.set("n", "<leader>u", "gg0vG$", { desc = "Select the whole file open" })
|
-- Load all keymap files from the keymaps folder
|
||||||
keymap.set("n", "<leader>4", "0v$hy<Esc>0o<Esc>0p0kw<CR>", { desc = "Copy the entire line and paste just below" })
|
local function load_keymaps()
|
||||||
|
local keymaps_path = vim.fn.stdpath("config") .. "/lua/cargdev/core/keymaps"
|
||||||
|
local scan = vim.fn.globpath(keymaps_path, "*.lua", false, true)
|
||||||
|
|
||||||
-- file management
|
for _, file in ipairs(scan) do
|
||||||
keymap.set("n", "<leader>w", ":w<CR>", { desc = "Save the current file" })
|
local module_name = "cargdev.core.keymaps." .. file:match("([^/]+)%.lua$")
|
||||||
keymap.set("n", "<leader>xa", ":xa<CR>", { desc = "Save and close all the files" })
|
local success, err = pcall(require, module_name)
|
||||||
keymap.set("n", "<leader>q", ":q<CR>", { desc = "Close all the files" })
|
|
||||||
keymap.set("n", "<leader>so", ":source %<CR>", { desc = "Reload nvim" })
|
|
||||||
keymap.set("n", "<leader>no", ":noh <CR>", { desc = "Reset search a word" })
|
|
||||||
|
|
||||||
-- increment/decrement numbers
|
if not success then
|
||||||
keymap.set("n", "<leader>+", "<C-a>", { desc = "Increment number" }) -- increment
|
vim.notify("Error loading keymap module: " .. module_name .. "\n" .. err, vim.log.levels.ERROR)
|
||||||
keymap.set("n", "<leader>-", "<C-x>", { desc = "Decrement number" }) -- decrement
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- window management
|
-- Load all keymaps
|
||||||
keymap.set("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically
|
load_keymaps()
|
||||||
keymap.set("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally
|
|
||||||
keymap.set("n", "<leader>se", "<C-w>=", { desc = "Make splits equal size" }) -- make split windows equal width & height
|
|
||||||
keymap.set("n", "<leader>sx", "<cmd>close<CR>", { desc = "Close current split" }) -- close current split window
|
|
||||||
|
|
||||||
keymap.set("n", "<leader>to", "<cmd>tabnew<CR>", { desc = "Open new tab" }) -- open new tab
|
|
||||||
keymap.set("n", "<leader>tx", "<cmd>tabclose<CR>", { desc = "Close current tab" }) -- close current tab
|
|
||||||
keymap.set("n", "<leader>tn", "<cmd>tabn<CR>", { desc = "Go to next tab" }) -- go to next tab
|
|
||||||
keymap.set("n", "<leader>tp", "<cmd>tabp<CR>", { desc = "Go to previous tab" }) -- go to previous tab
|
|
||||||
keymap.set("n", "<leader>tf", "<cmd>tabnew %<CR>", { desc = "Open current buffer in new tab" }) -- move current buffer to new tab
|
|
||||||
|
|
||||||
-- sintax fixer
|
|
||||||
keymap.set("n", "<leader>sy", "gg=G<CR>", { desc = "Format current file" })
|
|
||||||
|
|
||||||
keymap.set("n", "<C-e>", "10<C-e>", { noremap = true, silent = true })
|
|
||||||
keymap.set("n", "<C-y>", "10<C-y>", { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- close current file on buffer
|
|
||||||
keymap.set("n", "<leader>bd", ":bd<CR>", { desc = "Close current file on buffer" })
|
|
||||||
|
|
||||||
-- Set buftabline mappings
|
|
||||||
keymap.set("n", "<C-p>", ":bnext<CR>", { noremap = true, silent = true })
|
|
||||||
keymap.set("n", "<C-n>", ":bprev<CR>", { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- Coding hacks
|
|
||||||
keymap.set(
|
|
||||||
"n",
|
|
||||||
"<leader>re",
|
|
||||||
"ggOimport<space>React<space>from<space>'react';<esc>0",
|
|
||||||
{ desc = "Type import react from 'react' at the top of the file" }
|
|
||||||
)
|
|
||||||
keymap.set("n", "<leader>,", "$a,<ESC>", { desc = "Adding ',' at the end of the line" })
|
|
||||||
keymap.set("n", "<leader>;", "$a;<ESC>", { desc = "Adding ';' at the end of the line" })
|
|
||||||
keymap.set("n", "<leader>con", "oconsole.log()<ESC>0w$h", { desc = "Adding console.log() on the line below" })
|
|
||||||
keymap.set("n", "<leader>x", ":!node %<CR>", { desc = "Running current project using node" })
|
|
||||||
|
|
||||||
-- Move between Tmux and Neovim splits using Alt + Arrow keys
|
|
||||||
-- keymap.set("n", "<A-h>", ":TmuxNavigateLeft<CR>", { noremap = true, silent = true })
|
|
||||||
-- keymap.set("n", "<A-j>", ":TmuxNavigateDown<CR>", { noremap = true, silent = true })
|
|
||||||
-- keymap.set("n", "<A-k>", ":TmuxNavigateUp<CR>", { noremap = true, silent = true })
|
|
||||||
-- keymap.set("n", "<A-l>", ":TmuxNavigateRight<CR>", { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- Resize splits using Ctrl + Arrow keys
|
|
||||||
|
|
||||||
keymap.set("n", "<C-l>", ":vertical resize -5<CR>", { noremap = true, silent = true })
|
|
||||||
keymap.set("n", "<C-h>", ":vertical resize +5<CR>", { noremap = true, silent = true })
|
|
||||||
keymap.set("n", "<C-k>", ":resize +5<CR>", { noremap = true, silent = true })
|
|
||||||
keymap.set("n", "<C-j>", ":resize -5<CR>", { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- Run and Debug Project
|
|
||||||
keymap.set("n", "<leader>pr", ":RunProject<CR>", { desc = "Run Project" })
|
|
||||||
keymap.set("n", "<leader>pd", ":DebugProject<CR>", { desc = "Debug Project" })
|
|
||||||
|
|
||||||
keymap.set("v", "<leader>zn", ":CopilotChatRename<CR>", { desc = "Rename variable (Copilot Chat)" })
|
|
||||||
keymap.set("n", "<leader>zc", ":CopilotChat<CR>", { desc = "Open Copilot Chat" })
|
|
||||||
keymap.set("v", "<leader>ze", ":CopilotChatExplain<CR>", { desc = "Explain code (Copilot Chat)" })
|
|
||||||
keymap.set("v", "<leader>zr", ":CopilotChatReview<CR>", { desc = "Review code (Copilot Chat)" })
|
|
||||||
keymap.set("v", "<leader>zf", ":CopilotChatFix<CR>", { desc = "Fix code issues (Copilot Chat)" })
|
|
||||||
keymap.set("v", "<leader>zo", ":CopilotChatOptimize<CR>", { desc = "Optimize code (Copilot Chat)" })
|
|
||||||
keymap.set("v", "<leader>zd", ":CopilotChatDocs<CR>", { desc = "Generate docs (Copilot Chat)" })
|
|
||||||
|
|
||||||
-- Git Conflict Mappings
|
|
||||||
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>co", "<Plug>(git-conflict-ours)", { desc = "Choose ours (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>ct", "<Plug>(git-conflict-theirs)", { desc = "Choose theirs (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>cb", "<Plug>(git-conflict-both)", { desc = "Choose both (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>c0", "<Plug>(git-conflict-none)", { desc = "Choose none (git conflict)" })
|
|
||||||
keymap.set("n", "<leader>cq", "<Plug>(git-conflict-list)", { desc = "List all git conflicts" })
|
|
||||||
|
|
||||||
-- LeetCode Mappings
|
|
||||||
keymap.set("n", "<leader>lr", "<cmd>Leet run<CR>", { desc = "LeetCode: Run Code" })
|
|
||||||
keymap.set("n", "<leader>ls", "<cmd>Leet submit<CR>", { desc = "LeetCode: Submit Code" })
|
|
||||||
keymap.set("n", "<leader>ld", "<cmd>Leet daily<CR>", { desc = "LeetCode: Daily Challenge" })
|
|
||||||
keymap.set("n", "<leader>ll", "<cmd>Leet list<CR>", { desc = "LeetCode: List Problems" })
|
|
||||||
keymap.set("n", "<leader>lc", "<cmd>Leet console<CR>", { desc = "LeetCode: Open Console" })
|
|
||||||
keymap.set("n", "<leader>lu", "<cmd>Leet cookie update<CR>", { desc = "LeetCode: Update Cookie" })
|
|
||||||
keymap.set("n", "<leader>lls", "<cmd>Leet last_submit<CR>", { desc = "LeetCode: Get latest submition" })
|
|
||||||
|
|
||||||
-- Copilot
|
|
||||||
-- Add key map on normal mode to open copilot panel on c + tab
|
|
||||||
keymap.set("n", "<leader>cp", ":Copilot panel<CR>", { desc = "Copilot: Open copilot panel" })
|
|
||||||
|
|
||||||
-- Add key map on normal mode to open copilot chat explain on c + shift + e
|
|
||||||
keymap.set("n", "<leader>ce", ":CopilotChatExplain<CR>", { desc = "Copilot Chat: Explain code" })
|
|
||||||
|
|||||||
98
lua/cargdev/core/keymaps/README.md
Normal file
98
lua/cargdev/core/keymaps/README.md
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
# Keymaps Structure
|
||||||
|
|
||||||
|
This folder contains all the keymaps organized by category for better maintainability.
|
||||||
|
|
||||||
|
## 📁 File Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
keymaps/
|
||||||
|
├── README.md # This file
|
||||||
|
├── general.lua # General keymaps (leader, basic navigation)
|
||||||
|
├── personal.lua # Personal workflow keymaps
|
||||||
|
├── lsp.lua # LSP and function navigation keymaps
|
||||||
|
├── telescope.lua # Telescope search and navigation keymaps
|
||||||
|
└── plugins.lua # Plugin-specific keymaps
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 How It Works
|
||||||
|
|
||||||
|
The main `keymaps.lua` file automatically loads all `.lua` files from this folder. Each file contains keymaps for a specific category:
|
||||||
|
|
||||||
|
### **general.lua**
|
||||||
|
- Leader key setup
|
||||||
|
- Basic navigation
|
||||||
|
- General utility keymaps
|
||||||
|
|
||||||
|
### **personal.lua**
|
||||||
|
- Your personal workflow keymaps
|
||||||
|
- File management
|
||||||
|
- Window management
|
||||||
|
- Coding shortcuts
|
||||||
|
- Copilot integration
|
||||||
|
|
||||||
|
### **lsp.lua**
|
||||||
|
- Function navigation (`gd`, `gi`, `gr`, `gt`)
|
||||||
|
- Symbol search (`<leader>ds`, `<leader>ws`)
|
||||||
|
- Code actions and documentation
|
||||||
|
- Diagnostics
|
||||||
|
|
||||||
|
### **telescope.lua**
|
||||||
|
- 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
|
||||||
|
2. **Add your keymaps** using the standard format:
|
||||||
|
```lua
|
||||||
|
keymap.set("n", "<leader>key", "<cmd>command<cr>", { desc = "Description" })
|
||||||
|
```
|
||||||
|
3. **The keymaps will be automatically loaded** when Neovim starts
|
||||||
|
|
||||||
|
## 🎯 Keymap Categories
|
||||||
|
|
||||||
|
| Category | File | Description |
|
||||||
|
|----------|------|-------------|
|
||||||
|
| General | `general.lua` | Basic setup and utilities |
|
||||||
|
| Personal | `personal.lua` | Your workflow shortcuts |
|
||||||
|
| LSP | `lsp.lua` | Function navigation and LSP features |
|
||||||
|
| Search | `telescope.lua` | File and text search |
|
||||||
|
| Plugins | `plugins.lua` | Plugin-specific functionality |
|
||||||
|
|
||||||
|
## 🔄 Benefits
|
||||||
|
|
||||||
|
- **Modular**: Each category is in its own file
|
||||||
|
- **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
|
||||||
|
|
||||||
|
The keymaps are automatically loaded when Neovim starts. You can:
|
||||||
|
|
||||||
|
- **View all keymaps**: `<leader>fk` (Telescope keymaps)
|
||||||
|
- **Search keymaps**: Use Telescope to search through your keymaps
|
||||||
|
- **Modify keymaps**: Edit the appropriate file and restart Neovim
|
||||||
|
|
||||||
|
## 📝 Notes
|
||||||
|
|
||||||
|
- All files are automatically loaded by `keymaps.lua`
|
||||||
|
- Each file should have its own `local keymap = vim.keymap` declaration
|
||||||
|
- Use descriptive comments to organize keymaps within each file
|
||||||
|
- Follow the existing naming conventions for consistency
|
||||||
19
lua/cargdev/core/keymaps/general.lua
Normal file
19
lua/cargdev/core/keymaps/general.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-- General keymaps
|
||||||
|
local keymap = vim.keymap
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- GENERAL KEYMAPS
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
-- Set leader key
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
-- General keymaps
|
||||||
|
keymap.set("i", "jk", "<ESC>", opts) -- Exit insert mode with jk
|
||||||
|
keymap.set("n", "<leader>nh", ":nohl<CR>", opts) -- Clear search highlights
|
||||||
|
keymap.set("n", "x", '"_x', opts) -- Delete character without copying into register
|
||||||
|
|
||||||
|
-- Save and quit (additional)
|
||||||
|
keymap.set("n", "<leader>Q", ":qa!<CR>", { desc = "Quit all" })
|
||||||
27
lua/cargdev/core/keymaps/lsp.lua
Normal file
27
lua/cargdev/core/keymaps/lsp.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-- LSP and function navigation keymaps
|
||||||
|
local keymap = vim.keymap
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- LSP NAVIGATION (FUNCTION NAVIGATION)
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
-- Primary LSP navigation
|
||||||
|
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<cr>", { desc = "Go to definition" })
|
||||||
|
keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<cr>", { desc = "Go to implementation" })
|
||||||
|
keymap.set("n", "gr", "<cmd>Telescope lsp_references<cr>", { desc = "Show references" })
|
||||||
|
keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<cr>", { desc = "Go to type definition" })
|
||||||
|
|
||||||
|
-- Symbol search
|
||||||
|
keymap.set("n", "<leader>ds", "<cmd>Telescope lsp_document_symbols<cr>", { desc = "Document symbols" })
|
||||||
|
keymap.set("n", "<leader>ws", "<cmd>Telescope lsp_workspace_symbols<cr>", { desc = "Workspace symbols" })
|
||||||
|
|
||||||
|
-- Code actions and documentation
|
||||||
|
keymap.set("n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<cr>", { desc = "Code actions" })
|
||||||
|
keymap.set("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<cr>", { desc = "Rename" })
|
||||||
|
keymap.set("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", { desc = "Hover documentation" })
|
||||||
|
|
||||||
|
-- Diagnostics
|
||||||
|
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics<cr>", { desc = "Show diagnostics" })
|
||||||
|
keymap.set("n", "<leader>dd", "<cmd>lua vim.diagnostic.open_float()<cr>", { desc = "Line diagnostics" })
|
||||||
|
keymap.set("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<cr>", { desc = "Previous diagnostic" })
|
||||||
|
keymap.set("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<cr>", { desc = "Next diagnostic" })
|
||||||
86
lua/cargdev/core/keymaps/personal.lua
Normal file
86
lua/cargdev/core/keymaps/personal.lua
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
-- Personal keymaps (original workflow)
|
||||||
|
local keymap = vim.keymap
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- PERSONAL KEYMAPS (ORIGINAL WORKFLOW)
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
keymap.set("n", "<leader>u", "gg0vG$", { desc = "Select the whole file open" })
|
||||||
|
keymap.set("n", "<leader>4", "0v$hy<Esc>0o<Esc>0p0kw<CR>", { desc = "Copy the entire line and paste just below" })
|
||||||
|
|
||||||
|
-- file management
|
||||||
|
keymap.set("n", "<leader>w", ":w<CR>", { desc = "Save the current file" })
|
||||||
|
keymap.set("n", "<leader>xa", ":xa<CR>", { desc = "Save and close all the files" })
|
||||||
|
keymap.set("n", "<leader>q", ":q<CR>", { desc = "Close all the files" })
|
||||||
|
keymap.set("n", "<leader>so", ":source %<CR>", { desc = "Reload nvim" })
|
||||||
|
keymap.set("n", "<leader>no", ":noh <CR>", { desc = "Reset search a word" })
|
||||||
|
|
||||||
|
-- increment/decrement numbers
|
||||||
|
keymap.set("n", "<leader>+", "<C-a>", { desc = "Increment number" }) -- increment
|
||||||
|
keymap.set("n", "<leader>-", "<C-x>", { desc = "Decrement number" }) -- decrement
|
||||||
|
|
||||||
|
-- window management
|
||||||
|
keymap.set("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically
|
||||||
|
keymap.set("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally
|
||||||
|
keymap.set("n", "<leader>se", "<C-w>=", { desc = "Make splits equal size" }) -- make split windows equal width & height
|
||||||
|
keymap.set("n", "<leader>sx", "<cmd>close<CR>", { desc = "Close current split" }) -- close current split window
|
||||||
|
|
||||||
|
keymap.set("n", "<leader>to", "<cmd>tabnew<CR>", { desc = "Open new tab" }) -- open new tab
|
||||||
|
keymap.set("n", "<leader>tx", "<cmd>tabclose<CR>", { desc = "Close current tab" }) -- close current tab
|
||||||
|
keymap.set("n", "<leader>tn", "<cmd>tabn<CR>", { desc = "Go to next tab" }) -- go to next tab
|
||||||
|
keymap.set("n", "<leader>tp", "<cmd>tabp<CR>", { desc = "Go to previous tab" }) -- go to previous tab
|
||||||
|
keymap.set("n", "<leader>tf", "<cmd>tabnew %<CR>", { desc = "Open current buffer in new tab" }) -- move current buffer to new tab
|
||||||
|
|
||||||
|
-- sintax fixer
|
||||||
|
keymap.set("n", "<leader>sy", "gg=G<CR>", { desc = "Format current file" })
|
||||||
|
|
||||||
|
keymap.set("n", "<C-e>", "10<C-e>", { noremap = true, silent = true })
|
||||||
|
keymap.set("n", "<C-y>", "10<C-y>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- close current file on buffer
|
||||||
|
keymap.set("n", "<leader>bd", ":bd<CR>", { desc = "Close current file on buffer" })
|
||||||
|
|
||||||
|
-- Set buftabline mappings
|
||||||
|
keymap.set("n", "<C-p>", ":bnext<CR>", { noremap = true, silent = true })
|
||||||
|
keymap.set("n", "<C-n>", ":bprev<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Coding hacks
|
||||||
|
keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>re",
|
||||||
|
"ggOimport<space>React<space>from<space>'react';<esc>0",
|
||||||
|
{ desc = "Type import react from 'react' at the top of the file" }
|
||||||
|
)
|
||||||
|
keymap.set("n", "<leader>,", "$a,<ESC>", { desc = "Adding ',' at the end of the line" })
|
||||||
|
keymap.set("n", "<leader>;", "$a;<ESC>", { desc = "Adding ';' at the end of the line" })
|
||||||
|
keymap.set("n", "<leader>con", "oconsole.log()<ESC>0w$h", { desc = "Adding console.log() on the line below" })
|
||||||
|
keymap.set("n", "<leader>x", ":!node %<CR>", { desc = "Running current project using node" })
|
||||||
|
|
||||||
|
-- Move between Tmux and Neovim splits using Alt + Arrow keys
|
||||||
|
-- keymap.set("n", "<A-h>", ":TmuxNavigateLeft<CR>", { noremap = true, silent = true })
|
||||||
|
-- keymap.set("n", "<A-j>", ":TmuxNavigateDown<CR>", { noremap = true, silent = true })
|
||||||
|
-- keymap.set("n", "<A-k>", ":TmuxNavigateUp<CR>", { noremap = true, silent = true })
|
||||||
|
-- keymap.set("n", "<A-l>", ":TmuxNavigateRight<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Resize splits using Ctrl + Arrow keys
|
||||||
|
keymap.set("n", "<C-l>", ":vertical resize -5<CR>", { noremap = true, silent = true })
|
||||||
|
keymap.set("n", "<C-h>", ":vertical resize +5<CR>", { noremap = true, silent = true })
|
||||||
|
keymap.set("n", "<C-k>", ":resize +5<CR>", { noremap = true, silent = true })
|
||||||
|
keymap.set("n", "<C-j>", ":resize -5<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Run and Debug Project
|
||||||
|
keymap.set("n", "<leader>pr", ":RunProject<CR>", { desc = "Run Project" })
|
||||||
|
keymap.set("n", "<leader>pd", ":DebugProject<CR>", { desc = "Debug Project" })
|
||||||
|
|
||||||
|
-- Copilot Chat
|
||||||
|
keymap.set("v", "<leader>zn", ":CopilotChatRename<CR>", { desc = "Rename variable (Copilot Chat)" })
|
||||||
|
keymap.set("n", "<leader>zc", ":CopilotChat<CR>", { desc = "Open Copilot Chat" })
|
||||||
|
keymap.set("v", "<leader>ze", ":CopilotChatExplain<CR>", { desc = "Explain code (Copilot Chat)" })
|
||||||
|
keymap.set("v", "<leader>zr", ":CopilotChatReview<CR>", { desc = "Review code (Copilot Chat)" })
|
||||||
|
keymap.set("v", "<leader>zf", ":CopilotChatFix<CR>", { desc = "Fix code issues (Copilot Chat)" })
|
||||||
|
keymap.set("v", "<leader>zo", ":CopilotChatOptimize<CR>", { desc = "Optimize code (Copilot Chat)" })
|
||||||
|
keymap.set("v", "<leader>zd", ":CopilotChatDocs<CR>", { desc = "Generate docs (Copilot Chat)" })
|
||||||
|
|
||||||
|
-- Copilot
|
||||||
|
keymap.set("n", "<leader>cp", ":Copilot panel<CR>", { desc = "Copilot: Open copilot panel" })
|
||||||
|
keymap.set("n", "<leader>ce", ":CopilotChatExplain<CR>", { desc = "Copilot Chat: Explain code" })
|
||||||
195
lua/cargdev/core/keymaps/plugins.lua
Normal file
195
lua/cargdev/core/keymaps/plugins.lua
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
-- Plugin-specific keymaps
|
||||||
|
local keymap = vim.keymap
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- PLUGIN KEYMAPS
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
-- NvimTree
|
||||||
|
keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" })
|
||||||
|
|
||||||
|
-- Buffer management
|
||||||
|
keymap.set("n", "<S-l>", ":bnext<CR>", { noremap = true, silent = true })
|
||||||
|
keymap.set("n", "<S-h>", ":bprevious<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Comment
|
||||||
|
keymap.set("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", { desc = "Toggle comment" })
|
||||||
|
keymap.set("v", "<leader>/", "<ESC><cmd>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>", { desc = "Toggle comment" })
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
keymap.set("n", "<leader>gg", "<cmd>LazyGit<CR>", { desc = "LazyGit" })
|
||||||
|
|
||||||
|
-- DAP
|
||||||
|
keymap.set("n", "<leader>db", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", { desc = "Toggle breakpoint" })
|
||||||
|
keymap.set("n", "<leader>dc", "<cmd>lua require'dap'.continue()<cr>", { desc = "Continue" })
|
||||||
|
keymap.set("n", "<leader>di", "<cmd>lua require'dap'.step_into()<cr>", { desc = "Step into" })
|
||||||
|
keymap.set("n", "<leader>do", "<cmd>lua require'dap'.step_over()<cr>", { desc = "Step over" })
|
||||||
|
keymap.set("n", "<leader>dO", "<cmd>lua require'dap'.step_out()<cr>", { desc = "Step out" })
|
||||||
|
keymap.set("n", "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", { desc = "Toggle REPL" })
|
||||||
|
keymap.set("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", { desc = "Run last" })
|
||||||
|
keymap.set("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", { desc = "Toggle DAP UI" })
|
||||||
|
keymap.set("n", "<leader>dt", "<cmd>lua require'dapui'.float_element()<cr>", { desc = "Float element" })
|
||||||
|
|
||||||
|
-- Trouble
|
||||||
|
keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>", { desc = "Toggle Trouble" })
|
||||||
|
keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>", { desc = "Workspace diagnostics" })
|
||||||
|
keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>", { desc = "Document diagnostics" })
|
||||||
|
keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>", { desc = "Location list" })
|
||||||
|
keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>", { desc = "Quickfix list" })
|
||||||
|
|
||||||
|
-- Terminal
|
||||||
|
keymap.set("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", { desc = "ToggleTerm float" })
|
||||||
|
keymap.set("n", "<leader>th", "<cmd>ToggleTerm size=10 direction=horizontal<cr>", { desc = "ToggleTerm horizontal split" })
|
||||||
|
keymap.set("n", "<leader>tv", "<cmd>ToggleTerm size=80 direction=vertical<cr>", { desc = "ToggleTerm vertical split" })
|
||||||
|
|
||||||
|
-- Session management
|
||||||
|
keymap.set("n", "<leader>ss", "<cmd>SessionSave<cr>", { desc = "Save session" })
|
||||||
|
keymap.set("n", "<leader>sr", "<cmd>SessionRestore<cr>", { desc = "Restore session" })
|
||||||
|
|
||||||
|
-- Formatting
|
||||||
|
keymap.set("n", "<leader>f", "<cmd>lua vim.lsp.buf.format()<cr>", { desc = "Format buffer" })
|
||||||
|
|
||||||
|
-- Substitute
|
||||||
|
keymap.set("n", "<leader>s", "<cmd>lua require('substitute').operator()<cr>", { desc = "Substitute with motion" })
|
||||||
|
keymap.set("n", "<leader>ss", "<cmd>lua require('substitute').line()<cr>", { desc = "Substitute line" })
|
||||||
|
keymap.set("n", "<leader>S", "<cmd>lua require('substitute').eol()<cr>", { desc = "Substitute to end of line" })
|
||||||
|
|
||||||
|
-- Surround
|
||||||
|
keymap.set("n", "<leader>sa", "<cmd>lua require('nvim-surround').surround_add()<cr>", { desc = "Add surrounding" })
|
||||||
|
keymap.set("n", "<leader>sd", "<cmd>lua require('nvim-surround').surround_delete()<cr>", { desc = "Delete surrounding" })
|
||||||
|
keymap.set("n", "<leader>sr", "<cmd>lua require('nvim-surround').surround_replace()<cr>", { desc = "Replace surrounding" })
|
||||||
|
|
||||||
|
-- Git conflicts
|
||||||
|
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>co", "<Plug>(git-conflict-ours)", { desc = "Choose ours (git conflict)" })
|
||||||
|
keymap.set("n", "<leader>ct", "<Plug>(git-conflict-theirs)", { desc = "Choose theirs (git conflict)" })
|
||||||
|
keymap.set("n", "<leader>cb", "<Plug>(git-conflict-both)", { desc = "Choose both (git conflict)" })
|
||||||
|
keymap.set("n", "<leader>c0", "<Plug>(git-conflict-none)", { desc = "Choose none (git conflict)" })
|
||||||
|
keymap.set("n", "<leader>cq", "<Plug>(git-conflict-list)", { desc = "List all git conflicts" })
|
||||||
|
|
||||||
|
-- LeetCode
|
||||||
|
keymap.set("n", "<leader>lr", "<cmd>Leet run<CR>", { desc = "LeetCode: Run Code" })
|
||||||
|
keymap.set("n", "<leader>ls", "<cmd>Leet submit<CR>", { desc = "LeetCode: Submit Code" })
|
||||||
|
keymap.set("n", "<leader>ld", "<cmd>Leet daily<CR>", { desc = "LeetCode: Daily Challenge" })
|
||||||
|
keymap.set("n", "<leader>ll", "<cmd>Leet list<CR>", { desc = "LeetCode: List Problems" })
|
||||||
|
keymap.set("n", "<leader>lc", "<cmd>Leet console<CR>", { desc = "LeetCode: Open Console" })
|
||||||
|
keymap.set("n", "<leader>lu", "<cmd>Leet cookie update<CR>", { desc = "LeetCode: Update Cookie" })
|
||||||
|
keymap.set("n", "<leader>lh", "<cmd>Leet hints<cr>", { desc = "LeetCode: Open hints" })
|
||||||
|
keymap.set("n", "<leader>lls", "<cmd>Leet last<cr>", { desc = "LeetCode: Get latest submission" })
|
||||||
|
|
||||||
|
-- Linting
|
||||||
|
keymap.set("n", "<leader>l", "<cmd>Lint<cr>", { desc = "Lint current file" })
|
||||||
|
|
||||||
|
-- Project commands
|
||||||
|
keymap.set("n", "<leader>p", "<cmd>lua require('cargdev.core.function.project_commands').run_project()<cr>", { desc = "Run project" })
|
||||||
|
|
||||||
|
-- Console log (different from personal <leader>con)
|
||||||
|
keymap.set("n", "<leader>cl", "oconsole.log()<ESC>i", { desc = "Add console.log" })
|
||||||
|
|
||||||
|
-- DAP UI reset
|
||||||
|
keymap.set("n", "<leader>drt", "<cmd>lua require('dapui').float_element()<cr>", { desc = "Reset DAP UI layout" })
|
||||||
|
|
||||||
|
-- DAP commands
|
||||||
|
keymap.set("n", "<leader>dco", "<cmd>lua require('dap').commands()<cr>", { desc = "DAP commands" })
|
||||||
|
keymap.set("n", "<leader>dcf", "<cmd>lua require('dap').list_breakpoints()<cr>", { desc = "DAP configs" })
|
||||||
|
keymap.set("n", "<leader>dcb", "<cmd>lua require('dap').list_breakpoints()<cr>", { desc = "List breakpoints" })
|
||||||
|
|
||||||
|
-- Step out
|
||||||
|
keymap.set("n", "<leader>dot", "<cmd>lua require('dap').step_out()<cr>", { desc = "Step out" })
|
||||||
|
|
||||||
|
-- Todos in trouble
|
||||||
|
keymap.set("n", "<leader>xt", "<cmd>TodoTrouble<cr>", { desc = "Open todos in trouble" })
|
||||||
|
|
||||||
|
-- Surround mappings
|
||||||
|
keymap.set("n", "ys", "<cmd>lua require('nvim-surround').surround_add()<cr>", { desc = "Add surrounding" })
|
||||||
|
keymap.set("n", "yss", "<cmd>lua require('nvim-surround').surround_add()<cr>", { desc = "Add surrounding to line" })
|
||||||
|
keymap.set("n", "yS", "<cmd>lua require('nvim-surround').surround_add()<cr>", { desc = "Add surrounding on new lines" })
|
||||||
|
keymap.set("n", "ySS", "<cmd>lua require('nvim-surround').surround_add()<cr>", { desc = "Add surrounding to line on new lines" })
|
||||||
|
|
||||||
|
-- Comment mappings
|
||||||
|
keymap.set("n", "gc", "<cmd>lua require('Comment.api').toggle_current_linewise()<cr>", { desc = "Toggle comment" })
|
||||||
|
keymap.set("n", "gcc", "<cmd>lua require('Comment.api').toggle_current_linewise()<cr>", { desc = "Toggle current line comment" })
|
||||||
|
keymap.set("n", "gco", "<cmd>lua require('Comment.api').insert_below()<cr>", { desc = "Insert comment below" })
|
||||||
|
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", "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" })
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- 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" })
|
||||||
28
lua/cargdev/core/keymaps/telescope.lua
Normal file
28
lua/cargdev/core/keymaps/telescope.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-- Telescope keymaps
|
||||||
|
local keymap = vim.keymap
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- TELESCOPE NAVIGATION
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
-- File navigation
|
||||||
|
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Find files" })
|
||||||
|
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Live grep" })
|
||||||
|
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Grep string" })
|
||||||
|
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Recent files" })
|
||||||
|
|
||||||
|
-- Buffer and session management
|
||||||
|
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>fm", "<cmd>Telescope marks<cr>", { desc = "Find marks" })
|
||||||
|
keymap.set("n", "<leader>fk", "<cmd>Telescope keymaps<cr>", { desc = "Find keymaps" })
|
||||||
|
keymap.set("n", "<leader>fC", "<cmd>Telescope commands<cr>", { desc = "Find commands" })
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
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>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" })
|
||||||
|
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" })
|
||||||
@@ -1,50 +1,216 @@
|
|||||||
vim.cmd("let g:netrw_liststyle = 3")
|
-- Core options and settings
|
||||||
|
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
|
local g = vim.g
|
||||||
|
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
-- Disable deprecated API warnings
|
||||||
|
vim.deprecate = function() end
|
||||||
|
|
||||||
opt.relativenumber = true
|
-- Set leader key before lazy
|
||||||
opt.number = true
|
g.mapleader = " "
|
||||||
|
g.maplocalleader = " "
|
||||||
|
|
||||||
-- tabs & indentation
|
-- General settings
|
||||||
opt.tabstop = 2 -- 2 spaces for tabs (prettier default)
|
opt.mouse = "a" -- Enable mouse
|
||||||
opt.shiftwidth = 2 -- 2 spaces for indent width
|
opt.clipboard = "unnamedplus" -- Use system clipboard
|
||||||
opt.expandtab = true -- expand tab to spaces
|
opt.swapfile = false -- Don't create swap files
|
||||||
opt.autoindent = true -- copy indent from current line when starting new one
|
opt.completeopt = "menuone,noselect" -- Better completion
|
||||||
|
opt.undofile = true -- Persistent undo
|
||||||
|
opt.undodir = vim.fn.stdpath("data") .. "/undodir"
|
||||||
|
|
||||||
opt.wrap = false
|
-- Search settings
|
||||||
|
opt.ignorecase = true -- Case insensitive search
|
||||||
|
opt.smartcase = true -- Case sensitive when uppercase
|
||||||
|
opt.hlsearch = false -- Don't highlight search results
|
||||||
|
opt.incsearch = true -- Incremental search
|
||||||
|
|
||||||
-- search settings
|
-- Indentation
|
||||||
opt.ignorecase = true -- ignore case when searching
|
opt.expandtab = true -- Use spaces instead of tabs
|
||||||
opt.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
|
opt.shiftwidth = 2 -- Number of spaces for indentation
|
||||||
|
opt.tabstop = 2 -- Number of spaces for tabs
|
||||||
|
opt.softtabstop = 2 -- Number of spaces for soft tabs
|
||||||
|
opt.autoindent = true -- Auto indent
|
||||||
|
opt.smartindent = true -- Smart indent
|
||||||
|
|
||||||
opt.cursorline = true
|
-- Performance
|
||||||
|
opt.lazyredraw = false -- Don't redraw while executing macros
|
||||||
|
opt.updatetime = 250 -- Faster completion
|
||||||
|
opt.timeoutlen = 300 -- Faster key sequence completion
|
||||||
|
|
||||||
-- turn on termguicolors for tokyonight colorscheme to work
|
-- UI settings
|
||||||
-- (have to use iterm2 or any other true color terminal)
|
opt.number = true -- Show line numbers
|
||||||
opt.termguicolors = true
|
opt.relativenumber = true -- Show relative line numbers
|
||||||
opt.background = "dark" -- colorschemes that can be light or dark will be made dark
|
opt.cursorline = true -- Highlight current line
|
||||||
opt.signcolumn = "yes" -- show sign column so that text doesn't shift
|
opt.cursorcolumn = false -- Don't highlight current column
|
||||||
|
opt.signcolumn = "yes" -- Always show sign column
|
||||||
|
|
||||||
-- backspace
|
-- =============================================================================
|
||||||
opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
|
-- NATIVE AUTO WRAPPER CONFIGURATION
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
-- clipboard
|
-- Text wrapping settings
|
||||||
opt.clipboard:append("unnamedplus") -- use system clipboard as default register
|
opt.wrap = true -- Enable line wrapping
|
||||||
|
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
|
||||||
|
|
||||||
-- split windows
|
-- Text width and formatting
|
||||||
opt.splitright = true -- split vertical window to the right
|
opt.textwidth = 80 -- Set text width for auto-wrapping
|
||||||
opt.splitbelow = true -- split horizontal window to the bottom
|
opt.colorcolumn = "80" -- Show column at 80 characters
|
||||||
|
opt.formatoptions = "jcroqlnt" -- Format options for auto-wrapping
|
||||||
|
|
||||||
-- turn off swapfile
|
-- Auto-wrap specific settings
|
||||||
opt.swapfile = false
|
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
|
||||||
|
|
||||||
-- Enable soft wrapping of long lines
|
-- Scroll settings for wrapped text
|
||||||
opt.wrap = true
|
opt.scrolloff = 8 -- Keep 8 lines above/below cursor
|
||||||
|
opt.sidescrolloff = 8 -- Keep 8 columns left/right of cursor
|
||||||
|
opt.showmatch = true -- Show matching brackets
|
||||||
|
opt.matchtime = 2 -- How long to show matching brackets
|
||||||
|
|
||||||
-- Break lines at convenient points (e.g. after whitespace) rather than in the middle of a word
|
-- Folding
|
||||||
opt.linebreak = true
|
opt.foldmethod = "indent" -- Fold based on indentation
|
||||||
|
opt.foldlevel = 99 -- Don't fold by default
|
||||||
|
opt.foldnestmax = 10 -- Maximum nesting level
|
||||||
|
|
||||||
-- Optionally, add a prefix to wrapped lines to visually indicate a wrap
|
-- Backup and swap
|
||||||
opt.showbreak = "↪ "
|
opt.backup = false -- Don't create backup files
|
||||||
|
opt.writebackup = false -- Don't create backup files while writing
|
||||||
|
opt.swapfile = false -- Don't create swap files
|
||||||
|
|
||||||
|
-- Terminal
|
||||||
|
opt.termguicolors = true -- Enable true color support
|
||||||
|
|
||||||
|
-- File encoding
|
||||||
|
opt.encoding = "utf-8" -- Set encoding to UTF-8
|
||||||
|
opt.fileencoding = "utf-8" -- Set file encoding to UTF-8
|
||||||
|
|
||||||
|
-- Wildmenu
|
||||||
|
opt.wildmenu = true -- Enable wildmenu
|
||||||
|
opt.wildmode = "longest:full,full" -- Wildmenu mode
|
||||||
|
|
||||||
|
-- Split behavior
|
||||||
|
opt.splitbelow = true -- Split below when creating horizontal splits
|
||||||
|
opt.splitright = true -- Split right when creating vertical splits
|
||||||
|
|
||||||
|
-- Conceal
|
||||||
|
opt.conceallevel = 2 -- Conceal certain characters
|
||||||
|
|
||||||
|
-- Disable providers that cause warnings
|
||||||
|
g.loaded_perl_provider = 0 -- Disable Perl provider
|
||||||
|
g.loaded_ruby_provider = 0 -- Disable Ruby provider (optional)
|
||||||
|
|
||||||
|
-- Lua specific settings
|
||||||
|
opt.runtimepath:append(vim.fn.stdpath("config") .. "/lua")
|
||||||
|
|
||||||
|
-- Improve performance for large files
|
||||||
|
opt.maxmempattern = 2000 -- Increase memory for pattern matching
|
||||||
|
|
||||||
|
-- Better diff
|
||||||
|
opt.diffopt:append("algorithm:patience")
|
||||||
|
opt.diffopt:append("indent-heuristic")
|
||||||
|
|
||||||
|
-- Better grep
|
||||||
|
opt.grepprg = "rg --vimgrep --smart-case"
|
||||||
|
opt.grepformat = "%f:%l:%c:%m"
|
||||||
|
|
||||||
|
-- Better listchars
|
||||||
|
opt.list = true
|
||||||
|
opt.listchars = {
|
||||||
|
tab = "▸ ",
|
||||||
|
trail = "·",
|
||||||
|
extends = "❯",
|
||||||
|
precedes = "❮",
|
||||||
|
nbsp = "␣",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Better fillchars
|
||||||
|
opt.fillchars = {
|
||||||
|
horiz = "━",
|
||||||
|
horizup = "┻",
|
||||||
|
horizdown = "┳",
|
||||||
|
vert = "┃",
|
||||||
|
vertleft = "┫",
|
||||||
|
vertright = "┣",
|
||||||
|
verthoriz = "╋",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Disable builtin plugins
|
||||||
|
local disabled_built_ins = {
|
||||||
|
"netrw",
|
||||||
|
"netrwPlugin",
|
||||||
|
"netrwSettings",
|
||||||
|
"netrwFileHandlers",
|
||||||
|
"gzip",
|
||||||
|
"zip",
|
||||||
|
"zipPlugin",
|
||||||
|
"tar",
|
||||||
|
"tarPlugin",
|
||||||
|
"getscript",
|
||||||
|
"getscriptPlugin",
|
||||||
|
"vimball",
|
||||||
|
"vimballPlugin",
|
||||||
|
"2html_plugin",
|
||||||
|
"logipat",
|
||||||
|
"rrhelper",
|
||||||
|
"spellfile_plugin",
|
||||||
|
"matchit",
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, plugin in pairs(disabled_built_ins) do
|
||||||
|
g["loaded_" .. plugin] = 1
|
||||||
|
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,
|
||||||
|
})
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,35 @@ return {
|
|||||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||||
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
||||||
"stevearc/dressing.nvim", -- for input provider dressing
|
"stevearc/dressing.nvim", -- for input provider dressing
|
||||||
"folke/snacks.nvim", -- for input provider snacks
|
{
|
||||||
|
"folke/snacks.nvim", -- for input provider snacks
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("snacks").setup({
|
||||||
|
-- Enable all snacks modules
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
dashboard = { enabled = true },
|
||||||
|
explorer = { enabled = true },
|
||||||
|
image = { enabled = true },
|
||||||
|
input = { enabled = true },
|
||||||
|
lazygit = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
picker = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scope = { enabled = true },
|
||||||
|
scroll = { enabled = true },
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
terminal = { enabled = true },
|
||||||
|
toggle = { 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,
|
||||||
|
},
|
||||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||||
{
|
{
|
||||||
"HakonHarnes/img-clip.nvim", -- Image pasting support
|
"HakonHarnes/img-clip.nvim", -- Image pasting support
|
||||||
@@ -52,6 +80,7 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("render-markdown").setup({
|
require("render-markdown").setup({
|
||||||
file_types = { "markdown", "Avante" },
|
file_types = { "markdown", "Avante" },
|
||||||
|
latex = { enabled = false }, -- Disable latex to avoid warning
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 = "🔴",
|
||||||
|
|||||||
187
lua/cargdev/plugins/database.lua
Normal file
187
lua/cargdev/plugins/database.lua
Normal 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,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,10 +1,26 @@
|
|||||||
return {
|
return {
|
||||||
--[[ dir = "/Users/carlos/Documents/SSD_Documents/personals/ideaDrop", ]]
|
--[[dir = "/Volumes/Carlos_SSD/Documents/projects/ideaDrop",]]
|
||||||
"CarGDev/ideadrop.nvim",
|
"CarGDev/ideadrop.nvim",
|
||||||
name = "ideaDrop",
|
name = "ideaDrop",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("ideaDrop").setup({
|
require("ideaDrop").setup({
|
||||||
idea_dir = "/Users/carlos/Nextcloud/ObsidianVault",
|
idea_dir = "/Users/carlos/Nextcloud/ObsidianVault",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Set up convenient keymaps for ideaDrop
|
||||||
|
vim.keymap.set("n", "<leader>id", ":IdeaRight<CR>", { desc = "Open today's idea in right buffer" })
|
||||||
|
vim.keymap.set("n", "<leader>in", ":IdeaRight ", { desc = "Open named idea in right buffer" })
|
||||||
|
vim.keymap.set("n", "<leader>it", ":IdeaTree<CR>", { desc = "Open idea tree browser" })
|
||||||
|
vim.keymap.set("n", "<leader>is", ":IdeaSearch ", { desc = "Search ideas" })
|
||||||
|
vim.keymap.set("n", "<leader>ig", ":IdeaTags<CR>", { desc = "Browse tags" })
|
||||||
|
vim.keymap.set("n", "<leader>if", ":Idea<CR>", { desc = "Open today's idea in float" })
|
||||||
|
|
||||||
|
-- Optional: Override the default :Idea command to use right buffer instead of float
|
||||||
|
-- Uncomment the line below if you want :Idea to always use the right buffer
|
||||||
|
-- vim.api.nvim_create_user_command("Idea", function(opts) vim.cmd("IdeaRight " .. (opts.args or "")) end, { nargs = "?" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
504
lua/cargdev/plugins/intellij.lua
Normal file
504
lua/cargdev/plugins/intellij.lua
Normal file
@@ -0,0 +1,504 @@
|
|||||||
|
return {
|
||||||
|
dir = "/Users/carlos/Documents/SSD_Documents/projects/intellij.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"mfussenegger/nvim-jdtls", -- Java Language Server Protocol
|
||||||
|
"mfussenegger/nvim-dap", -- Debug Adapter Protocol
|
||||||
|
"rcarriga/nvim-dap-ui", -- DAP UI components
|
||||||
|
"akinsho/toggleterm.nvim", -- Terminal integration
|
||||||
|
"nvim-telescope/telescope.nvim", -- For command palette search
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("intellij").setup({
|
||||||
|
-- Theme configuration
|
||||||
|
theme = "inherit", -- or "light", "dark"
|
||||||
|
|
||||||
|
-- Enable verbose logging for debugging
|
||||||
|
verbose_logging = false,
|
||||||
|
|
||||||
|
-- Automatically toggle auto-open main file on start
|
||||||
|
auto_open_main_on_start = true,
|
||||||
|
|
||||||
|
-- Custom actions for your workflow
|
||||||
|
custom_actions = {
|
||||||
|
{
|
||||||
|
name = "Open Project in IntelliJ IDEA",
|
||||||
|
action = function()
|
||||||
|
vim.fn.system("idea .")
|
||||||
|
vim.notify("Opening project in IntelliJ IDEA...")
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "Open in VS Code",
|
||||||
|
action = function()
|
||||||
|
vim.fn.system("code .")
|
||||||
|
vim.notify("Opening project in VS Code...")
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "Git Status",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("git status", 1, 12, "float")
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "Git Log",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("git log --oneline -10", 1, 12, "float")
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Keymaps for quick access
|
||||||
|
keymaps = {
|
||||||
|
n = {
|
||||||
|
["<leader>jp"] = function() require('intellij').show_palette() end,
|
||||||
|
["<leader>jd"] = function() require('intellij').show_startup_diagnostics() end,
|
||||||
|
["<leader>jr"] = function() require('intellij').reload() end,
|
||||||
|
["<leader>jv"] = function() require('intellij').toggle_verbose_logging() end,
|
||||||
|
},
|
||||||
|
v = {
|
||||||
|
["<leader>jt"] = function()
|
||||||
|
local start_line = vim.fn.line("'<")
|
||||||
|
local end_line = vim.fn.line("'>")
|
||||||
|
require("toggleterm").exec("mvn test -Dtest=*#" .. start_line .. "_" .. end_line, 1, 12, "float")
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Project-specific commands based on project type
|
||||||
|
project_commands = function(project_type)
|
||||||
|
local commands = {}
|
||||||
|
|
||||||
|
if project_type == "spring-boot" then
|
||||||
|
table.insert(commands, {
|
||||||
|
name = "Spring Boot DevTools",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("mvn spring-boot:run -Dspring-boot.run.profiles=dev", 1, 12, "float")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
table.insert(commands, {
|
||||||
|
name = "Spring Boot Actuator Health",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("curl -s http://localhost:8080/actuator/health | jq", 1, 12, "float")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if project_type == "maven" then
|
||||||
|
table.insert(commands, {
|
||||||
|
name = "Maven Dependency Tree",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("mvn dependency:tree", 1, 12, "float")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
table.insert(commands, {
|
||||||
|
name = "Maven Clean Install",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("mvn clean install", 1, 12, "float")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if project_type == "gradle" then
|
||||||
|
table.insert(commands, {
|
||||||
|
name = "Gradle Dependencies",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("./gradlew dependencies", 1, 12, "float")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
table.insert(commands, {
|
||||||
|
name = "Gradle Clean Build",
|
||||||
|
action = function()
|
||||||
|
require("toggleterm").exec("./gradlew clean build", 1, 12, "float")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return commands
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Register hooks for additional functionality
|
||||||
|
require("intellij").register_hook("actions", function(project_type)
|
||||||
|
local hooks = {}
|
||||||
|
|
||||||
|
-- Add recent files action
|
||||||
|
table.insert(hooks, {
|
||||||
|
name = "Recent Java Files",
|
||||||
|
action = function()
|
||||||
|
local recent_files = require("intellij").get_recent_java_files()
|
||||||
|
if #recent_files > 0 then
|
||||||
|
vim.ui.select(recent_files, { prompt = "Recent Java Files:" }, function(choice)
|
||||||
|
if choice then
|
||||||
|
local ok, _ = pcall(vim.cmd, "edit " .. choice)
|
||||||
|
if not ok then
|
||||||
|
vim.notify("Could not open file: " .. choice, vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
vim.notify("No recent Java files found")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
return hooks
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- AUTOMATIC JAVA PROJECT DETECTION AND STARTUP
|
||||||
|
local function find_main_java_files()
|
||||||
|
local actions = require("intellij.actions")
|
||||||
|
local configs = actions.get_run_configs()
|
||||||
|
return configs and configs.mains or {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function is_main_file_open()
|
||||||
|
local current_file = vim.api.nvim_buf_get_name(0)
|
||||||
|
local main_files = find_main_java_files()
|
||||||
|
|
||||||
|
for _, main_file in ipairs(main_files) do
|
||||||
|
if current_file:match(main_file:gsub("%.", "/") .. "%.java$") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function open_first_main_file()
|
||||||
|
local main_files = find_main_java_files()
|
||||||
|
|
||||||
|
if #main_files > 0 then
|
||||||
|
-- Try to find the main file in the project
|
||||||
|
local project_root = vim.loop.cwd()
|
||||||
|
local found_file = nil
|
||||||
|
|
||||||
|
-- Debug: show what we're looking for
|
||||||
|
vim.notify("Looking for main files: " .. table.concat(main_files, ", "), vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
|
||||||
|
for _, main_class in ipairs(main_files) do
|
||||||
|
local file_path
|
||||||
|
if main_class:match("%.java$") then
|
||||||
|
file_path = main_class:gsub("^%./", "")
|
||||||
|
else
|
||||||
|
file_path = main_class:gsub("%.", "/") .. ".java"
|
||||||
|
end
|
||||||
|
|
||||||
|
local possible_paths = {
|
||||||
|
project_root .. "/" .. file_path,
|
||||||
|
project_root .. "/src/main/java/" .. file_path,
|
||||||
|
project_root .. "/src/java/" .. file_path,
|
||||||
|
project_root .. "/src/" .. file_path,
|
||||||
|
project_root .. "/app/src/main/java/" .. file_path,
|
||||||
|
project_root .. "/main/java/" .. file_path,
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, full_path in ipairs(possible_paths) do
|
||||||
|
if vim.fn.filereadable(full_path) == 1 then
|
||||||
|
found_file = full_path
|
||||||
|
vim.notify("Found main file at: " .. full_path, vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if found_file then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if found_file then
|
||||||
|
local ok, _ = pcall(vim.cmd, "edit " .. found_file)
|
||||||
|
if ok then
|
||||||
|
vim.notify("Opened main file: " .. found_file, vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
else
|
||||||
|
vim.notify("Could not open main file: " .. found_file, vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
-- Use telescope for better selection if available
|
||||||
|
local function select_with_telescope(items, prompt, cb)
|
||||||
|
local ok, telescope = pcall(require, 'telescope.builtin')
|
||||||
|
if ok then
|
||||||
|
telescope.find_files({
|
||||||
|
prompt_title = prompt,
|
||||||
|
find_command = { 'echo', table.concat(items, '\n') },
|
||||||
|
attach_mappings = function(_, map)
|
||||||
|
require('telescope.actions').select_default:replace(function()
|
||||||
|
local entry = require('telescope.actions.state').get_selected_entry()
|
||||||
|
cb(entry.value)
|
||||||
|
require('telescope.actions').close(_)
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
else
|
||||||
|
vim.ui.select(items, { prompt = prompt }, cb)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.notify("Could not automatically find main files. Showing selection dialog.", vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
select_with_telescope(main_files, "Select main class to open:", function(choice)
|
||||||
|
if choice then
|
||||||
|
local file_path
|
||||||
|
if choice:match("%.java$") then
|
||||||
|
file_path = choice:gsub("^%./", "")
|
||||||
|
else
|
||||||
|
file_path = choice:gsub("%.", "/") .. ".java"
|
||||||
|
end
|
||||||
|
|
||||||
|
local possible_paths = {
|
||||||
|
project_root .. "/" .. file_path,
|
||||||
|
project_root .. "/src/main/java/" .. file_path,
|
||||||
|
project_root .. "/src/java/" .. file_path,
|
||||||
|
project_root .. "/src/" .. file_path,
|
||||||
|
project_root .. "/app/src/main/java/" .. file_path,
|
||||||
|
project_root .. "/main/java/" .. file_path,
|
||||||
|
}
|
||||||
|
|
||||||
|
local found = false
|
||||||
|
for _, full_path in ipairs(possible_paths) do
|
||||||
|
if vim.fn.filereadable(full_path) == 1 then
|
||||||
|
local ok, _ = pcall(vim.cmd, "edit " .. full_path)
|
||||||
|
if ok then
|
||||||
|
vim.notify("Opened main file: " .. full_path, vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
else
|
||||||
|
vim.notify("Could not open main file: " .. full_path, vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not found then
|
||||||
|
vim.notify("Could not find main file for: " .. choice .. "\nTried paths:\n" .. table.concat(possible_paths, "\n"), vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.notify("No main files found in project", vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function detect_and_start_java_project()
|
||||||
|
-- Prevent duplicate detection
|
||||||
|
if vim.b.java_project_detected then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local actions = require("intellij.actions")
|
||||||
|
local project_type = actions.detect_project_type()
|
||||||
|
|
||||||
|
if project_type then
|
||||||
|
-- Store project info in buffer variables
|
||||||
|
vim.b.java_project_type = project_type
|
||||||
|
vim.b.java_project_detected = true
|
||||||
|
|
||||||
|
-- Get JDK and environment info
|
||||||
|
local jdk_info = actions.get_jdk_info()
|
||||||
|
local env_info = actions.get_env_info()
|
||||||
|
|
||||||
|
-- Show project detection notification (only once)
|
||||||
|
local jdk_version = jdk_info and jdk_info.jdk_version or "unknown"
|
||||||
|
vim.notify(
|
||||||
|
string.format("Java project detected: %s (JDK: %s)", project_type, jdk_version),
|
||||||
|
vim.log.levels.INFO,
|
||||||
|
{ title = "intellij.nvim", timeout = 3000 }
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Auto-start Java LSP if available (only if not already started)
|
||||||
|
if pcall(require, 'jdtls') and not vim.lsp.get_active_clients({ name = 'jdtls' })[1] then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
-- Try to start LSP safely with error handling
|
||||||
|
local ok, result = pcall(vim.cmd, "LspStart jdtls")
|
||||||
|
if ok then
|
||||||
|
vim.notify("Java LSP started", vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
|
||||||
|
-- Add error handler for LSP semantic tokens issues
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(args)
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
if client and client.name == "jdtls" then
|
||||||
|
-- Disable semantic tokens if they cause issues
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
else
|
||||||
|
vim.notify("Java LSP could not be started automatically", vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end, 1000)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Auto-compile project on detection (optional)
|
||||||
|
if vim.g.auto_compile_java_projects then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
if project_type == "maven" then
|
||||||
|
require("toggleterm").exec("mvn compile", 1, 12, "float")
|
||||||
|
elseif project_type == "gradle" then
|
||||||
|
require("toggleterm").exec("./gradlew compileJava", 1, 12, "float")
|
||||||
|
end
|
||||||
|
end, 2000)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Auto-open main file if not already open
|
||||||
|
if vim.g.auto_open_main_file and not is_main_file_open() then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
open_first_main_file()
|
||||||
|
end, 1500)
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set up autocommands for automatic detection (with debouncing)
|
||||||
|
local detection_timer = nil
|
||||||
|
|
||||||
|
local function debounced_detection()
|
||||||
|
if detection_timer then
|
||||||
|
vim.loop.timer_stop(detection_timer)
|
||||||
|
end
|
||||||
|
detection_timer = vim.defer_fn(detect_and_start_java_project, 100)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = { "java" },
|
||||||
|
callback = function()
|
||||||
|
-- Auto-detect project type when opening Java files
|
||||||
|
debounced_detection()
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Auto-detect when entering directories with Java project files
|
||||||
|
vim.api.nvim_create_autocmd("DirChanged", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
-- Check if we're in a Java project directory
|
||||||
|
if vim.fn.filereadable("pom.xml") == 1 or
|
||||||
|
vim.fn.filereadable("build.gradle") == 1 or
|
||||||
|
vim.fn.filereadable("build.gradle.kts") == 1 then
|
||||||
|
debounced_detection()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Auto-detect when opening files in Java project directories
|
||||||
|
vim.api.nvim_create_autocmd("BufRead", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
local cwd = vim.loop.cwd()
|
||||||
|
if cwd and (vim.fn.filereadable(cwd .. "/pom.xml") == 1 or
|
||||||
|
vim.fn.filereadable(cwd .. "/build.gradle") == 1 or
|
||||||
|
vim.fn.filereadable(cwd .. "/build.gradle.kts") == 1) then
|
||||||
|
debounced_detection()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Auto-detect when VimEnter (when Neovim starts)
|
||||||
|
vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
-- Check if we started in a Java project directory
|
||||||
|
local cwd = vim.loop.cwd()
|
||||||
|
if cwd and (vim.fn.filereadable(cwd .. "/pom.xml") == 1 or
|
||||||
|
vim.fn.filereadable(cwd .. "/build.gradle") == 1 or
|
||||||
|
vim.fn.filereadable(cwd .. "/build.gradle.kts") == 1) then
|
||||||
|
vim.defer_fn(detect_and_start_java_project, 500)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Global variable to control auto-compilation
|
||||||
|
vim.g.auto_compile_java_projects = true
|
||||||
|
|
||||||
|
-- Global variable to control auto-opening main files
|
||||||
|
vim.g.auto_open_main_file = true
|
||||||
|
|
||||||
|
-- Add command to toggle auto-compilation
|
||||||
|
vim.api.nvim_create_user_command("ToggleJavaAutoCompile", function()
|
||||||
|
vim.g.auto_compile_java_projects = not vim.g.auto_compile_java_projects
|
||||||
|
vim.notify(
|
||||||
|
"Java auto-compilation " .. (vim.g.auto_compile_java_projects and "enabled" or "disabled"),
|
||||||
|
vim.log.levels.INFO,
|
||||||
|
{ title = "intellij.nvim" }
|
||||||
|
)
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Add command to clean up cache and temporary files
|
||||||
|
vim.api.nvim_create_user_command("IntelliJCleanup", function()
|
||||||
|
require("intellij").cleanup()
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Add command to toggle auto-opening main files
|
||||||
|
vim.api.nvim_create_user_command("ToggleJavaAutoOpenMain", function()
|
||||||
|
vim.g.auto_open_main_file = not vim.g.auto_open_main_file
|
||||||
|
vim.notify(
|
||||||
|
"Java auto-open main file " .. (vim.g.auto_open_main_file and "enabled" or "disabled"),
|
||||||
|
vim.log.levels.INFO,
|
||||||
|
{ title = "intellij.nvim" }
|
||||||
|
)
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Add command to manually open main file
|
||||||
|
vim.api.nvim_create_user_command("OpenJavaMainFile", function()
|
||||||
|
if open_first_main_file() then
|
||||||
|
vim.notify("Main file opened", vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
else
|
||||||
|
vim.notify("No main file found in current project", vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Add command to debug file search
|
||||||
|
vim.api.nvim_create_user_command("DebugJavaFileSearch", function()
|
||||||
|
local actions = require("intellij.actions")
|
||||||
|
local configs = actions.get_run_configs()
|
||||||
|
|
||||||
|
vim.notify("=== Java File Search Debug ===", vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
vim.notify("Project root: " .. vim.loop.cwd(), vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
|
||||||
|
if configs and configs.mains then
|
||||||
|
vim.notify("Found main classes: " .. table.concat(configs.mains, ", "), vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
|
||||||
|
for _, main_class in ipairs(configs.mains) do
|
||||||
|
local file_path = main_class:gsub("%.", "/") .. ".java"
|
||||||
|
local project_root = vim.loop.cwd()
|
||||||
|
|
||||||
|
local possible_paths = {
|
||||||
|
project_root .. "/src/main/java/" .. file_path,
|
||||||
|
project_root .. "/src/java/" .. file_path,
|
||||||
|
project_root .. "/src/" .. file_path,
|
||||||
|
project_root .. "/" .. file_path,
|
||||||
|
project_root .. "/app/src/main/java/" .. file_path,
|
||||||
|
project_root .. "/main/java/" .. file_path,
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.notify("Searching for: " .. main_class, vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
for _, path in ipairs(possible_paths) do
|
||||||
|
local exists = vim.fn.filereadable(path) == 1
|
||||||
|
vim.notify(" " .. path .. " -> " .. (exists and "EXISTS" or "NOT FOUND"), vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.notify("No main classes found", vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Add command to manually detect Java project
|
||||||
|
vim.api.nvim_create_user_command("DetectJavaProject", function()
|
||||||
|
if detect_and_start_java_project() then
|
||||||
|
vim.notify("Java project detection completed", vim.log.levels.INFO, { title = "intellij.nvim" })
|
||||||
|
else
|
||||||
|
vim.notify("No Java project detected in current directory", vim.log.levels.WARN, { title = "intellij.nvim" })
|
||||||
|
end
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Check for config flag to auto-toggle main file opening
|
||||||
|
if type(require("intellij").opts) == "table" and require("intellij").opts.auto_open_main_on_start then
|
||||||
|
vim.g.auto_open_main_file = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -14,7 +14,6 @@ return {
|
|||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
local keymap = vim.keymap
|
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
@@ -24,12 +23,15 @@ return {
|
|||||||
"gopls",
|
"gopls",
|
||||||
"graphql",
|
"graphql",
|
||||||
"html",
|
"html",
|
||||||
-- "jdtls", -- uncomment if you’re actively doing Java
|
-- "jdtls", -- uncomment if you're actively doing Java
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"prismals",
|
"prismals",
|
||||||
"pyright",
|
"pyright",
|
||||||
"svelte",
|
"svelte",
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
|
-- Database language servers
|
||||||
|
"sqls", -- SQL language server
|
||||||
|
"mongols", -- MongoDB language server
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -41,10 +43,10 @@ return {
|
|||||||
min = vim.diagnostic.severity.WARN,
|
min = vim.diagnostic.severity.WARN,
|
||||||
},
|
},
|
||||||
icons = {
|
icons = {
|
||||||
Error = " ",
|
Error = " ",
|
||||||
Warn = " ",
|
Warn = " ",
|
||||||
Hint = " ",
|
Hint = " ",
|
||||||
Info = " ",
|
Info = " ",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -72,56 +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,
|
|
||||||
-- }
|
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
lspconfig.cssmodules_ls.setup({
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
capabilities = capabilities,
|
||||||
callback = function(ev)
|
})
|
||||||
local opts = { buffer = ev.buf, silent = true }
|
|
||||||
local mappings = {
|
|
||||||
["gR"] = { "<cmd>Telescope lsp_references<CR>", "Show LSP references" },
|
|
||||||
["gD"] = { vim.lsp.buf.declaration, "Go to declaration" },
|
|
||||||
["gd"] = { "<cmd>Telescope lsp_definitions<CR>", "Show LSP definitions" },
|
|
||||||
["gi"] = { "<cmd>Telescope lsp_implementations<CR>", "Show LSP implementations" },
|
|
||||||
["gt"] = { "<cmd>Telescope lsp_type_definitions<CR>", "Show LSP type definitions" },
|
|
||||||
["<leader>ca"] = { vim.lsp.buf.code_action, "See available code actions" },
|
|
||||||
["<leader>rn"] = { vim.lsp.buf.rename, "Smart rename" },
|
|
||||||
["<leader>D"] = { "<cmd>Telescope diagnostics bufnr=0<CR>", "Show buffer diagnostics" },
|
|
||||||
["<leader>dd"] = { vim.diagnostic.open_float, "Show line diagnostics" },
|
|
||||||
["[d"] = { vim.diagnostic.goto_prev, "Go to previous diagnostic" },
|
|
||||||
["]d"] = { vim.diagnostic.goto_next, "Go to next diagnostic" },
|
|
||||||
["K"] = { vim.lsp.buf.hover, "Show documentation for cursor" },
|
|
||||||
["<leader>rs"] = { ":LspRestart<CR>", "Restart LSP" },
|
|
||||||
}
|
|
||||||
|
|
||||||
for key, map in pairs(mappings) do
|
-- Set up TypeScript Tools
|
||||||
keymap.set("n", key, map[1], { desc = map[2], silent = true })
|
require("typescript-tools").setup({
|
||||||
end
|
settings = {
|
||||||
|
tsserver_plugins = {},
|
||||||
vim.api.nvim_create_autocmd("CursorHold", {
|
tsserver_file_preferences = {},
|
||||||
buffer = ev.buf,
|
tsserver_format_options = {},
|
||||||
callback = function()
|
},
|
||||||
vim.diagnostic.open_float(nil, { focusable = false })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.o.updatetime = 250
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ return {
|
|||||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
|
"nvim-telescope/telescope-dap.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local telescope = require("telescope")
|
local telescope = require("telescope")
|
||||||
@@ -34,17 +35,45 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
hidden = true,
|
||||||
|
},
|
||||||
|
live_grep = {
|
||||||
|
additional_args = function()
|
||||||
|
return { "--hidden" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Load extensions
|
||||||
telescope.load_extension("fzf")
|
telescope.load_extension("fzf")
|
||||||
|
telescope.load_extension("dap")
|
||||||
|
|
||||||
-- set keymaps
|
-- set keymaps
|
||||||
local keymap = vim.keymap -- for conciseness
|
local keymap = vim.keymap -- for conciseness
|
||||||
|
|
||||||
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" })
|
-- File navigation
|
||||||
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" })
|
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Find files" })
|
||||||
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" })
|
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Live grep" })
|
||||||
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" })
|
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Grep string" })
|
||||||
|
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Recent files" })
|
||||||
|
|
||||||
|
-- Buffer and session management
|
||||||
|
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>fm", "<cmd>Telescope marks<cr>", { desc = "Find marks" })
|
||||||
|
keymap.set("n", "<leader>fk", "<cmd>Telescope keymaps<cr>", { desc = "Find keymaps" })
|
||||||
|
keymap.set("n", "<leader>fC", "<cmd>Telescope commands<cr>", { desc = "Find commands" })
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
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>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" })
|
||||||
|
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" })
|
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user