Settings

Settings provide the ability to customize and control the Sourcegraph UI and user-specific features. They do not configure operational aspects of the instance (which are set in the site configuration).

Settings can be set at the global level (by site admins), the organization level (by organization members), and at the individual user level.

Editing global settings (for site admins)

Global settings are found in Site admin > Global settings while links to organization and user settings are found in the user dropdown menu.

After setting or changing certain values in Site admin > Global settings the frontend will restart automatically or you might be asked to restart the frontend for the changes to take effect. In case of a Kubernetes deployment this can be done as follows:

bash
kubectl delete pods -l app=sourcegraph-frontend

Reference

Settings options and their default values are shown below.

Sourcegraph extensions can also define new settings properties. Check the documentation of an extension to see what settings it defines, or consult the contributes.configuration object in the extension's package.json (e.g., for the Codecov extension).

admin/config/settings.schema.json

{
	// What in-app messaging to use around availability of Sourcegraph's code intelligence on code hosts. If the native code host integration is installed, this should be set to "native-integration" and users won't need to install the Sourcegraph browser extension to get code intelligence on code hosts.
	"alerts.codeHostIntegrationMessaging": "browser-extension",

	// Disables observability-related site alert banners.
	"alerts.hideObservabilitySiteAlerts": true,

	// Whether to show alerts for patch version updates. Alerts for major and minor version updates will always be shown.
	"alerts.showPatchUpdates": true,

	// Whether to use the code host's native hover tooltips when they exist (GitHub's jump-to-definition tooltips, for example).
	"codeHost.useNativeTooltips": false,

	// Up to this number of repos are auto-indexed automatically. Ordered by star count.
	"codeIntelligence.autoIndexPopularRepoLimit": 0,

	// A list of search.repositoryGroups that have auto-indexing enabled.
	"codeIntelligence.autoIndexRepositoryGroups": null,

	// Enable click to go to definition.
	"codeIntelligence.clickToGoToDefinition": true,

	// Maximum number of references/definitions (or other code intelligence results provided by extensions) shown in the panel. If not set a default value will be used to ensure best performance.
	"codeIntelligence.maxPanelResults": null,

	// The Sourcegraph extensions to use. Enable an extension by adding a property `"my/extension": true` (where `my/extension` is the extension ID). Override a previously enabled extension and disable it by setting its value to `false`.
	"extensions": null,

	// The Sourcegraph extensions, by ID (e.g. `my/extension`), whose logs should be visible in the console.
	"extensions.activeLoggers": null,

	// Whether the sidebar on the repo view should be open by default.
	"fileSidebarVisibleByDefault": true,

	// Show absolute timestamps in the history panel and only show relative timestamps (e.g.: "5 days ago") in tooltip when hovering.
	"history.preferAbsoluteTimestamps": false,

	// EXPERIMENTAL: Code Insights
	"insights": null,

	// EXPERIMENTAL: Backend-based Code Insights
	"insights.allrepos": null,

	// EXPERIMENTAL: Code Insights Dashboards
	"insights.dashboards": null,

	"insights.displayLocation.directory": true,

	"insights.displayLocation.homepage": true,

	"insights.displayLocation.insightsPage": true,

	// DEPRECATED: Use `notices` instead.
	//
	// An array (often with just one element) of messages to display at the top of all pages, including for unauthenticated users. Users may dismiss a message (and any message with the same string value will remain dismissed for the user).
	//
	// Markdown formatting is supported.
	//
	// Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that user. (This is useful for testing the correctness of the message's Markdown formatting.)
	//
	// MOTD stands for "message of the day" (which is the conventional Unix name for this type of message).
	"motd": null,

	// Custom informational messages to display to users at specific locations in the Sourcegraph user interface.
	//
	// Usually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that single user.
	"notices": null,

	// Links that should be accessible quickly from the home and search pages.
	"quicklinks": null,

	// The default number of lines to show as context below and above search results. Default is 1.
	"search.contextLines": 1,

	// Whether query patterns are treated case sensitively. Patterns are case insensitive by default.
	"search.defaultCaseSensitive": false,

	// The default pattern type (literal or regexp) that search queries will be intepreted as.
	"search.defaultPatternType": null,

	// REMOVED. Previously an experimental setting to interpret file and repo patterns as glob syntax.
	"search.globbing": false,

	// Disable search suggestions below the search bar when constructing queries. Defaults to false.
	"search.hideSuggestions": false,

	// Whether searches should include searching archived repositories.
	"search.includeArchived": false,

	// Whether searches should include searching forked repositories.
	"search.includeForks": false,

	// REMOVED. Previously, a flag to enable and/or-expressions in queries as an aid transition to new language features in versions <= 3.24.0.
	"search.migrateParser": true,

	// DEPRECATED: Use search contexts instead.
	//
	// Named groups of repositories that can be referenced in a search query using the `repogroup:` operator. The list can contain string literals (to include single repositories) and JSON objects with a "regex" field (to include all repositories matching the regular expression). Retrieving repogroups via the GQL interface will currently exclude repositories matched by regex patterns. #14208.
	"search.repositoryGroups": null,

	// DEPRECATED: Saved search queries
	"search.savedQueries": null,

	// Predefined search snippets that can be appended to any search (also known as search scopes)
	"search.scopes": null,

	// REMOVED. Previously, when active, any uppercase characters in the pattern will make the entire query case-sensitive.
	"search.uppercase": false,

//////////////////////////////////////////////////////////////
// Experimental
//////////////////////////////////////////////////////////////

	// Experimental features to enable or disable. Features that are now enabled by default are marked as deprecated.
	"experimentalFeatures": null
}

Additional details on settings

Notices

Notices can be added in global, organization, or user settings. The notices setting is a list of configuration consisting of three elements:

  1. message: the markdown copy to be displayed in the banner
  2. location: where the banner will be shown. Either on the home page with "home" or at the top of the page with "top"
  3. dismissable: boolean (true or false). If true, users will be able to close the notice and not see it again. If false, it will persist on the instance until the configuration is removed.

Example settings:

"notices": [
  {
    "message": "Your message here! [Include a link for more information](http://example.com).",
    "location": "top",
    "dismissible": true
  }
]