Skip to content

Move Pencil hard mode initialization to plugin config#85

Merged
michaelbarton merged 1 commit intomasterfrom
claude/fix-markdown-startup-5KKzj
Mar 12, 2026
Merged

Move Pencil hard mode initialization to plugin config#85
michaelbarton merged 1 commit intomasterfrom
claude/fix-markdown-startup-5KKzj

Conversation

@michaelbarton
Copy link
Owner

Summary

Refactored the Pencil plugin initialization to use the proper plugin configuration hook instead of relying on filetype-specific setup.

Key Changes

  • Moved PencilHard command invocation from ftplugin/markdown.lua to the plugin's config function in plugins/pencil.lua
  • Removed the redundant command call and blank line from the markdown filetype plugin

Implementation Details

This change improves the plugin architecture by:

  • Centralizing Pencil plugin initialization in its configuration function rather than scattering it across filetype plugins
  • Ensuring the hard wrap mode is set when the plugin loads, rather than only when markdown files are opened
  • Simplifying the markdown filetype plugin to focus solely on markdown-specific settings (indentation and tab configuration)

https://claude.ai/code/session_01WNYp13xq5orKkugaELVw52

Move PencilHard call from ftplugin/markdown.lua to the vim-pencil
plugin's config callback in lazy.nvim. The ftplugin script runs before
lazy.nvim loads the plugin, so the PencilHard command doesn't exist yet.

https://claude.ai/code/session_01WNYp13xq5orKkugaELVw52
@michaelbarton michaelbarton merged commit a9bb2f1 into master Mar 12, 2026
2 checks passed
@michaelbarton michaelbarton deleted the claude/fix-markdown-startup-5KKzj branch March 12, 2026 22:39
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.

2 participants