Skip to content

feat(image link): add comprehensive image link support#123

Merged
YousefHadder merged 1 commit intomainfrom
feat/image-link-support
Nov 12, 2025
Merged

feat(image link): add comprehensive image link support#123
YousefHadder merged 1 commit intomainfrom
feat/image-link-support

Conversation

@YousefHadder
Copy link
Owner

Closes #117

Summary

Adds full support for Markdown image links with insert, edit, selection conversion, and toggle operations.

Features

  • Insert image link: <leader>mL to insert new image with alt text, URL, and optional title
  • Convert selection to image: Select text and <leader>mL to convert to image link
  • Edit image link: <leader>mE to edit existing image (alt, URL, title)
  • Toggle link/image: <leader>mA to convert between regular links and image links
  • Smart detection: Accurately detects images with or without titles

Implementation

  • Created lua/markdown-plus/images/init.lua with 387 lines
  • Added 39 automated tests (all passing)
  • Updated configuration, types, and validation
  • Comprehensive documentation in README and vimdoc
  • Manual test guide with 18 test cases

Testing

  • ✅ All 39 automated tests passing
  • ✅ Manual testing completed
  • ✅ Code quality: 0 warnings, 0 errors
  • ✅ Pattern matching for images with/without titles
  • ✅ Toggle preserves title attributes

Documentation

  • Updated README with feature list, examples, configuration, and keymaps
  • Updated vimdoc with complete usage guide
  • Created MANUAL_TEST_IMAGES.md for manual testing

Copilot AI review requested due to automatic review settings November 12, 2025 03:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive image link support to markdown-plus.nvim, providing insert, edit, selection conversion, and toggle operations for Markdown image syntax (![alt](url "title")).

  • Implements full image link management with smart detection of images with/without title attributes
  • Adds 4 new keymaps for image operations in normal and visual modes
  • Updates configuration, types, validation, and comprehensive documentation

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/markdown-plus/images_spec.lua New test file with 39 tests covering pattern matching, cursor detection, toggling, and edge cases; includes placeholder tests for user input functions
lua/markdown-plus/types.lua Adds images boolean field to feature configuration types
lua/markdown-plus/init.lua Integrates images module into plugin initialization and autocmd setup
lua/markdown-plus/images/init.lua New 386-line module implementing all image link operations with patterns, keymaps, and user input functions
lua/markdown-plus/config/validate.lua Adds validation for images feature flag
doc/markdown-plus.txt Adds comprehensive vimdoc section with usage examples and keymap documentation
README.md Adds feature overview, detailed examples, configuration options, and keymap reference

@YousefHadder YousefHadder changed the title feat: Add comprehensive image link support feat: add comprehensive image link support Nov 12, 2025
@YousefHadder YousefHadder changed the title feat: add comprehensive image link support feat(image link): add comprehensive image link support Nov 12, 2025
@YousefHadder YousefHadder merged commit 6507297 into main Nov 12, 2025
20 of 22 checks passed
@YousefHadder YousefHadder deleted the feat/image-link-support branch November 12, 2025 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add image link support

1 participant