a lua plugin for managing your marks automatically using buffer comments
Caution
early stage, expect incompatible plugins & things breaking Please report incompatible plugin menus in Issues tab
I had to manage multiple files of the same structure and edit only the headers below the comments, so I had to overemploy the search feature. mark-comments drastically improves workflow with a loads of auto-generated files that may include marked comments.
Using lazy.nvim
{
"shateq/mark-comments.nvim",
-- optional, supports more parsers
-- dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {}, -- required
}Check integrations to access more functionality.
Every commented line that contains m:letter, e.g. m:a will create a mark on the beginning of that line.
Denominators are m: and M:, first letter after a denominator is the name for a new mark
The :MarkComments command reloads the plugin
:MarkCommentsReset resets generated marks
Got a typst file
// Title and quick summary M:b
= Heading 1
Mark `b` has been set on the line above Heading because it contains `M:b`
== Summary
// m:s Edit below
Mark `s` created on the line above for quick traversalNote
TODO
- Set marks automatically
- Pure API
- Telescope.nvim integration
- config options
- header comments
- docs
- add photo
Put the following snippet somewhere after calling setup() for telescope.nvim.
To access the generated marks picker you may use :Telescope mark-comments command or create a binding.
In order to configure the picker follow telescope's readme.
require "telescope".setup() -- probably already there
require "telescope".load_extension("mark-comments")Automatically refreshes the gutter if guttermarks.nvim is installed. No configuration needed.