Skip to content

Commit 526cbbb

Browse files
committed
Migrate nfnl.init to define
1 parent 6a7fbe0 commit 526cbbb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

fnl/nfnl/init.fnl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
(local {: autoload} (require :nfnl.module))
1+
(local {: autoload : define} (require :nfnl.module))
22
(local callback (autoload :nfnl.callback))
3+
(local vim _G.vim)
4+
5+
(local M (define :nfnl))
36

47
(local minimum-neovim-version "0.9.0")
58

@@ -18,10 +21,10 @@
1821
{:file (vim.fn.expand "%")
1922
:buf (vim.api.nvim_get_current_buf)})))
2023

21-
(fn setup [opts]
24+
(fn M.setup [opts]
2225
"Sets the vim.g.nfnl#... variables in a slightly more Lua friendly way."
2326

2427
(when opts
2528
(set vim.g.nfnl#compile_on_write opts.compile_on_write)))
2629

27-
{: setup}
30+
M

lua/nfnl/init.lua

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)