add load_paths
This commit is contained in:
parent
dd473593d5
commit
d38c691151
2 changed files with 49 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ function M.setup(opts)
|
|||
opts = opts or opts
|
||||
|
||||
M.langs = opts.langs and opts.langs or {}
|
||||
M.load_paths = opts.load_paths and opts.load_paths or {}
|
||||
|
||||
M._here = vim.fn.fnamemodify(debug.getinfo(1).source:sub(2), ":p:h")
|
||||
M._run_by_name = M._here .. "/run_by_name.el"
|
||||
|
|
@ -26,6 +27,17 @@ function M.setup(opts)
|
|||
"(setq make-backup-files nil)",
|
||||
}
|
||||
|
||||
vim.list_extend(
|
||||
M._base_cmd,
|
||||
vim.fn.reduce(M.load_paths, function(acc, value)
|
||||
vim.list_extend(acc, {
|
||||
"--eval",
|
||||
[[(add-to-list 'load-path "]] .. value .. [[")]],
|
||||
})
|
||||
return acc
|
||||
end, {})
|
||||
)
|
||||
|
||||
vim.list_extend(M._base_cmd, {
|
||||
"--eval",
|
||||
"(org-babel-do-load-languages 'org-babel-load-languages '(" .. vim.fn.reduce(M.langs, function(acc, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue