Comments (8)
Thank you for the kind comment :)
To use macros before registering it with plugin manager, we have to add the root paths of macros to 'runtimepath' manually.
It is common to do that when we write our config on some features of such plugins as runtime compiler, macros, any other Lua/Vimscript functions, or plugin manager itself.
In most cases, plugin manager should only manage the versions for such plugins.
Thus, lazy.nvim can support nvim-laurel on version control, but we need another script to make sure nvim-laurel macros are ready in 'runtimepath' before. For example,
-- In init.lua or somewhere else
local function prerequisites(name, url)
-- To manage the version of repo, the path should be where your plugin manager will download it.
-- In this example, I use lazy.nvim because it specifies its default download path and it manages plugins without 'packpath'.
-- Adjust `dir` if you prefer another plugin manager.
local dir = vim.fn.stdpath("data") .. "/lazy"
local path = dir .. "/" .. name
if not vim.loop.fs_stat(path) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
url,
path,
})
end
vim.opt.runtimepath:prepend(path)
end
-- Install your favorite plugin manager.
prerequisites("lazy.nvim", "https://github.com/folke/lazy.nvim")
-- prerequisites("packer.nvim", "https://github.com/wbthomason/packer.nvim")
-- prerequisites("dein.vim", "https://github.com/Shougo/dein.vim")
-- Install macros like nvim-laurel
prerequisites("nvim-laurel", "https://github.com/aileot/nvim-laurel")
-- Install a runtime compiler if you feel like
prerequisites("hotpot.nvim", "https://github.com/rktjmp/hotpot.nvim")
require("hotpot").setup({
compiler = {
macros = {
env = "_COMPILER",
allowedGlobals = false,
},
},
})
require("load-plugins-by-lazy")
;; In ~/.config/nvim/fnl/load-plugins-by-lazy.fnl
(local lazy (require :lazy))
(local opts {:defaults {:lazy true}})
;; Just manage their versions
(lazy.setup [:rktjmp/hotpot.nvim
:aileot/nvim-laurel
...]
opts)
P.S. I have updated nvim-fnl, a part of my private dotfiles. I hope it can be of some help to you ;)
from nvim-laurel.
i guess the files are ~/.config/nvim/init.lua
~/.config/nvim/fnl/load-plugins-by-lazy.fnl
?
i tried different versions.. but lazy try to download it from git?
from nvim-laurel.
Yes, you are right. The path was wrong. I fixed the path in the snippet above.
I mean it as a sample local module to manage plugins with lazy.nvim in Fennel.
from nvim-laurel.
Ah, okay, my bad; I thought this was a working example; I think I was too tired to realize this.
my fennel game is still very weak, I tried to make it work and failed. I will take a look on it tomorrow after some sleep. :D
from nvim-laurel.
okay, i think i need to wait until you have time for more instructions.
i forked your config and tried.
https://github.com/luxus/nvim-fnl
thanks for all your answers so far, keep up the good work. and maybe post it on reddit if you want some traction
from nvim-laurel.
I have to say ...
in the snippets just represents ellipsis, not varargs (Variadic Arguments). You should simply remove it or replace it with other plugins like :folke/tokyonight.nvim
.
from nvim-laurel.
great :D haha i thought that the ... is some fennel magic its working now .. wonderful
from nvim-laurel.
Good. I hope you enjoy Neovim, and sleep tight 👍
from nvim-laurel.
Related Issues (20)
- fix!(autocmd|keymap): list other than anonymous function in rhs should result in string by default
- feat(option): add `wo!`, `bo!`, ..., macros HOT 1
- docs(macros): rewrite `?foo` to `[foo]` to distinguish nillable and omittable HOT 1
- docs(macros): note `#(vim.schedule #(foo))` in anti-pattern
- perf(desc): remove unnecessary desc inference HOT 2
- test(option): compiled with `--no-compiler-sandbox`, `bo!`/`wo!` fails with value in kv-table
- how to get started HOT 1
- feat(autocmd): detect `&vim` indicator to set Vim Ex command
- feat(keymap): detect `&vim` indicator to set key sequence
- feat(autocmd): detect `^<.+>` from symbol/list to set command HOT 1
- feat(keymap): detect `^<.+>` from symbol/list to set command
- feat(autocmd): deprecate the options: `<command>`, `cb`, `<command>`, and `ex`
- feat(keymap): deprecate the options: `<command>`, `cb`, `<command>`, and `ex`
- feat(autocmd): deprecate quote format
- feat(keymap): deprecate quote format for callback & list for ex-command
- docs(vimdoc): update doc how to pass symbol/list as Vim script HOT 1
- feat(command): deprecate unnecessary support of quoted format for callback
- feat: add interface to set default options HOT 1
- refactor(utils): update on _G.vim.g.laurel_deprecated at compile time 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 nvim-laurel.