FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
diffview.nvim/scripts/test_init.lua at main · Naxdy/diffview.nvim · GitHub
Naxdy
/
diffview.nvim
Public
forked from
sindrets/diffview.nvim
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
diffview.nvim
/
scripts
/
test_init.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (33 loc) · 1 KB
Breadcrumbs
diffview.nvim
/
scripts
/
test_init.lua
Copy path
File metadata and controls
37 lines (33 loc) · 1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local
M
=
{}
function
M
.
root
(
root
)
local
f
=
debug.getinfo
(
1
,
"
S
"
).
source
:
sub
(
2
)
return
vim
.
fn
.
fnamemodify
(
f
,
"
:p:h:h
"
)
..
"
/
"
..
(
root
or
"
"
)
end
---
@param
plugin
string
function
M
.
load
(
plugin
)
local
name
=
plugin
:
match
(
"
.*/(.*)
"
)
local
package_root
=
M
.
root
(
"
.tests/site/pack/deps/start/
"
)
if
not
vim
.
loop
.
fs_stat
(
package_root
..
name
)
then
print
(
"
Installing
"
..
plugin
)
vim
.
fn
.
mkdir
(
package_root
,
"
p
"
)
vim
.
fn
.
system
({
"
git
"
,
"
clone
"
,
"
--depth=1
"
,
"
https://github.com/
"
..
plugin
..
"
.git
"
,
package_root
..
"
/
"
..
name
,
})
end
end
function
M
.
setup
()
vim
.
cmd
(
[[
set runtimepath=$VIMRUNTIME
]]
)
vim
.
opt
.
runtimepath
:
append
(
M
.
root
())
vim
.
opt
.
packpath
=
{
M
.
root
(
"
.tests/site
"
) }
M
.
load
(
"
nvim-lua/plenary.nvim
"
)
vim
.
env
.
XDG_CONFIG_HOME
=
M
.
root
(
"
.tests/config
"
)
vim
.
env
.
XDG_DATA_HOME
=
M
.
root
(
"
.tests/data
"
)
vim
.
env
.
XDG_STATE_HOME
=
M
.
root
(
"
.tests/state
"
)
vim
.
env
.
XDG_CACHE_HOME
=
M
.
root
(
"
.tests/cache
"
)
require
(
"
diffview.tests.init
"
)
end
M
.
setup
()
Back
|
FazBrowse Home
|
New Git URL