feat(footnotes): add comprehensive footnotes support#135
Merged
YousefHadder merged 4 commits intomainfrom Nov 27, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive footnote support to markdown-plus.nvim, including insertion, editing, deletion, navigation, and listing functionality. However, there are several issues that need to be addressed before merging.
Key Issues Found:
- Keymap inconsistency: The "renumber footnotes" feature mentioned in the PR description is not implemented
- Unused configuration options:
window_layoutandkeymapsconfig options are validated but never used - Type annotation problems: Duplicate and inconsistent type definitions between
types.luaandparser.lua - Missing test coverage: Code block awareness (a key feature) is not tested
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/markdown-plus/footnotes_spec.lua | Comprehensive parser and API tests (~30 tests), but missing code block awareness tests |
| lua/markdown-plus/types.lua | Adds footnote type definitions (with inconsistencies) and config types |
| lua/markdown-plus/init.lua | Integrates footnotes module into main plugin initialization |
| lua/markdown-plus/health.lua | Improves error handling with defensive pcall wrappers |
| lua/markdown-plus/footnotes/window.lua | Implements footnote list picker using vim.ui.select |
| lua/markdown-plus/footnotes/parser.lua | Core parsing logic with code block and inline code awareness |
| lua/markdown-plus/footnotes/navigation.lua | Navigation between references and definitions with wrapping |
| lua/markdown-plus/footnotes/insertion.lua | Insert, edit, and delete operations with validation |
| lua/markdown-plus/footnotes/init.lua | Main footnotes module with keymap setup and API |
| lua/markdown-plus/config/validate.lua | Adds validation for footnote config options (includes unused options) |
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.
Summary
Adds full footnotes support to markdown-plus.nvim, including:
Features
Code Block Awareness
~~~)...)Quality
Keymaps
<leader>mfi<leader>mfe<leader>mfd<leader>mfn<leader>mfp<leader>mfl<leader>mfr<leader>mfg