Comments (5)
Yes, thanks for the quick fix!
from hotpot.nvim.
Thanks for the report. I am in the midst of rebuilding some drives after a failure so it might take me a bit to get to this.
Can you try:
- enabling vim.loader (
vim.loader.enable()
AFAICR) - confirm the plugins do not work after restarting nvim after trying to run the ftplugin (the vim.loader caches "top mods" it has seen and requires some nudging to recheck things, lazy might need similar nudging but restarting should do in a pinch.)
from hotpot.nvim.
confirm the plugins do not work after restarting nvim after trying to run the ftplugin (the vim.loader caches "top mods" it has seen and requires some nudging to recheck things, lazy might need similar nudging but restarting should do in a pinch.)
Not 100% sure I followed this correctly, but essentially repeatedly tried placing vim.loader.enable()
at top / bottom of "doesn't work" config and saw no change. Let me know in case I did not properly tested what you had in mind. Didn't seem to make a difference.
I found for more evidence by inspecting the loader via
:lua vim.print(vim.loader.find("*", { all = true }))
"works": includes the
{
modname = "hotpot-ftplugin",
modpath = "/home/fdschmidt/.cache/nvim_clean/hotpot/compiled/ftplugin-nvim_clean/lua/hotpot-ftplugin"
},
while "doesn't work" does not.
E: Some more hopefully helpful analysis. I can get hotpot
to source ftplugin
s correctly, if I add the compiled path manually to runtime paths after lazy.nvim
has been setup. lazy.nvim
seems to "remove" that folder from RTPs / loader, since adding it before has no effect. I have not looked into depth of nvim
startup routines, but I guess lazy.nvim
is clearing the cache somehow?
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`
"https://github.com/rktjmp/hotpot.nvim.git",
hotpotpath,
})
end
-- Doesn't actually add the ftplugin-nvim_clean path to neither RTP nor loader
vim.opt.runtimepath:prepend({"/home/fdschmidt/.cache/nvim_clean/hotpot/compiled/ftplugin-nvim_clean/", hotpotpath, lazypath})
require("hotpot").setup()
local plugins = {"rktjmp/hotpot.nvim"}
require("lazy").setup(plugins)
-- seem to have to after require("lazy").setup(plugins)
-- then, path appears in loader and list of RTP
vim.opt.runtimepath:prepend({"/home/fdschmidt/.cache/nvim_clean/hotpot/compiled/ftplugin-nvim_clean/"})
from hotpot.nvim.
About to get into this, but if you're writing a plugin anyway, you might prefer to use the build-ahead-of-time stuff described here: https://github.com/rktjmp/hotpot.nvim/blob/master/COOKBOOK.md#writing-a-plugin which will just give you lua files in the normal lua spot, which should be ok with lazy.
You'd have to add a custom pattern to the build list so hotpot looks at ftplugin/
when building:
build = {
{"fnl/**/*macro*.fnl", false},
{"fnl/**/*.fnl", true},
{"ftplugin/*.fnl", true}
}
You can also apply it to your config if you want to do that too.
from hotpot.nvim.
Should be fixed in 0.9.1
from hotpot.nvim.
Related Issues (20)
- 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
- 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
- "The hotpot.api.make usage has changed" on v0.9.7 HOT 4
- 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 2
- Error loading `init.fnl` looking in `.config/fnlm/fnl` instead of `.config/nvim/fnl` HOT 4
- Compiler environment for plugins HOT 2
- Recompilation via `require` fails silently HOT 3
- Usage of a source directory other than `fnl/` HOT 2
- Pass relative path to .hotpot.lua build/clean functions
- How to configure fennel-ls HOT 3
- Macro path configuration HOT 6
- `vim.health.report_{start,info,ok}()` is deprecated HOT 1
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.