print("Loaded project-specific config from .nvim.lua!")

function dump(o)
   if type(o) == 'table' then
      local s = '{ '
      for k,v in pairs(o) do
         if type(k) ~= 'number' then k = '"'..k..'"' end
         s = s .. '['..k..'] = ' .. dump(v) .. ','
      end
      return s .. '} '
   else
      return tostring(o)
   end
end

--dump(vim.g.rustaceanvim.server)
vim.g.rustaceanvim = {
  server = {
    on_attach = function(client, bufnr)
      print("We've attached!!!")
    end,
    default_settings = {
      ['rust-analyzer'] = {
        cargo = {
          buildScripts = {
            enable = true,
          },
          extraEnv = {
            ["CUSTOM_ENV"] = "blah",
          },
          features = "all",
        },
        check = {
          allTargets = true,
          features = "all",
          overrideCommand = {
            "cargo",
            "clippy",
            "--message-format=json",
            "--all-targets",
            "--all-features",
          },
        },
      },
    },
  },
}
