Skip to content

Commit d847c95

Browse files
committed
🚑 Source vimrc on nvimp
1 parent 28308a0 commit d847c95

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bin/nvimp

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
-- luacheck: ignore 111 113
2+
---@diagnostic disable: undefined-global
13
#!/usr/bin/env -S nvim --headless -l
24
local utils = require "prompt.utils"
35

6+
if require"prompt".name == "lua" then
7+
local file = vim.fs.joinpath(vim.fn.stdpath("config"), "init.vim")
8+
if vim.fn.filereadable(file) == 1 then
9+
vim.cmd.source(file)
10+
end
11+
file = vim.fs.joinpath(vim.fn.stdpath("config"), "init.lua")
12+
if vim.fn.filereadable(file) == 1 then
13+
loadfile(file)()
14+
end
15+
end
16+
417
utils.init()
518
-- use ~/.config/nvim/init.vim
619
-- utils.source_configs()

0 commit comments

Comments
 (0)