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:
SHELLbash kubectl delete pods -l app=sourcegraph-frontend
Reference
Settings options and their default values are shown below.
admin/config/settings.schema.json
JSON{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "settings.schema.json#", "title": "Settings", "description": "Configuration settings for users and organizations on Sourcegraph.", "allowComments": true, "type": "object", "additionalProperties": true, "properties": { "siteWideSearchContext": { "title": "SettingsSiteWideSearchContext", "description": "Enables default site wide search context. Only admins can set this. Individual users can override with their own search context.", "type": "string", "!go": { "pointer": true } }, "experimentalFeatures": { "title": "SettingsExperimentalFeatures", "description": "Experimental features and settings.", "type": "object", "additionalProperties": true, "properties": { "newSearchResultFiltersPanel": { "description": "Enables new experimental search results filters panel", "type": "boolean", "default": false, "!go": { "pointer": true } }, "newSearchNavigationUI": { "description": "Enables new experimental search UI navigation", "type": "boolean", "default": false, "!go": { "pointer": true } }, "newSearchResultsUI": { "description": "Enables new experimental search results UI, such as preview panel feature and updated search and filter layouts.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "codeInsightsRepoUI": { "description": "Specifies which (code insight repo) editor to use for repo query UI", "type": "string", "default": "single-search-query", "enum": ["old-strict-list", "single-search-query", "search-query-or-strict-list"], "!go": { "pointer": true } }, "searchContextsQuery": { "description": "DEPRECATED: This feature is now permanently enabled. Enables query based search contexts", "type": "boolean", "default": false, "!go": { "pointer": true } }, "fuzzyFinder": { "description": "Enables fuzzy finder with the keyboard shortcut `Cmd+K` on macOS and `Ctrl+K` on Linux/Windows.", "type": "boolean", "!go": { "pointer": true } }, "fuzzyFinderNavbar": { "description": "Enables the 'Fuzzy finder' action in the global navigation bar", "type": "boolean", "!go": { "pointer": true } }, "fuzzyFinderAll": { "description": "Enables the 'All' tab of the fuzzy finder", "type": "boolean", "!go": { "pointer": true } }, "fuzzyFinderActions": { "description": "Enables the 'Actions' tab of the fuzzy finder", "type": "boolean", "!go": { "pointer": true } }, "fuzzyFinderRepositories": { "description": "Enables the 'Repositories' tab of the fuzzy finder", "type": "boolean", "!go": { "pointer": true } }, "fuzzyFinderSymbols": { "description": "Enables the 'Symbols' tab of the fuzzy finder", "type": "boolean", "!go": { "pointer": true } }, "fuzzyFinderCaseInsensitiveFileCountThreshold": { "description": "The maximum number of files a repo can have to use case-insensitive fuzzy finding", "type": "number", "default": 25000, "!go": { "pointer": true } }, "batchChangesExecution": { "description": "Enables/disables the Batch Changes server side execution feature.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "clientSearchResultRanking": { "description": "How to rank search results in the client", "type": "string", "default": "by-zoekt-ranking", "examples": ["by-line-number", "by-zoekt-ranking"], "!go": { "pointer": true } }, "showCodeMonitoringLogs": { "description": "Shows code monitoring logs tab.", "type": "boolean", "default": false, "!go": { "pointer": true } }, "goCodeCheckerTemplates": { "description": "Shows a panel with code insights templates for go code checker results.", "type": "boolean", "default": false, "!go": { "pointer": true } }, "codeInsightsCompute": { "description": "Enables Compute powered Code Insights", "type": "boolean", "default": false, "!go": { "pointer": true } }, "enableLazyBlobSyntaxHighlighting": { "description": "Fetch un-highlighted blob contents to render immediately, decorate with syntax highlighting once loaded.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "enableSidebarFilePrefetch": { "description": "Pre-fetch plaintext file revisions from sidebar on hover/focus.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "enableSearchFilePrefetch": { "description": "Pre-fetch plaintext file revisions from search results on hover/focus.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "enableLazyFileResultSyntaxHighlighting": { "description": "Fetch un-highlighted file result contents to render immediately, decorate with syntax highlighting once loaded.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "searchResultsAggregations": { "description": "Display aggregations for your search results on the search screen.", "type": "boolean", "default": false, "!go": { "pointer": true } }, "proactiveSearchResultsAggregations": { "description": "Search results aggregations are triggered automatically with a search.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "symbolKindTags": { "description": "Show the initial letter of the symbol kind instead of icons.", "type": "boolean", "default": false }, "searchQueryInput": { "description": "Specify which version of the search query input to use", "type": "string", "default": "v1", "enum": ["v1", "v2"], "!go": { "pointer": true } }, "keywordSearch": { "description": "DEPRECATED: this setting is no longer used. To disable keyword search, set `search.defaultPatternType: standard` instead.", "type": "boolean", "default": true }, "disableOrderBySimilarity": { "description": "Disables ordering of repository search results by similarity.", "type": "boolean", "default": false }, "boostRelevantRepositories": { "description": "Boosts repositories that users have contributed to in the search results.", "type": "boolean", "default": true, "!go": { "pointer": true } } }, "group": "Experimental" }, "openInEditor": { "title": "SettingsOpenInEditor", "description": "Group of settings related to opening files in an editor.", "type": "object", "additionalProperties": false, "properties": { "editorIds": { "description": "The editor to open files in. If set to this to \"custom\", you must also set \"custom.urlPattern\"", "type": "array", "items": { "type": "string", "enum": [ "appcode", "atom", "clion", "goland", "idea", "phpstorm", "pycharm", "rider", "rubymine", "sublime", "vscode", "webstorm", "custom" ] } }, "projectPaths.default": { "description": "The absolute path on your computer where your git repositories live. All git repos to open have to be cloned under this path with their original names. \"/Users/yourusername/src\" is a valid absolute path, \"~/src\" is not. Works both with and without a trailing slash.", "type": "string" }, "projectPaths.linux": { "description": "Overrides the default path when the browser detects Linux. Works both with and without a trailing slash.", "type": "string" }, "projectPaths.mac": { "description": "Overrides the default path when the browser detects macOS. Works both with and without a trailing slash.", "type": "string" }, "projectPaths.windows": { "description": "Overrides the default path when the browser detects Windows. Doesn't need a trailing backslash.", "type": "string" }, "replacements": { "description": "Each key will be replaced by the corresponding value in the final URL. Keys are regular expressions, values can contain backreferences ($1, $2, ...).", "type": "object", "propertyNames": { "type": "string", "description": "A regular expression to match against URLs." }, "additionalProperties": { "type": "string", "description": "Replace string. For backreferences to capturing groups, use $1, $2, ..." } }, "jetbrains.forceApi": { "description": "Forces using protocol handlers (like ikea://open?file=...) or the built-in REST API (http://localhost:63342/api/file...). If omitted, protocol handlers are used if available, otherwise the built-in REST API is used.", "type": "string", "enum": ["protocolHandler", "builtInServer"] }, "vscode.isProjectPathUNCPath": { "description": "Indicates that the given project path is a UNC (Universal Naming Convention) path.", "type": "boolean", "default": false }, "vscode.useInsiders": { "description": "If set, files will open in VS Code Insiders rather than VS Code.", "type": "boolean", "default": false }, "vscode.useSSH": { "description": "If set, files will open on a remote server via SSH. This requires vscode.remoteHostForSSH to be specified and VS Code extension \"Remote Development by Microsoft\" installed in your VS Code.", "type": "boolean", "default": false }, "vscode.remoteHostForSSH": { "description": "The remote host as \"USER@HOSTNAME\". This needs you to install the extension called \"Remote Development by Microsoft\" in your VS Code.", "type": "string" }, "custom.urlPattern": { "description": "If you add \"custom\" to openineditor.editorIds, this must be set. Use the placeholders \"%file\", \"%line\", and \"%col\" to mark where the file path, line number, and column number must be insterted. Example URL for IntelliJ IDEA: \"idea://open?file=%file&line=%line&column=%col\"", "type": "string" } } }, "search.scopes": { "description": "Predefined search snippets that can be appended to any search (also known as search scopes)", "type": "array", "items": { "$ref": "#/definitions/SearchScope" } }, "codeIntel.disableSearchBased": { "description": "Never fall back to search-based code intelligence.", "type": "boolean" }, "codeIntel.traceExtension": { "description": "Whether to enable trace logging on the extension.", "type": "boolean" }, "codeIntel.disableRangeQueries": { "description": "Whether to fetch multiple precise definitions and references on hover.", "type": "boolean" }, "codeIntel.mixPreciseAndSearchBasedReferences": { "description": "Whether to supplement precise references with search-based results.", "type": "boolean" }, "basicCodeIntel.includeForks": { "description": "Whether to include forked repositories in search results.", "type": "boolean" }, "basicCodeIntel.includeArchives": { "description": "Whether to include archived repositories in search results.", "type": "boolean" }, "basicCodeIntel.globalSearchesEnabled": { "description": "Whether to run global searches over all repositories. On instances with many repositories, this can lead to issues such as: low quality results, slow response times, or significant load on the Sourcegraph instance. Defaults to true.", "type": "boolean" }, "basicCodeIntel.indexOnly": { "description": "Whether to use only indexed requests to the search API.", "type": "boolean" }, "basicCodeIntel.unindexedSearchTimeout": { "description": "The timeout (in milliseconds) for un-indexed search requests.", "type": "number" }, "search.contextLines": { "description": "The default number of lines to show as context below and above search results. Default is 1.", "type": "integer", "minimum": 0, "default": 1, "!go": { "pointer": true } }, "search.defaultMode": { "description": "DEPRECATED: this setting is no longer read when the default 'keyword' patterntype is enabled, which always uses the 'precise' mode. Smart search will be removed in a future release.", "type": "string", "pattern": "precise|smart" }, "search.defaultPatternType": { "description": "The default pattern type that search queries will be interpreted as.", "type": "string", "pattern": "standard|literal|regexp|keyword|codycontext" }, "search.defaultCaseSensitive": { "description": "Whether query patterns are treated case sensitively. Patterns are case insensitive by default.", "type": "boolean", "default": false }, "search.displayLimit": { "description": "The number of results we send down during a search. Note: this is different to the count: in the query. The search will continue once we hit displayLimit and updated filters and statistics will continue to stream down. Defaults to 1500.", "type": "integer", "minimum": 1, "default": 1500, "!go": { "pointer": true } }, "search.includeForks": { "description": "Whether searches should include searching forked repositories.", "type": "boolean", "default": false, "!go": { "pointer": true } }, "search.includeArchived": { "description": "Whether searches should include searching archived repositories.", "type": "boolean", "default": false, "!go": { "pointer": true } }, "quicklinks": { "description": "DEPRECATED: This setting will be removed in a future version of Sourcegraph.", "type": "array", "items": { "$ref": "#/definitions/QuickLink" } }, "fileSidebarVisibleByDefault": { "description": "Whether the sidebar on the repo view should be open by default.", "type": "boolean", "default": true }, "motd": { "description": "DEPRECATED: Use `notices` instead.\n\nAn 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).\n\nMarkdown formatting is supported.\n\nUsually 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.)\n\nMOTD stands for \"message of the day\" (which is the conventional Unix name for this type of message).", "type": "array", "items": { "type": "string" } }, "history.preferAbsoluteTimestamps": { "description": "Show absolute timestamps in the history panel and only show relative timestamps (e.g.: \"5 days ago\") in tooltip when hovering.", "type": "boolean", "default": false }, "history.defaultPageSize": { "description": "Custom page size for the history tab. If set, the history tab will populate that number of commits the first time the history tab is opened and then double the number of commits progressively.", "type": "integer", "minimum": 1, "maximum": 100 }, "notices": { "description": "Custom informational messages to display to users at specific locations in the Sourcegraph user interface.\n\nUsually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that single user.", "type": "array", "items": { "title": "Notice", "type": "object", "required": ["message", "location"], "additionalProperties": false, "properties": { "message": { "description": "The message to display. Markdown formatting is supported.", "type": "string" }, "location": { "description": "The location where this notice is shown: \"top\" for the top of every page, \"home\" for the homepage.", "type": "string", "enum": ["top", "home"] }, "variant": { "type": "string", "enum": ["primary", "secondary", "success", "danger", "warning", "info", "note"] }, "dismissible": { "description": "Whether this notice can be dismissed (closed) by the user.", "type": "boolean", "default": false }, "styleOverrides": { "description": "Overrides for the notice's default style. You probably want to use notice 'variant' setting instead.", "type": "object", "properties": { "backgroundColor": { "description": "The hex code of the background color for this notice.", "type": "string" }, "textColor": { "description": "The hex code of the text color for this notice.", "type": "string" }, "textCentered": { "description": "Whether the notice text should be centered.", "type": "boolean" } } } } } }, "cody.notices": { "description": "Custom informational messages to display to users at Cody clients locations.\n\nUsually this setting is used in global and organization settings. If set in user settings, the message will only be displayed to that single user.", "type": "array", "items": { "title": "Cody Notice", "type": "object", "required": ["key", "title", "message"], "additionalProperties": false, "properties": { "key": { "type": "string", "description": "The notice key, everytime this field is updated the notice message appears in the cody client even if it was previously dismissed." }, "title": { "type": "string", "description": "The title of the notice/message." }, "message": { "type": "string", "description": "The message to display. Markdown formatting is supported." } } } }, "alerts.showPatchUpdates": { "description": "Whether to show alerts for patch version updates. Alerts for major and minor version updates will be shown if `alerts.showMajorMinorUpdatess` is true.", "type": "boolean", "default": true }, "alerts.showMajorMinorUpdates": { "description": "Whether to show alerts for major and minor version updates. Alerts for patch version updates will be shown if `alerts.showPatchUpdates` is true.", "type": "boolean", "default": true }, "alerts.hideObservabilitySiteAlerts": { "description": "Disables observability-related site alert banners.", "type": "boolean", "default": true, "!go": { "pointer": true } }, "search.hideSuggestions": { "description": "Disable search suggestions below the search bar when constructing queries. Defaults to false.", "type": "boolean", "default": false, "!go": { "pointer": true } }, "insights.aggregations.extendedTimeout": { "description": "The number of seconds to execute the aggregation for when running in extended timeout mode. This value should always be less than any proxy timeout if one exists. The maximum value is equal to searchLimits.maxTimeoutSeconds", "type": "integer", "group": "CodeInsights", "default": 55 }, "perforce.codeHostToSwarmMap": { "description": "Key-value pairs of code host URLs to Swarm URLs. Keys should have no prefix and should not end with a slash, like \"perforce.company.com:1666\". Values should look like \"https://swarm.company.com/\", with a slash at the end.", "type": "object", "additionalProperties": { "type": "string" }, "default": {} }, "orgs.allMembersBatchChangesAdmin": { "description": "If enabled, all members of the org will be treated as admins (e.g. can edit, apply, delete) for all batch changes created in that org.", "type": "boolean", "default": false, "!go": { "pointer": true } } }, "definitions": { "SearchScope": { "type": "object", "additionalProperties": false, "required": ["name", "value"], "properties": { "name": { "type": "string", "description": "The human-readable name for this search scope" }, "value": { "type": "string", "description": "The query string of this search scope" } } }, "QuickLink": { "type": "object", "additionalProperties": false, "required": ["name", "url"], "properties": { "name": { "type": "string", "description": "The human-readable name for this quick link" }, "url": { "type": "string", "description": "The URL of this quick link (absolute or relative)", "pattern": "^(https?://|/)" }, "description": { "type": "string", "description": "A description for this quick link" } } } } }
Additional details on settings
Notices
Notices can be added in global, organization, or user settings. The notices
setting is a list of notice configurations with the following options:
message
: the markdown copy to be displayed in the bannerlocation
: where the banner will be shown. Either on the home page with"home"
or at the top of the page with"top"
dismissible (optional)
: boolean (true
orfalse
). 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.variant (optional)
: one of"primary"
,"secondary"
,"success"
,"danger"
,"warning"
,"info"
,"note"
the style of the notice. Although specifics such as color depend on the theme in generaldanger
orprimary
will draw more attention thansecondary
ornote
. The default style depends on the location of the notice.styleOverrides (optional)
: a configuration object with the following elements:backgroundColor (optional)
: a hexadecimal color code for forcing a specific background color.textColor (optional)
: a hexadecimal color code for forcing a specific text color.textCentered (optional)
: boolean (true
orfalse
). If true, the text will be centered in the banner.
Example settings:
JSON"notices": [ { "message": "Your important message here! [Include a link for more information](http://example.com).", "location": "top", "dismissible": true, "variant": "danger", "styleOverrides": { "styleOverrides": { "backgroundColor": "#7f1d1d", "textColor": "#fecaca", "textCentered": true } } } ]