feat: Add lualine integration and enhanced per-buffer IM management#39
Open
itshare4u wants to merge 7 commits intokeaising:masterfrom
Open
feat: Add lualine integration and enhanced per-buffer IM management#39itshare4u wants to merge 7 commits intokeaising:masterfrom
itshare4u wants to merge 7 commits intokeaising:masterfrom
Conversation
- Add lualine component to show IM that will be used in insert mode - Display name is computed and stored by im_select.lua for consistency - Component shows context-aware IM: buffer pinned > buffer > window - Add get_display_name() function to convert IM identifiers to readable names - Store display names in vim.b.im_select_display_name and vim.w.im_select_display_name - Support customizable colors and icons in lualine component - Add comprehensive examples and documentation - Component only displays when context is available (no fallback assumptions) Files: - lua/im_select.lua: Add display name logic and storage - lua/im_select/lualine.lua: Lualine component implementation - examples/lualine_config.lua: Usage examples - README.md: Documentation for lualine integration
…play name retrieval logic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 New Features
This PR adds comprehensive lualine integration and enhanced per-buffer input method management.
✨ 1. Lualine Component Integration
A new lualine component that shows which input method will be used when entering insert mode:
Basic Usage:
Advanced Usage:
🔧 2. Enhanced IM Context Management
Display Name Storage
Improved Per-Buffer Management
vim.b.im_select_contextandvim.b.im_select_display_name📁 Files Added/Modified
New Files:
lua/im_select/lualine.lua- Lualine component implementationexamples/lualine_config.lua- Usage examples and configurationsModified Files:
lua/im_select.lua- Added display name logic and enhanced storageREADME.md- Comprehensive lualine integration documentation🎯 Benefits
For Users:
For Developers:
🧪 Testing
Tested extensively on macOS with:
com.apple.inputmethod.VietnameseIM.VietnameseSimpleTelex)📚 Usage Examples
Display shows context-aware IM:
⌨️ VI⌨️ EN🔄 Backward Compatibility
💡 Implementation Highlights
This enhancement makes
im-select.nvimmuch more user-friendly for multilingual workflows while maintaining its reliability and performance.