/**
 * @file extensions.libjsonnet
 * @namespace vscode::extensions
 * @brief Generate extension recommendations for `extensions.json`.
 */
{
  local python_recommendations(settings) = [
    'charliermarsh.ruff',
    'donjayamanne.python-environment-manager',
    'ms-python.mypy-type-checker',
    'ms-python.vscode-pylance',
    'samuelcolvin.jinjahtml',
  ] + if settings.package_manager == 'uv' then [] else ['zeshuaro.vscode-python-poetry'],
  local python_unwanted_recommendations = ['ms-python.vscode-python-envs'],
  /**
   * Get the extension recommendations based on the project settings.
   * @param settings The project settings.
   * @returns An object with `recommendations` and `unwantedRecommendations` arrays.
   * @pt object
   * @rv object
   *
   * <dl>
   * <dt>Returned Structure</dt>
   * <dd>
   * @code
   * {
   *   recommendations: string[],
   *   unwantedRecommendations: string[],
   * }
   * @endcode
   * </dd>
   * </dl>
   */
  get(settings):: {
    recommendations: std.set([
      'Grafana.vscode-jsonnet',
      'aaron-bond.better-comments',
      'bierner.markdown-checkbox',
      'buianhthang.xml2json',
      'christian-kohler.npm-intellisense',
      'christian-kohler.path-intellisense',
      'davidanson.vscode-markdownlint',
      'donjayamanne.githistory',
      'dotjoshjohnson.xml',
      'eamodio.gitlens',
      'esbenp.prettier-vscode',
      'foxundermoon.shell-format',
      'github.vscode-pull-request-github',
      'henriiik.vscode-sort',
      'ivangabriele.vscode-git-add-and-commit',
      'jeffersonlicet.snipped',
      'jmredfern.sort-selection',
      'konstantin.wrapselection',
      'lextudio.restructuredtext',
      'naumovs.color-highlight',
      'nhoizey.gremlins',
      'pascalreitermann93.vscode-yaml-sort',
      'redhat.vscode-xml',
      'redhat.vscode-yaml',
      'richie5um2.vscode-sort-json',
      'ruiquelhas.vscode-lowercase',
      'ruiquelhas.vscode-uppercase',
      'streetsidesoftware.code-spell-checker',
      'tamasfe.even-better-toml',
      'timonwong.shellcheck',
      'tyriar.sort-lines',
      'wayou.vscode-todo-highlight',
      'wmaurer.change-case',
      'visualstudioexptteam.intellicode-api-usage-examples',
      'visualstudioexptteam.vscodeintellicode',
      'zainchen.json',
      'zengxingxin.sort-js-object-keys',
    ] + (if settings.project_type == 'python' then python_recommendations(settings)
         else []) + (if settings.project_type == 'python' && settings.want_yapf then ['eeyore.yapf'] else [])),
    unwantedRecommendations: if settings.project_type == 'python' then python_unwanted_recommendations else [],
  },
}
