Learn Neovim Config Structure The Hard Way ( Part 1 )

Posted By: ELK1nG

Learn Neovim Config Structure The Hard Way ( Part 1 )
Published 12/2024
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz
Language: English | Size: 377.22 MB | Duration: 1h 10m

What does Neovim do when it starts? What does it load? Some Plugin is overriding my keymaps!

What you'll learn

How does Neovim runtime paths work?

How does Neovim load plugins?

How does Neovim require work?

What are pack/opt and pack/start?

Requirements

Some Neovim experience

Description

WARNING! This Neovim Course does not teach you how to configure Neovim!Who should NOT take this Neovim Course:someone who wants to learn how to install and configure LSPsomeone who wants to learn how to install and configure nvim-treesittersomeone who wants to learn how to use lazy.nvimsomeone who wants to learn how to configure nvim-cmpsomeone who wants to learn how to configure telescopesomeone who wants to learn how to configure any specific pluginsThe primary focus of this course is to understand how it works under the hood. This course is NOT about tweaking settings or toggling options or how to configure individual plugins ( eg. telescope, nvim-cmp, etc ) — it’s about grasping the mechanics of Neovim’s configuration system and file-loading process. We begin by exploring the runtime path, the cornerstone of Neovim's ecosystem. You'll learn how Neovim locates files and resources, ensuring every module and plugin integrates seamlessly. We’ll dive into Lua’s require mechanism and uncover where it looks for modules, demystifying how Lua-based configurations operate. Understanding these pathways is crucial for creating robust setups that won't break with updates or conflicts.The course also covers the structure of plugins, detailing how they fit into Neovim's runtime. You'll gain insight into the difference between pack/opt and pack/start, and how to use these directories effectively to manage your plugin configurations.What You’ll Learn:The runtime path: What it is and how Neovim uses it to load files.How Lua’s require finds and loads modules.How to load plugins without Plugin Managers ( eg. lazy.nvim or packr ).The difference between pack/opt and pack/start for managing plugins.Lua Module and requireWhat is a Lua module, and how is it structured?How does require work in Lua?Where does Lua look for modules when using require?What is package.path?How do I troubleshoot "module not found" errors in Lua?Can I use relative paths with require in Lua?How do Lua submodules work, and how do I structure them correctly for require?Neovim Runtime PathWhat is the Neovim runtime path, and why is it important?How can I view the current runtime path in Neovim?What is the difference between packpath and runtimepath in Neovim?How does Neovim decide where to load configuration files from?How do I add a custom directory to Neovim’s runtime path?What are the default directories Neovim uses for runtime files?Installing PluginsHow do I install a plugin in Neovim without using a plugin manager?Where should I place plugin files when installing them manually?How do I set up a manually installed plugin in the pack/start directory?How can I enable or disable a plugin installed manually?How do I check if a manually installed plugin is loaded correctly?Neovim Plugin LoadingHow does Neovim load plugins during startup?What is the difference between pack/opt and pack/start for plugins?How do I manually load a plugin stored in the pack/opt directory?Why is my manually installed plugin not loading, and how can I debug it?How does Neovim handle plugin conflicts or overlapping functionality?Lua Module and Submodule in NeovimHow do I create a Lua module for use in Neovim configurations?How can I structure my Neovim configuration with Lua modules?What is a Lua submodule, and how do I require it properly?How do I create a nested directory structure for Lua modules in Neovim?How do I use require to load a Lua submodule in Neovim?How do I organize reusable Lua functions across multiple files in Neovim?Can I use external Lua libraries as modules in Neovim? If so, how?What is the best practice for naming Lua modules and submodules in Neovim configurations?How do I debug issues with Lua modules or submodules not loading in Neovim?By the end of the course, you’ll have a deep understanding of Neovim’s inner workings, enabling you to craft flexible and efficient setups tailored to your needs.

Overview

Section 1: Introduction

Lecture 1 Introduction

Section 2: Neovim and Runtime Paths

Lecture 2 What is Neovim's runtime path?

Lecture 3 What is Lua package path in Neovim?

Lecture 4 What is the plugin directory used for in Neovim config?

Lecture 5 Pros and Cons of plugin directory

Lecture 6 How to modify Neovim's runtime paths?

Lecture 7 How to install a vim plugin in Neovim?

Section 3: Neovim with Lua files

Lecture 8 How does require work in Neovim?

Lecture 9 plugins with lua files

Lecture 10 plugins with lua module

Lecture 11 submodule

Lecture 12 submodule2

Lecture 13 use of init.lua

Lecture 14 setup function

Section 4: Neovim with Real Lua plugin

Lecture 15 Download nvim-surround

Lecture 16 refactor add_package function

Lecture 17 custom pack module

Lecture 18 How to use pack/opt to load a plugin?

Lecture 19 pack/opt demo

Lecture 20 How does pack/start work?

Neovim user