<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9" -->

---
title: Creating a Markdown Presentation Plugin in Neovim with...
description: Learn how to create and enhance a Markdown presentation plugin in Neovim using Lua. The guide covers setting up the environment, parsing Markdown files into...
canonical: https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Creating a Markdown Presentation Plugin in Neovim with Live Code Execution | daily.dev
og:description: Learn how to create and enhance a Markdown presentation plugin in Neovim using Lua. The guide covers setting up the environment, parsing Markdown files into...
og:url: https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9
og:image: https://api.daily.dev/og/posts/VzSyuYRR9.png
og:image:alt: Creating a Markdown Presentation Plugin in Neovim with Live Code Execution
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating a Markdown Presentation Plugin in Neovim with Live Code Execution

**[Collections](https://daily.dev/sources/collections)** · 2 min read · 1 upvotes · 0 comments

## Summary

Learn how to create and enhance a Markdown presentation plugin in Neovim using Lua. The guide covers setting up the environment, parsing Markdown files into slides, displaying slides in floating windows, and setting up navigation. Additionally, it explains how to enable execution of code blocks within slides and customize the plugin for different programming languages.

## Content

# Building and Enhancing a Markdown Presentation Plugin in Neovim

Creating a Markdown presentation plugin in Neovim allows you to display and navigate slides directly within your editor. This guide will walk you through the setup, configuration, and enhancement of such a plugin using Lua.

## Step 1: Initial Setup

Begin by setting up your Neovim environment for Lua development. Ensure you have `neovim` installed along with required Lua dependencies. Create a new directory for your plugin and initialize a new Lua file for your plugin code.

## Step 2: Parsing Markdown Files

To convert your markdown files into slides, you'll need to write a parser that can process the markdown syntax. Split the content into slides based on headers or specific markers. Store these slides in a structure that your plugin can manage.

## Step 3: Displaying Slides in Floating Window

Leverage Neovim's floating window feature to display slides. Create a function to open a floating window and populate it with the content of the current slide. Ensure the window adjusts to the size and content dynamically for better readability.

## Step 4: Navigating Between Slides

Set up key mappings to navigate between slides. Common mappings include moving to the next or previous slide using arrow keys or custom shortcuts. Write handlers for these key mappings to update the window content accordingly.

## Step 5: Executing Markdown Code Blocks

Enhance your plugin by enabling the execution of code blocks within your slides. Identify code blocks by their fences (e.g., ```lua for Lua code) and create functions to execute the code within Neovim. Display the execution output below the code block in the same floating window.

## Step 6: Adding User Customization

Make your plugin more versatile by allowing user customizations. Provide options to configure executors for different programming languages. Implement a system executor function that can handle Lua, JavaScript, Python, and extend to other languages as the user wishes. Users should be able to specify the interpreter and custom commands for each language.

## Conclusion

By following these steps, you can create a robust Markdown presentation plugin in Neovim that not only allows you to view and navigate slides but also execute code live during presentations. This makes your Neovim setup a powerful tool for teaching and sharing content interactively. Customization capabilities ensure that your plugin can cater to various programming languages and user preferences.

Happy coding!

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#lua](https://daily.dev/tags/lua), [#markdown](https://daily.dev/tags/markdown)

[View this post on daily.dev](https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Creating a Markdown Presentation Plugin in Neovim with Live Code Execution","url":"https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9"},"datePublished":"2024-12-24T22:25:05.484Z","dateModified":"2026-03-15T04:00:22.908Z","description":"Learn how to create and enhance a Markdown presentation plugin in Neovim using Lua. The guide covers setting up the environment, parsing Markdown files into...","image":"https://i.ytimg.com/vi/VGid4aN25iI/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/VGid4aN25iI/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/creating-a-markdown-presentation-plugin-in-neovim-with-live-code-execution-vzsyuyrr9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devtools,lua,markdown","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"Creating a Markdown Presentation Plugin in Neovim with Live Code Execution"}]}
```

