# nanotee/nvim-lua-guide

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/nanotee-nvim-lua-guide).**

5,934 stars · 215 forks · archived

## Links

- GitHub: https://github.com/nanotee/nvim-lua-guide
- awesome-repositories: https://awesome-repositories.com/repository/nanotee-nvim-lua-guide.md

## Topics

`documentation` `guide` `lua` `neovim` `nvim` `vimscript`

## Description

This project is a comprehensive guide for writing Neovim configurations and plugins using the Lua programming language. It serves as a manual for using the native Neovim Lua API to manage buffers, windows, and editor options.

The guide focuses on the interoperability between Lua and Vimscript, providing instructions on how to execute Vimscript from Lua and call Lua functions from within Vimscript. It also provides a framework for plugin development, covering the organization of code into external modules and the creation of custom commands and key mappings.

The documentation covers broader capabilities including editor workflow automation, the manipulation of internal variables, and the management of editor options. It also includes instructions for sourcing external files and modifying buffer lines.

## Tags

### Programming Languages & Runtimes

- [Language Interoperability Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability-bridges.md) — Provides comprehensive documentation on executing Vimscript from Lua and calling Lua functions from Vimscript.
- [Configuration Scripting](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/dynamic-scripting-languages/lua/configuration-runtimes/configuration-scripting.md) — Provides a comprehensive guide to using the Lua programming language to define Neovim's behavior and settings.
- [Cross-Language Execution](https://awesome-repositories.com/f/programming-languages-runtimes/cross-language-execution.md) — Provides instructions for executing Vimscript within the Lua context and vice versa to access language-specific features.
- [Foreign Function Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/foreign-function-interfaces.md) — Details the binding layer and data translation between the Lua runtime and Neovim's internal native APIs.
- [Editor API Bindings](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/native-c-interoperability/global-variable-mappings/editor-api-bindings.md) — Guides the use of global variables to interact with Neovim's standard library, event loop, and language servers. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [Scripting Language Function Invokers](https://awesome-repositories.com/f/programming-languages-runtimes/webassembly-exported-function-invokers/scripting-language-function-invokers.md) — Explains how to invoke Lua functions defined in a global namespace directly from Vimscript. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [Module Organization](https://awesome-repositories.com/f/programming-languages-runtimes/module-organization.md) — Guides the organization of plugin code into separate Lua modules to create reusable components and clean namespaces.
- [Editor Command Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/script-invocation-interfaces/script-command-triggers/editor-command-definitions.md) — Shows how to create custom user commands in Neovim that execute specific Lua functions. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [Source File Evaluation](https://awesome-repositories.com/f/programming-languages-runtimes/source-file-evaluation.md) — Explains how to load and execute Lua script files from the disk within the Neovim environment. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [Variable Scope Management](https://awesome-repositories.com/f/programming-languages-runtimes/variable-scope-management.md) — Explains how to store and retrieve data across different editor scopes, such as buffers and windows. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))

### Artificial Intelligence & ML

- [Cross-Language Function Invocations](https://awesome-repositories.com/f/artificial-intelligence-ml/function-calling-interfaces/cross-language-function-invocations.md) — Explains how to call Vimscript functions from Lua and handle the automatic conversion of data types. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))

### Development Tools & Productivity

- [Neovim Configurations](https://awesome-repositories.com/f/development-tools-productivity/editor-configuration/neovim-configurations.md) — Provides detailed instructions for building a personalized Neovim configuration from scratch using Lua. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [API Integrations](https://awesome-repositories.com/f/development-tools-productivity/neovim-plugins/api-integrations.md) — Teaches how to use the native Neovim Lua API to manage buffers, windows, and the event loop.
- [API References](https://awesome-repositories.com/f/development-tools-productivity/neovim-plugins/api-references.md) — Provides a detailed reference for using the native Neovim Lua API to control editor components.
- [Plugin Development Guides](https://awesome-repositories.com/f/development-tools-productivity/neovim-plugins/plugin-development-frameworks/plugin-development-guides.md) — Provides a manual for organizing code into modules and creating custom commands for Neovim plugins.
- [Plugin Development Guides](https://awesome-repositories.com/f/development-tools-productivity/neovim-plugins/plugin-development-guides.md) — Offers step-by-step instructions for building Neovim extensions, including module organization and command creation.
- [Custom Module Loading](https://awesome-repositories.com/f/development-tools-productivity/custom-module-loading.md) — Guides the process of importing external Lua script files from the system path to add functionality. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [Editor Interface Configurations](https://awesome-repositories.com/f/development-tools-productivity/editor-configurations/editor-and-injection-configurations/editor-interface-configurations.md) — Provides methods for controlling global and local editor options to modify behavior and appearance. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
- [Text Buffer Manipulations](https://awesome-repositories.com/f/development-tools-productivity/text-buffer-manipulations.md) — Provides methods for programmatically modifying content across a range of lines in a text buffer. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))

### DevOps & Infrastructure

- [String-to-Code Execution](https://awesome-repositories.com/f/devops-infrastructure/execution-environments/code-execution-runtimes/dynamic-code-loaders/string-to-code-execution.md) — Describes the process of executing Vimscript command strings from within Lua scripts. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))

### Education & Learning Resources

- [Interoperability Guides](https://awesome-repositories.com/f/education-learning-resources/interoperability-guides.md) — Serves as a manual for bridging the communication gap between Lua and Vimscript.
- [Editor Scripting Tutorials](https://awesome-repositories.com/f/education-learning-resources/editor-scripting-tutorials.md) — Serves as a learning resource for mastering Lua specifically for the purpose of customizing Neovim. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/README.md))

### Software Engineering & Architecture

- [Editor Workflow Automations](https://awesome-repositories.com/f/software-engineering-architecture/editor-workflow-automations.md) — Guides the creation of custom key mappings and automated text operations to improve editing efficiency.
- [API Event Hooks](https://awesome-repositories.com/f/software-engineering-architecture/api-event-hooks.md) — Explains how to trigger custom Lua functions in response to Neovim editor lifecycle events and user shortcuts.
- [API Exposure](https://awesome-repositories.com/f/software-engineering-architecture/namespace-management/namespace-injections/global/api-exposure.md) — Shows how Neovim exposes its internal functions and state to Lua through a shared global namespace.

### User Interface & Experience

- [Editor Key Mappings](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/input-handling/secondary-modifier-keys/keyboard-input-mapping/editor-key-mappings.md) — Provides instructions for creating and managing keyboard shortcuts for various Neovim input modes. ([source](https://github.com/nanotee/nvim-lua-guide/blob/master/OLD_README.md))
