Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpas/marp-nvim
A neovim plugin for Marp
https://github.com/mpas/marp-nvim
Last synced: about 2 months ago
JSON representation
A neovim plugin for Marp
- Host: GitHub
- URL: https://github.com/mpas/marp-nvim
- Owner: mpas
- License: mit
- Created: 2023-12-20T16:14:16.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-31T07:31:55.000Z (5 months ago)
- Last Synced: 2024-07-31T20:43:38.223Z (4 months ago)
- Language: Lua
- Size: 19.5 KB
- Stars: 18
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - mpas/marp-nvim - Present using markdown with [Marp](https://marp.app/). (Programming Languages Support / Markdown and LaTeX)
README
# 🔌 Marp.nvim
A [neovim](https://neovim.io/) plugin for [Marp](https://marp.app/).## ✨ Features
- start/stop the Marp server
- toggle the Marp server (start/stop)
- see if Marp server is running
- browser window opens when Marp is running and ready## ⚡️ Requirements
- [Marp](https://marp.app/) CLI installed and available in your path
## 📦 InstallationInstall the plugin with your preferred package manager:
Packer:
```lua
use({
"mpas/marp-nvim",
}),
```Lazy:
```lua
{
"mpas/marp-nvim",
},
```With a specific configuration:
```lua
{
"mpas/marp-nvim",
config = function()
require("marp").setup({
port = 8080,
wait_for_response_timeout = 30,
wait_for_response_delay = 1,
})
end,
},
```## ⚙️ Configuration
The following defaults are provided:
```lua
{
port = 8080, -- the port on which the Marp server should listen
wait_for_response_timeout = 30, -- how long to wait for a response from the server before giving up
wait_for_response_delay = 1, -- how long to wait between attempts to connect to the server
}
```In the above example, the Marp server will be started on port 8080, and the plugin will wait for up to 30 seconds for a response from the server before giving up. It will try to connect to the server every second.
## ⌨️ Keybindings
This plugin does not set any keybindings by default. You can set them yourself like this:```lua
vim.keymap.set("n", "MT", "MarpToggle", { noremap = true, silent = true })
vim.keymap.set("n", "MS", "MarpStatus", { noremap = true, silent = true })
...
```The following commands are available:
- `:MarpStart` - start the Marp server
- `:MarpStop` - stop the Marp server
- `:MarpToggle` - toggle the Marp server (start/stop)
- `:MarpStatus` - see if Marp server is running## 🎨 Theming
Marp CLI can recognize custom themes that are in the `themes/` directory in your project's root directory. For example, if you open neovim in the `presentations` directory, created a directory inside of `presentations` called `themes` and place the theme CSS files inside of this directory. They should be automatically loaded by Marp and applied to presentations with the theme specified.## 💡Inspiration
This plugin is inspired by [aca/marp.nvim](https://github.com/aca/marp.nvim)!