Comments (2)
@monkoose, not sure if you are still using hotpot, do you have a particularly large amount of complex macros?
Looking at this line, we have to clear the in-memory versions of macros each time we build and can be expensive to code-gen.
hotpot.nvim/fnl/hotpot/api/make.fnl
Lines 83 to 90 in bedc290
from hotpot.nvim.
I do use it, but I have converted it to use .hotpot.lua only and compile on demand, and compile into /lua directory and not use any cache files. It requires some workaround in init.lua, but after that it works like a charm, doesn't preload hotpot on neovim startup and compiles when any fennel file in my config was changed.
And maybe it was some macro issue, because previously I have used vim.api
functions in some of my macros and with such option to make it work like that
compiler = {
macros = {
env = "_COMPILER",
compilerEnv = _G,
allowedGlobals = false,
},
},
But after I have realized that this is wrong approach and it messes up with other fennel compilers (from aniseed or fennel-ls) I have fixed it, but I have already switched to using hotpot only on demand, so can't be sure that it was the issue.
My init.lua looks like this (there is workaround to make neovim work on first startup, when there are missing compiled files)
vim.loader.enable()
local plugins_path = vim.fn.stdpath("data") .. "/lazy"
local config_path = vim.fn.stdpath("config")
-- Bootstrap lazy.nvim
local lazy_path = plugins_path .. "/lazy.nvim"
if not vim.loop.fs_stat(lazy_path) then
vim.notify("Fetching lazy.nvim...", vim.log.levels.INFO)
vim.fn.system({
"git",
"clone",
"--depth=1",
"--filter=blob:none",
"--single-branch",
-- "--branch=stable", -- latest stable release
"https://github.com/folke/lazy.nvim.git",
lazy_path,
})
end
vim.opt.runtimepath:prepend(lazy_path)
local ok, plugins = pcall(require, "plugins.lazy")
if not ok then
vim.print(plugins)
plugins = {
{
"rktjmp/hotpot.nvim",
dependencies = "monkoose/parsley",
config = function() require("hotpot.api.make").auto.build(config_path) end,
},
}
end
require("lazy").setup({
performance = {
rtp = {
disabled_plugins = {
"gzip",
"tarPlugin",
"zipPlugin",
"matchparen",
"tutor",
"matchit",
"tohtml",
"rplugin",
},
},
},
ui = { border = {'┏', '━', '┓', '┃', '┛', '━', '┗', '┃'} },
spec = plugins,
})
require("conf.options")
require("statusline")
require("conf.autocmds")
require("conf.maps")
.hotpot.lua
return {
compiler = {
macros = {
env = "_COMPILER",
compilerEnv = _G,
},
},
build = {
{atomic = true},
{"fnl/**/*macros.fnl", false},
{"fnl/**/*.fnl", true},
{"colors/*.fnl", true},
{"after/**/*.fnl", true},
},
clean = {
{"lua/**/*.lua", true}
}
}
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
- 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
- "The hotpot.api.make usage has changed" on v0.9.7 HOT 4
- 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.