feat: begin migrating init

This commit is contained in:
Youwen Wu 2025-02-01 03:26:21 -08:00
parent 1f6029dbe1
commit 782836bc7d
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
5 changed files with 16 additions and 6 deletions

View file

@ -24,7 +24,10 @@
;; autocmd, so it'll only apply to buffers you're interested in.
;; Will use backslashes on Windows.
;; Defaults to compiling all .fnl files, you may want to limit it to your fnl/ directory.
:source-file-patterns [:./fnl/.*.fnl :./fnl/*.fnl :./fnl/**/*.fnl :./init.fnl]
:source-file-patterns [:./fnl/.*.fnl
:./fnl/*.fnl
:./fnl/**/*.fnl
:./new-init.fnl]
;; A function that is given the absolute path of a Fennel file and should return
;; the equivalent Lua path, by default this will translate `fnl/foo/bar.fnl` to `lua/foo/bar.lua`.
;; See the "Writing Lua elsewhere" tip below for an example function that writes to a sub directory.

View file

@ -1,3 +1,3 @@
(import-macros {: tx} :config.macros)
(tx :nvim-autopairs
{:event :BufEnter :after (fn [] (. (require :nvim-autopairs) :setup))})
{:event :BufEnter :after (. (require :nvim-autopairs) :setup)})

View file

@ -1,5 +1,2 @@
-- [nfnl] Compiled from ./fnl/plugins/autopairs.fnl by https://github.com/Olical/nfnl, do not edit.
local function _1_()
return require("nvim-autopairs").setup
end
return {"nvim-autopairs", after = _1_, event = "BufEnter"}
return {"nvim-autopairs", after = require("nvim-autopairs").setup, event = "BufEnter"}

4
new-init.fnl Normal file
View file

@ -0,0 +1,4 @@
(if (os.getenv :TERM)
((. (require :scripts.chameleon) :setup) (. (require :scripts.kitty-padding)
:setup))
{})

6
new-init.lua Normal file
View file

@ -0,0 +1,6 @@
-- [nfnl] Compiled from ./new-init.fnl by https://github.com/Olical/nfnl, do not edit.
if os.getenv("TERM") then
return require("scripts.chameleon").setup(require("scripts.kitty-padding").setup)
else
return {}
end