File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,31 +94,17 @@ defold.nvim is replacing these variables in the arguments list
9494``` lua
9595-- install the plugin
9696vim .pack .add ({
97- -- optional dependencies
98- " https://github.com/mfussenegger/nvim-dap" , -- (Optional) Required when using the debugger
99- " https://github.com/L3MON4D3/LuaSnip" , -- (Optional) Required when using snippets
97+ -- (Optional) Required when using the debugger
98+ " https://github.com/mfussenegger/nvim-dap" ,
99+ -- (Optional) Required when using snippets
100+ " https://github.com/L3MON4D3/LuaSnip" ,
100101
101102 " https://github.com/atomicptr/defold.nvim" ,
102103})
103104
104- -- setup the plugin
105- require (" defold" ).setup ({
105+ require (" defold" ).setup {
106106 -- config options, see below
107- })
108-
109- -- download the native library at installation/updates
110- vim .api .nvim_create_autocmd (" PackChanged" , {
111- callback = function (ev )
112- if ev .data .spec .name ~= " defold.nvim" then
113- return
114- end
115-
116- if ev .data .kind == " install" or ev .data .kind == " update" then
117- require (" defold" ).download ()
118- end
119- end ,
120- })
121-
107+ }
122108```
123109
124110### Lazy.nvim
Original file line number Diff line number Diff line change 1- require (" defold" ).setup ()
1+ require (" defold" ).setup {}
2+
3+ if vim .version .cmp (vim .version (), { 0 , 12 , 0 }) >= 0 then
4+ vim .api .nvim_create_autocmd (" PackChanged" , {
5+ callback = function (ev )
6+ if ev .data .spec .name ~= " defold.nvim" then
7+ return
8+ end
9+
10+ if ev .data .kind == " install" or ev .data .kind == " update" then
11+ require (" defold" ).download ()
12+ end
13+ end ,
14+ })
15+ end
You can’t perform that action at this time.
0 commit comments