File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 7
7
8
8
local config = require (" papis.config" )
9
9
local api = vim .api
10
+ local has_run = false
10
11
11
12
--- Creates the `autocmd` that starts papis.nvim when configured conditions are fulfilled
12
13
local function make_start_autocmd ()
13
14
local load_papis = api .nvim_create_augroup (" loadPapis" , { clear = true })
14
15
api .nvim_create_autocmd (" FileType" , {
15
16
once = true ,
16
17
pattern = config .init_filetypes ,
17
- callback = require (" papis" ).start ,
18
+ callback = function ()
19
+ if not has_run then
20
+ require (" papis" ).start ()
21
+ end
22
+ end ,
18
23
group = load_papis ,
19
24
desc = " Load papis.nvim for defined filetypes" ,
20
25
})
@@ -52,6 +57,8 @@ function M.start()
52
57
log .new (config [" log" ] or log .get_default_config (), true )
53
58
log .debug (" _________________________STARTING PAPIS.NVIM_________________________" )
54
59
60
+ has_run = true
61
+
55
62
-- set up db
56
63
local db = require (" papis.sqlite-wrapper" )
57
64
if not db then
You can’t perform that action at this time.
0 commit comments