An example plugin that says hello when you press <Leader>h
- Install via your favorite package manager.
-- lazy.nvim
{
"m4xshen/example.nvim",
opts = {}
},
- Setup the plugin in your
init.lua
. This step is not needed with lazy.nvim ifopts
is set as above.
require("example").setup()
Press <Leader>h
and it says hello to you.
You can pass your config table into the setup()
function or opts
if you use lazy.nvim.
- name (optional, type: string): the name that example.nvim greets with
Example:
require("example").setup({
name = "Max",
})