How to Write Neovim Plugin from Scratch

via Udemy

Go to Course: https://www.udemy.com/course/neovim-plugin-from-scratch-introduction-course/

Overview

What you will learn?BasicsWhat is runtime path?Relationship between Vim Plugins and Runtime PathHow to install Plugins without "Plugin Manager"?Difference between pack/start and pack/optWhat does "require" do?Module reloading without closing Neovim.Plugin No.1 [ confy.lua ]writing up confy from scratchsimple plugin to open and reload your init.vim or init.luathis should get you started on basic plugin structureand finallay publishing it so that others can use your shiny new plugin!Plugin No.2 [ Wrap Console Log ]writing up wrapper from scratchport of VSCode extension Wrap Console Logit wraps the word under the cursor into a templateMy future courses?auto pairsplitjoinkey chainkey layerzettelkasten link jumperreal-time floating window loggersmooth scroller ( on github )IDE backspace ( on github )cursor flasher ( on github )n flasher ( on github )star flasher ( on github )vimscript virtual text echo ( probably could extend to other languages )and if you are adventurous.your own fuzzy finder! Boooooom! ?An introductory course on Neovim plugin development would cover the basics of creating plugins for the popular text editor, Neovim. Neovim is a fork of the Vim text editor and offers several new features and enhancements. The course would begin with an overview of some internal understanding of Vim, runtime path in particular."runtime path" is the list of directories where Vim looks for its runtime files, such as syntax highlighting files, plugin scripts, and documentation. These directories are typically stored in the 'runtimepath' option, which is a comma-separated list of directory paths.The runtime path is important because it determines where Vim looks for its runtime files when it starts up. If a user installs a new plugin, for example, they may need to add the plugin's directory to the runtime path so that Vim can find the plugin's script files.After doing some experimentation with runtime path, we look at how vim handles installation of plugins before and after the introduction of package feature in Vim8. We also try installing the plugins without plugin managers.Then we see how Lua module fit into the picture and how they are loaded using the "require" function. Finally we create a very minimal plugin called confy!First by following the Lua Plugin convention using the setup function.Second by following the Vimscript convention using plugin directory and vim global variables.By the end of the course, students should be able to create their own Neovim plugins and understand the fundamentals of Neovim plugin development.

Skills

Reviews