FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
diffview.nvim/lua/diffview/bootstrap.lua at main · vramana/diffview.nvim · GitHub
vramana
/
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
/
lua
/
diffview
/
bootstrap.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
56 lines (46 loc) · 1.51 KB
Breadcrumbs
diffview.nvim
/
lua
/
diffview
/
bootstrap.lua
Copy path
File metadata and controls
56 lines (46 loc) · 1.51 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
if
DiffviewGlobal
and
DiffviewGlobal
.
bootstrap_done
then
return
DiffviewGlobal
.
bootstrap_ok
end
local
lazy
=
require
(
"
diffview.lazy
"
)
local
EventEmitter
=
lazy
.
access
(
"
diffview.events
"
,
"
EventEmitter
"
)
---
@type
EventEmitter
|
LazyModule
local
Logger
=
lazy
.
access
(
"
diffview.logger
"
,
"
Logger
"
)
---
@type
Logger
|
LazyModule
local
config
=
lazy
.
require
(
"
diffview.config
"
)
---
@module
"
diffview.config
"
local
diffview
=
lazy
.
require
(
"
diffview
"
)
---
@module
"
diffview
"
local
utils
=
lazy
.
require
(
"
diffview.utils
"
)
---
@module
"
diffview.utils
"
local
uv
=
vim
.
loop
local
function
err
(
msg
)
msg
=
msg
:
gsub
(
"
'
"
,
"
''
"
)
vim
.
cmd
(
"
echohl Error
"
)
vim
.
cmd
(
string.format
(
"
echom '[diffview.nvim] %s'
"
,
msg
))
vim
.
cmd
(
"
echohl NONE
"
)
end
_G
.
DiffviewGlobal
=
{
bootstrap_done
=
true
,
bootstrap_ok
=
false
,
}
if
vim
.
fn
.
has
(
"
nvim-0.7
"
)
~=
1
then
err
(
"
Minimum required version is Neovim 0.7.0! Cannot continue.
"
..
"
(See ':h diffview.changelog-137')
"
)
return
false
end
_G
.
DiffviewGlobal
=
{
---
Debug Levels:
---
0: NOTHING
---
1: NORMAL
---
5: LOADING
---
10: RENDERING & ASYNC
---
@diagnostic
disable-next-line
:
missing-parameter
debug_level
=
tonumber
((
uv
.
os_getenv
(
"
DEBUG_DIFFVIEW
"
)))
or
0
,
state
=
{},
bootstrap_done
=
true
,
bootstrap_ok
=
true
,
}
DiffviewGlobal
.
logger
=
Logger
()
DiffviewGlobal
.
emitter
=
EventEmitter
()
DiffviewGlobal
.
emitter
:
on_any
(
function
(
e
,
args
)
diffview
.
nore_emit
(
e
.
id
,
utils
.
tbl_unpack
(
args
))
config
.
user_emitter
:
nore_emit
(
e
.
id
,
utils
.
tbl_unpack
(
args
))
end
)
return
true
Back
|
FazBrowse Home
|
New Git URL