File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,16 @@ return {
2323 },
2424 },
2525 opts = function ()
26- local metals = require " metals"
26+ local metals , astrocore = require " metals" , require " astrocore "
2727 local astrolsp_avail , astrolsp = pcall (require , " astrolsp" )
2828 local user_config = astrolsp_avail and astrolsp .lsp_opts " metals" or {}
29- if require (" astrocore" ).is_available " nvim-dap" then
30- local on_attach = user_config .on_attach
31- user_config .on_attach = function (...)
32- if type (on_attach ) == " function" then on_attach (... ) end
29+ if astrocore .is_available " nvim-dap" then
30+ user_config .on_attach = astrocore .patch_func (user_config .on_attach , function (orig , ...)
31+ orig (... )
3332 metals .setup_dap ()
34- end
33+ end )
3534 end
36- return require ( " astrocore" ) .extend_tbl (metals .bare_config (), user_config )
35+ return astrocore .extend_tbl (metals .bare_config (), user_config )
3736 end ,
3837 config = function (self , opts )
3938 vim .api .nvim_create_autocmd (" FileType" , {
You can’t perform that action at this time.
0 commit comments