Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An example Neovim plugin witten in Fennel using nfnl

License

NotificationsYou must be signed in to change notification settings

Olical/nfnl-plugin-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A very simple plugin to demonstrate writingNeovim plugins inFennel withnfnl.

The plugin only exposes one Lua module (nfnl-plugin-example) which exports onefunction (setup). When loaded and executed it'll use the notify API to display"Hello, World!" which means you'll either see it in your:messages area or ina floating notification if you have a plugin for that.

We're embedding a copy of nfnl in this plugin to show you how that can beachieved. Here's a list of files you'll probably find interesting and worthlooking at:

  • script/nfnl is responsible for cloning, updating and embedding nfnl intolua/nfnl-plugin-example/nfnl.
  • .gitattributes tells GitHub which files are vendored from other repos andwhich are compiler output. This ensures your language report for yourrepository is accurate and correctly ignores files you didn't write.
  • .ignore ensures compiler output Lua files don't show up in command line andNeovim search interfaces.
  • .nfnl.fnl enables and configures nfnl for this directory, it's just relyingon the defaults so it only contains{}.
  • fnl/nfnl-plugin-example/init.fnl is the only code for this plugin and it'sthe main entry point.
  • script/test executes the tests underfnl/spec withPlenary (youwill need to install that separately for this to work).
  • .github/workflows/test.yaml creates a GitHub workflow that automaticallyruns your test suite on push.

If you add this plugin to your plugin manager you can load it with:

:luarequire("nfnl-plugin-example").setup()

Bear in mind, some plugin managers actually call thissetup method for youwith a configuration table.

Usage

Feel free to fork / copy / steal / borrow / modify / mutate / scramble / fry /reticulate splines / incorporate this repository in any way you see fit. It canbe an inspiration, reference or template. That's entirely up to you and what youneed right now.

If you build something with nfnl let me know and I'll link to it from here asfurther examples of how to work with it.

Have fun!

Unlicensed

Find the fullUnlicense in theUNLICENSE file, but here's asnippet.

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distributethis software, either in source code form or as a compiled binary, for anypurpose, commercial or non-commercial, and by any means.

About

An example Neovim plugin witten in Fennel using nfnl

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp