Comments (4)
Wow, that was indeed the problem. Sorry for the noise!
from hotpot.nvim.
What you posted should be functioning fine, works here (with path etc modification for my system).
For ref, this is the code I used, just cut down from yours using NVIM_APPNAME
for a fresh test. Seemed fine on nvim-0.9.4 and HEAD (which I assume you're on due to vim.fs.joinpath).
-- init.lua
-- As per lazy's install instructions
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
-- Bootstap hotpot into lazy plugin dir if it does not exist yet.
local hotpotpath = vim.fn.stdpath("data") .. "/lazy/hotpot.nvim"
if not vim.loop.fs_stat(hotpotpath) then
vim.notify("Bootstrapping hotpot.nvim...", vim.log.levels.INFO)
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
-- You may with to pin a known version tag with `--branch=vX.Y.Z`
"--branch=v0.9.7",
"https://github.com/rktjmp/hotpot.nvim.git",
hotpotpath,
})
end
-- As per lazy's install instructions, but insert hotpots path at the front
vim.opt.runtimepath:prepend({hotpotpath, lazypath})
require("hotpot") -- optionally you may call require("hotpot").setup(...) here
-- include hotpot as a plugin so lazy will update it
local plugins = {"rktjmp/hotpot.nvim"}
require("lazy").setup(plugins)
local function _abspath(p)
return vim.fn.fnamemodify(p, ":p")
end
local _nvim_config = _abspath(vim.fs.normalize(vim.fn.stdpath("config")))
local function _compile_prefix(prefix, _opts)
local opts = _opts or {}
require("hotpot").api.make.build(prefix, {
dryrun = not opts.go,
verbose = opts.verbose,
}, {
-- Compile fnl/ → lua/
{ "fnl/*.fnl", true },
{ "fnl/**/*.fnl", true },
-- Compile other Fennel scripts in-place
{ "**/*.fnl", true },
})
end
vim.api.nvim_create_user_command("HotpotCheckNvimConfig", function(cmd)
return _compile_prefix(_nvim_config, { go = false })
end, {})
vim.api.nvim_create_user_command("HotpotCompileNvimConfig", function(cmd)
return _compile_prefix(_nvim_config, { go = true })
end, {})
The error you see only pops up with you call the old check
function here
hotpot.nvim/fnl/hotpot/api/make.fnl
Lines 233 to 239 in eb5531b
Perhaps check your config doesn't have any references to make.check
in it?
Bit of a puzzler ...
from hotpot.nvim.
I should have clarified, this error happens any time I save any file with ft=fennel
, and appears to be caused by a BufWritePost
autocmd.
Relevant output from :verbose autocmd BufWritePost
:
BufWritePost
<buffer=1>
<Lua 385: ~/.local/share/nvim/site/pack/packer/start/hotpot.nvim/lua/hotpot/api/make.lua:672> [hotpot-check-dot-hotpot-dot-lua-for-1]
Last set from Lua
Unfortunately "Last set from Lua" doesn't give me a lot to go on, but I scoured my config files and I don't see anywhere that I might be doing this.
I searched the Hotpot source code and it looks like the autocmd is set by hotpot.api.make.attach()
which appears to be called by the FileType
plugin created by hotpot.api.make.enable()
. But I can't figure out where enable
is being called, and I'm pretty sure it's nowhere in my own config files. To be extra safe, I went into my local Hotpot Git repo and ran git clean -fdx ; git fetch origin ; git reset --hard origin/master
.
from hotpot.nvim.
if not vim.startswith(afile_abs, aniseed_input_path) then
_compile_prefix(nvim_config, { go = true, verbose = true })
end
Uses nvim_config
(eg an undefined variable name, eg nil
) instead of _nvim_config
, which causes the make
function to think you're trying to use the old api.
from hotpot.nvim.
Related Issues (20)
- `vim.loader` support HOT 1
- Diagnostics includes path before message
- Problems installing... hotpot.searcher.module not found when using lazy.nvim HOT 2
- Bump to fennel 1.3.1
- Problems for using api.make to build ~/.config/nvim/init.fnl HOT 5
- Broken on Windows because `vim.fs.normalize` converts all path separators to forward slash (`\` -> `/`) HOT 4
- lazy.nvim conflicts with fnl ftplugins HOT 5
- Diagnostics autocommand cant be deleted when a buffer is renamed
- Improve clearing Fennels `macro-loaded` table when needed. HOT 2
- Windows RUNNER~1 paths HOT 2
- Automatically load `plugin/*.fnl` files HOT 1
- attempt to call local 'glob_search' (a nil value) HOT 3
- How to reduce startup time besides using `vim.loader.enable()`? HOT 2
- Diagnosing slow api.make.build() performance HOT 3
- `(include mod)` depends on CWD / fennel.path value HOT 1
- Error loading `init.fnl` looking in `.config/fnlm/fnl` instead of `.config/nvim/fnl` HOT 4
- Compiler environment for plugins HOT 2
- Using `folke/lazy.nvim` with module-name/string plugin definitions HOT 27
- `include` path behavior should match `require` behavior HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotpot.nvim.