summaryrefslogtreecommitdiff
path: root/neovim/init.fnl
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-10-06 23:10:55 +0200
committerMike Vink <mike1994vink@gmail.com>2023-10-06 23:10:55 +0200
commitcfaef26e8718916adcc68fbfb63b15f2389b2cd2 (patch)
tree3989af4514d31d0a5cb89e8b96d51210ad7bf152 /neovim/init.fnl
parent654ec06ab6a885ea851c4cbf68d06a00b41b0e14 (diff)
move all the files
Diffstat (limited to 'neovim/init.fnl')
-rw-r--r--neovim/init.fnl36
1 files changed, 0 insertions, 36 deletions
diff --git a/neovim/init.fnl b/neovim/init.fnl
deleted file mode 100644
index 7e82675..0000000
--- a/neovim/init.fnl
+++ /dev/null
@@ -1,36 +0,0 @@
-;; fixes nixpkgs hotpot not adding package path correctly
-
-(tset _G.package :path
- (.. (vim.fn.stdpath :cache) "/hotpot/hotpot.nvim/lua/?/init.lua;"
- package.path))
-
-(fn build-init []
- (let [{: build} (require :hotpot.api.make)
- allowed-globals (icollect [n _ (pairs _G)]
- n)
- opts {:verbosity 0
- :compiler {:modules {:allowedGlobals allowed-globals}}}
- here #(values $1)
- config-path (vim.fn.stdpath :config)]
- (build config-path opts (.. config-path :/init.fnl) here
- (.. config-path :/after/ftdetect/.+) here
- (.. config-path :/ftplugin/.+) here
- (.. config-path :/after/ftplugin/.+) here)))
-
-;; Call hotpot.setup and compile again after fs event
-
-(let [hotpot (require :hotpot)
- setup hotpot.setup
- build hotpot.api.make.build
- uv vim.loop
- config-path (vim.fn.stdpath :config)]
- (setup {:provide_require_fennel true
- :compiler {:modules {:correlate true}
- :macros {:env :_COMPILER
- :compilerEnv _G
- :allowedGlobals false}}})
- (let [handle (uv.new_fs_event)
- path (vim.fn.expand (.. config-path :/init.fnl))]
- (uv.fs_event_start handle path {} #(vim.schedule build-init))
- (vim.api.nvim_create_autocmd :VimLeavePre {:callback #(uv.close handle)})))
-(require :conf)