diff --git a/data/schema.json b/data/schema.json index 1228302c3ae..1a924d40c43 100644 --- a/data/schema.json +++ b/data/schema.json @@ -598,13 +598,22 @@ "scope": "application", "default": "never", "description": "Interval for check extension update, could be daily, weekly, never", + "deprecationMessage": "Use configuration 'extensions.updateCheck' instead.", "enum": ["daily", "weekly", "never"] }, "coc.preferences.extensionUpdateUIInTab": { "type": "boolean", "scope": "application", "default": false, - "description": "Display extension updating UI in vim tab" + "deprecationMessage": "Use configuration 'extensions.updateUIInTab' instead.", + "description": "Display extension updating UI in new vim tab" + }, + "coc.preferences.silentAutoupdate": { + "type": "boolean", + "description": "Not open split window with update status when performing auto update.", + "deprecationMessage": "Use configuration 'extensions.silentAutoupdate' instead.", + "scope": "application", + "default": true }, "coc.preferences.floatActions": { "type": "boolean", @@ -631,7 +640,7 @@ "scope": "resource", "default": null, "description": "Filetypes that should run format on save.", - "deprecationMessage": "Use coc.preferences.formatOnSave as language override configuration instead, see :h coc-configuration-scope", + "deprecationMessage": "Use 'coc.preferences.formatOnSave' as language override configuration instead, see :h coc-configuration-scope", "items": { "type": "string" } @@ -647,7 +656,7 @@ "default": null, "scope": "resource", "description": "Filetypes that should run format on typing, only works when `coc.preferences.formatOnType` is `true`", - "deprecationMessage": "Use coc.preferences.formatOnType as language override configuration instead, see :h coc-configuration-scope", + "deprecationMessage": "Use 'coc.preferences.formatOnType' as language override configuration instead, see :h coc-configuration-scope", "items": { "type": "string" } @@ -703,12 +712,6 @@ "default": true, "description": "Disable to stop Refactor-Rename float/popup window from populating with old name in the New Name field." }, - "coc.preferences.silentAutoupdate": { - "type": "boolean", - "description": "Not open split window with update status when performing auto update.", - "scope": "application", - "default": true - }, "coc.preferences.useQuickfixForLocations": { "type": "boolean", "scope": "application", @@ -1352,6 +1355,25 @@ "default": true, "scope": "application" }, + "extensions.updateCheck": { + "type": "string", + "scope": "application", + "default": "never", + "description": "Interval time for check extension update, could be daily, weekly, never", + "enum": ["daily", "weekly", "never"] + }, + "extensions.silentAutoupdate": { + "type": "boolean", + "description": "Not open split window with update status when performing auto update.", + "scope": "application", + "default": true + }, + "extensions.updateUIInTab": { + "type": "boolean", + "scope": "application", + "default": false, + "description": "Display extension updating UI in new vim tab" + }, "inlayHint.enable": { "type": "boolean", "default": true, diff --git a/doc/coc-config.txt b/doc/coc-config.txt index 5fa143f4ff2..67ce1f97370 100644 --- a/doc/coc-config.txt +++ b/doc/coc-config.txt @@ -2,33 +2,37 @@ CONTENTS -Call hierarchy |coc-config-callHierarchy| -CodeLens |coc-config-codeLens| -Colors |coc-config-colors| -Completion |coc-config-suggest| -Cursors |coc-config-cursors| -Diagnostics |coc-config-diagnostic| -Dialog |coc-config-dialog| -Document highlight |coc-config-documentHighlight| -Float factory |coc-config-floatFactory| -Hover |coc-config-hover| -Http |coc-config-http| -Inlay hint |coc-config-inlayHint| -Links |coc-config-links| -List |coc-config-list| -Notification |coc-config-notification| -Npm |coc-config-npm| -Outline |coc-config-outline| -Pull diagnostics |coc-config-pullDiagnostic| -Refactor |coc-config-refactor| -Semantic tokens |coc-config-semanticTokens| -Signature |coc-config-signature| -Tree |coc-config-tree| -Type hierarchy |coc-config-typeHierarchy| -Workspace |coc-config-workspace| -Preferences |coc-config-preferences| -Float |coc-config-float| -Language server |coc-config-languageserver| +Core features + Workspace |coc-config-workspace| + Extensions |coc-config-extensions| + Preferences |coc-config-preferences| + Float factory |coc-config-floatFactory| + Float |coc-config-float| + Tree |coc-config-tree| + Dialog |coc-config-dialog| + Http |coc-config-http| + Npm |coc-config-npm| + Language server |coc-config-languageserver| + +LSP features + Call hierarchy |coc-config-callHierarchy| + CodeLens |coc-config-codeLens| + Colors |coc-config-colors| + Completion |coc-config-suggest| + Cursors |coc-config-cursors| + Diagnostics |coc-config-diagnostic| + Document highlight |coc-config-documentHighlight| + Hover |coc-config-hover| + Inlay hint |coc-config-inlayHint| + Links |coc-config-links| + List |coc-config-list| + Notification |coc-config-notification| + Outline |coc-config-outline| + Pull diagnostics |coc-config-pullDiagnostic| + Refactor |coc-config-refactor| + Semantic tokens |coc-config-semanticTokens| + Signature |coc-config-signature| + Type hierarchy |coc-config-typeHierarchy| ============================================================================== BUILTIN CONFIGURATIONS *coc-config* @@ -36,350 +40,370 @@ BUILTIN CONFIGURATIONS *coc-config* Builtin configurations of coc.nvim, it's recommended to use `coc-json` extension for completion and validation support. ------------------------------------------------------------------------------- -CallHierarchy~ - *coc-config-callHierarchy* -"callHierarchy.enableTooltip" *coc-config-callHierarchy-enableTooltip* - - Enable tooltip to show relative filepath of call hierarchy item. - - Scope: `application`, default: `true` - -"callHierarchy.openCommand" *coc-config-callHierarchy-openCommand* - - Open command for call hierarchy tree view. - - Scope: `application`, default: `"edit"` - -"callHierarchy.splitCommand" *coc-config-callHierarchy-splitCommand* +============================================================================== - Window split command used by call hierarchy tree view. +CORE FEATURES - Scope: `application`, default: `"botright 30vs"` +Configurations of builtin features. ------------------------------------------------------------------------------ -CodeLens~ - *coc-config-codeLens* -"codeLens.enable" *coc-config-codeLens-enable* +Workspace~ + *coc-config-workspace* +"workspace.rootPatterns" *coc-config-workspace-rootPatterns* - Enable codeLens feature, require neovim with set virtual text feature. + Root patterns to resolve workspaceFolder from parent folders of opened + files, resolved from up to down. - Scope: `language-overridable`, default: `false` + Scope: `application`, default: `[".git",".hg",".projections.json"]` -"codeLens.display" *coc-config-codeLens-display* +"workspace.bottomUpFiletypes" *coc-config-workspace-bottomUpFiletypes* - Display codeLens. Toggle with :CocCommand document.toggleCodeLens + Filetypes that should have workspace folder should resolved from base + directory of file, or ["*"] for any filetype. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `[]` -"codeLens.position" *coc-config-codeLens-position* +"workspace.ignoredFiletypes" *coc-config-workspace-ignoredFiletypes* - Position of codeLens, requires nvim >= 0.6.0. + Filetypes that should be ignored for workspace folder resolve. - Scope: `resource`, default: `"top"` + Scope: `resource`, default: `[]` -"codeLens.separator" *coc-config-codeLens-separator* +"workspace.ignoredFolders" *coc-config-workspace-ignoredFolders* - Separator text for codeLens in virtual text. + List of folders that should not be resolved as workspace folder, + environment variables and minimatch patterns can be used. - Scope: `resource`, default: `""` + Scope: `application`, default: `["$HOME"]` -"codeLens.subseparator" *coc-config-codeLens-subseparator* +"workspace.openOutputCommand" *coc-config-workspace-openOutputCommand* - Subseparator between codeLenses in virtual text. + Command used to open output channel. - Scope: `resource`, default: `" | "` + Scope: `resource`, default: `"vs"` ------------------------------------------------------------------------------- -Colors~ - *coc-config-colors* -"colors.enable" *coc-config-colors-enable* +"workspace.openResourceCommand" *coc-config-workspace-openResourceCommand* - Enable colors highlight feature, for terminal vim, 'termguicolors' - option should be enabled and the terminal support gui colors. + Command to open files that not loaded, load files as hidden buffers + when empty. - Scope: `language-overridable`, default: `false` + Scope: `application`, default: `"tab drop"` -"colors.highlightPriority" *coc-config-colors-highlightPriority* +"workspace.workspaceFolderCheckCwd" *coc-config-workspace-workspaceFolderCheckCwd* - Priority for colors highlights, works on vim8 and neovim >= 0.6.0. + Whether the current working directory should be used first when + checking patterns match for workspace folder. - Scope: `application`, default: `1000` + Scope: `application`, default: `true` ------------------------------------------------------------------------------- -Cursors~ - *coc-config-cursors* -"cursors.cancelKey" *coc-config-cursors-cancelKey* +"workspace.workspaceFolderFallbackCwd" *coc-config-workspace-workspaceFolderFallbackCwd* - Key used for cancel cursors session. + Use current working directory as workspace folder when no root + patterns resolved. - Scope: `application`, default: `""` + Scope: `application`, default: `true` -"cursors.nextKey" *coc-config-cursors-nextKey* +------------------------------------------------------------------------------ +Extensions~ + *coc-config-extensions* +"extensions.updateCheck" *coc-config-extensions-updateCheck* - Key used for jump to next cursors position. + Interval for check extension update, could be "daily", "weekly" or + "never" - Scope: `application`, default: `""` + Scope: `application`, default: `"never"` -"cursors.previousKey" *coc-config-cursors-previousKey* +"extensions.silentAutoupdate" *coc-config-extensions-silentAutoupdate* - Key used for jump to previous cursors position. + Not open split window with update status when performing auto update. - Scope: `application`, default: `""` + Scope: `application`, default: `true` -"cursors.wrapscan" *coc-config-cursors-wrapscan* +"extensions.updateUIInTab" *coc-config-extensions-updateUIInTab* - Searches wrap around the first or last cursors range. + Open `CocUpdate` UI in new tab. - Scope: `application`, default: `true` + Scope: `application`, default: `false` ------------------------------------------------------------------------------ -Diagnostic~ - *coc-config-diagnostic* -"diagnostic.autoRefresh" *coc-config-diagnostic-autoRefresh* +Preferences~ + *coc-config-preferences* +"coc.preferences.bracketEnterImprove" *coc-preferences-bracketEnterImprove* - Enable automatically refresh diagnostics, use diagnosticRefresh action - when it's disabled. + Improve enter inside bracket `<> {} [] ()` by add new empty line below + and place cursor to it. Works with `coc#on_enter()` Scope: `language-overridable`, default: `true` -"diagnostic.checkCurrentLine" *coc-config-diagnostic-checkCurrentLine* +"coc.preferences.currentFunctionSymbolAutoUpdate" *coc-preferences-currentFunctionSymbolAutoUpdate* - When enabled, show all diagnostics of current line if there are none at - the current position. + Automatically update the value of b:coc_current_function on CursorMove + event Scope: `language-overridable`, default: `false` -"diagnostic.displayByAle" *coc-config-diagnostic-displayByAle* +"coc.preferences.currentFunctionSymbolDebounceTime" *coc-preferences-currentFunctionSymbolDebounceTime* - Use Ale, coc-diagnostics-shim.nvim, or other provider to display - diagnostics in vim. This setting will disable diagnostic display using - coc's handler. A restart required on change. + Set debounce timer for the update of b:coc_current_function on CursorMove + event - Scope: `language-overridable`, default: `false` + Scope: `application`, default: `300` -"diagnostic.enable" *coc-config-diagnostic-enable* +"coc.preferences.enableLinkedEditing" *coc-preferences-enableLinkedEditing* - Set to false to disable diagnostic display. + Enable linked editing support. - Scope: `language-overridable`, default: `true` + Scope: `language-overridable`, default: `false` -"diagnostic.enableHighlightLineNumber" *coc-config-diagnostic-enableHighlightLineNumber* +"coc.preferences.enableMarkdown" *coc-preferences-enableMarkdown* - Enable highlighting line numbers for diagnostics, only works with neovim. + Tell the language server that markdown text format is supported, note + that markdown text may not rendered as expected. Scope: `application`, default: `true` -"diagnostic.enableMessage" *coc-config-diagnostic-enableMessage* - - When to enable show messages of diagnostics. +"coc.preferences.enableMessageDialog" *coc-preferences-enableMessageDialog* - Scope: `application`, default: `"always"` + Enable messages shown in notification dialog. -"diagnostic.enableSign" *coc-config-diagnostic-enableSign* + Scope: `application`, default: `false` - Enable signs for diagnostics. +"coc.preferences.excludeImageLinksInMarkdownDocument" *coc-preferences-excludeImageLinksInMarkdownDocument* - Scope: `language-overridable`, default: `true` + Exclude image links from markdown text in float window. -"diagnostic.errorSign" *coc-config-diagnostic-errorSign* + Scope: `application`, default: `true` - Text of error sign. +"coc.preferences.enableGFMBreaksInMarkdownDocument" *coc-preferences-enableGFMBreaksInmakrdownDocument* - Scope: `application`, default: `">>"` + Exclude GFM breaks in markdown document. -"diagnostic.filetypeMap" *coc-config-diagnostic-filetypeMap* + Scope: `application`, default: `true` - A map between buffer filetype and the filetype assigned to diagnostics. - To syntax highlight diagnostics with their parent buffer type use `" - default": "bufferType"`. +"coc.preferences.floatActions" *coc-preferences-floatActions* - Scope: `application`, default: `{}` + Set to false to disable float/popup support for actions menu. -"diagnostic.floatConfig" *coc-config-diagnostic-floatConfig* + Scope: `application`, default: `true` - Configuration of floating window/popup for diagnostic messages, see - |coc-config-float|. +"coc.preferences.formatOnSave" *coc-preferences-formatOnSave* - Scope: `application`, default: `null` + Set to true to enable formatting on save. -"diagnostic.format" *coc-config-diagnostic-format* + Scope: `language-overridable`, default: `false` - Define the diagnostic format that shown in float window or echoed, - available parts: source, code, severity, message. +"coc.preferences.formatOnSaveTimeout" *coc-preferences-formatOnSaveTimeout* - Scope: `language-overridable`, default: `"%message (%source%code)"` + How long before the format command run on save will time out. -"diagnostic.highlightLimit" *coc-config-diagnostic-highlightLimit* + Scope: `language-overridable`, default: `200` - Limit count for highlighted diagnostics, too many diagnostic highlights - could make vim stop responding. +"coc.preferences.formatOnType" *coc-preferences-formatOnType* - Scope: `language-overridable`, default: `1000` + Set to true to enable formatting on typing -"diagnostic.highlightPriority" *coc-config-diagnostic-highlightPriority* + Scope: `language-overridable`, default: `false` - Priority for diagnostic highlights, works on vim8 and neovim >= 0.6.0. +"coc.preferences.formatterExtension" *coc-preferences-formatterExtension* - Scope: `language-overridable`, default: `4096` + Extension used for formatting documents. When set to null, the formatter with highest priority is used. -"diagnostic.hintSign" *coc-config-diagnostic-hintSign* + Scope: `language-overridable`, default: `null` - Text of hint sign. +"coc.preferences.jumpCommand" *coc-preferences-jumpCommand* - Scope: `application`, default: `">>"` + Command used for location jump, like goto definition, goto references + etc. Can be also a custom command that gives file as an argument. -"diagnostic.infoSign" *coc-config-diagnostic-infoSign* + Scope: `application`, default: `"edit"` - Text of info sign. +"coc.preferences.maxFileSize" *coc-preferences-maxFileSize* - Scope: `application`, default: `">>"` + Maximum file size in bytes that coc.nvim should handle, default + '10MB'. -"diagnostic.level" *coc-config-diagnostic-level* + Scope: `application`, default: `"10MB"` - Used for filter diagnostics by diagnostic severity. +"coc.preferences.messageLevel" *coc-preferences-messageLevel* - Scope: `resource`, default: `"hint"` + Message level for filter echoed messages, could be 'more', 'warning' + and 'error' -"diagnostic.locationlistLevel" *coc-config-diagnostic-locationlistLevel* + Scope: `application`, default: `"more"` - Filter diagnostics in locationlist. +"coc.preferences.promptInput" *coc-preferences-promptInput* - Scope: `language-overridable`, default: `null` + Use prompt buffer in float window for user input. -"diagnostic.locationlistUpdate" *coc-config-diagnostic-locationlistUpdate* + Scope: `application`, default: `true` - Update locationlist on diagnostics change, only works with locationlist - opened by :CocDiagnostics command and first window of associated buffer. +"coc.preferences.renameFillCurrent" *coc-preferences-renameFillCurrent* - Scope: `language-overridable`, default: `true` + Disable to stop Refactor-Rename float/popup window from populating + with old name in the New Name field. -"diagnostic.messageDelay" *coc-config-diagnostic-messageDelay* + Scope: `application`, default: `true` - How long to wait (in milliseconds) before displaying the diagnostic - message with echo or float +"coc.preferences.silentAutoupdate" *coc-preferences-silentAutoupdate* - Scope: `application`, default: `200` + Not open split window with update status when performing auto update. -"diagnostic.messageLevel" *coc-config-diagnostic-messageLevel* + Scope: `application`, default: `true` - Filter diagnostic message in float window/popup. +"coc.preferences.useQuickfixForLocations" *coc-preferences-useQuickfixForLocations* - Scope: `language-overridable`, default: `null` + Use vim's quickfix list for jump locations, need restart on change. -"diagnostic.messageTarget" *coc-config-diagnostic-messageTarget* + Scope: `application`, default: `false` - Diagnostic message target. +"coc.preferences.watchmanPath" *coc-preferences-watchmanPath* - Scope: `language-overridable`, default: `"float"` + executable path for https://facebook.github.io/watchman/, detected + from $PATH by default. Required by features which need file watch + to work, eg: update import path on file move. -"diagnostic.refreshOnInsertMode" *coc-config-diagnostic-refreshOnInsertMode* + Scope: `application`, default: `null` - Enable diagnostic refresh on insert mode, default false. +"coc.preferences.willSaveHandlerTimeout" *coc-preferences-willSaveHandlerTimeout* - Scope: `language-overridable`, default: `false` + Will save handler timeout. -"diagnostic.showDeprecated" *coc-config-diagnostic-showDeprecated* + Scope: `application`, default: `500` - Show diagnostics with deprecated tag. +"coc.preferences.tagDefinitionTimeout" *coc-preferences-tagDefinitionTimeout* - Scope: `language-overridable`, default: `true` + The timeout of CocTagFunc. + Scope: `application`, default: `0` -"diagnostic.showUnused" *coc-config-diagnostic-showUnused* - - Show diagnostics with unused tag, affects highlight, sign, virtual - text , message. - - Scope: `language-overridable`, default: `true` - -"diagnostic.signLevel" *coc-config-diagnostic-signLevel* +------------------------------------------------------------------------------ +FloatFactory~ + *coc-config-floatFactory* +"floatFactory.floatConfig" *coc-config-floatFactory-floatConfig* - Filter diagnostics displayed in signcolumn. + Configure default float window/popup style created by float factory + (created around cursor and automatically closed), + see |coc-config-float| for supported properties. - Scope: `language-overridable`, default: `null` + Scope: `application`, default: `null` -"diagnostic.signPriority" *coc-config-diagnostic-signPriority* - Priority of diagnostic signs. +------------------------------------------------------------------------------ +Float configuration~ + *coc-config-float* - Scope: `resource`, default: `10` +Used by `floatFactory.floatConfig`, `suggest.floatConfig`, +`diagnostic.floatConfig`, `signature.floatConfig` and `hover.floatConfig`, +following properties are supported: -"diagnostic.virtualText" *coc-config-diagnostic-virtualText* + - "border": Change to `true` to enable border. + - "rounded": Use rounded borders when border is `true`. + - "highlight": Background highlight group of float window, default: + `"CocFloating"`. + - "title": Title text used by float window, default: `""`. + - "borderhighlight": Border highlight group of float window, default: + `"CocFloating"`. + - "close": Set to `true` to draw close icon. + - "maxWidth": Maximum width of float window, contains border. + - "maxHeight": Maximum height of float window, contains border. + - "winblend": Set 'winblend' option of window, neovim only, default: + `0`. + - "focusable": Set to false to make window not focusable, neovim only. + - "shadow": Set to true to enable shadow, neovim only. + - "position": Controls how floating windows are positioned. When set + to `'fixed'`, the window will be positioned according to the `top`, + `bottom`, `left`, and `right` settings. When set to `'auto'`, the + window follows the default position. + - "top": Distance from the top of the editor window in characters. + Only takes effect when `position` is set to `'fixed'`. Will be + ignored if `bottom` is set. + - "bottom": Distance from the bottom of the editor window in + characters. Only takes effect when `position` is set to `'fixed'`. + Takes precedence over `top` if both are set. + - "left": Distance from the left edge of the editor window in + characters. Only takes effect when `position` is set to `'fixed'`. + Will be ignored if `right` is set. + - "right": "Distance from the right edge of the editor window in + characters. Only takes effect when `position` is set to `'fixed'`. + Takes precedence over `left` if both are set." - Use virtual text to display diagnostics. +------------------------------------------------------------------------------ +Tree~ + *coc-config-tree* - Scope: `language-overridable`, default: `false` +Configurations for tree view. -"diagnostic.virtualTextAlign" *coc-config-diagnostic-virtualTextAlign* +"tree.openedIcon" *coc-config-tree-openedIcon* - Position of virtual text. Vim9 only. + Opened icon of tree view. - Scope: `language-overridable`, default: `"after"` + Scope: `application`, default: `"-"` -"diagnostic.virtualTextCurrentLineOnly" *coc-config-diagnostic-virtualTextCurrentLineOnly* +"tree.closedIcon" *coc-config-tree-closedIcon* - Only show virtualText diagnostic on current cursor line. + Closed icon of tree view. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `"+"` -"diagnostic.virtualTextFormat" *coc-config-diagnostic-virtualTextFormat* +"tree.key.actions" *coc-config-tree-key-actions* - Define the virtual text diagnostic format, available parts: source, code - , severity, message. + Trigger key to invoke actions. - Scope: `language-overridable`, default: `"%message"` + Scope: `application`, default: `""` -"diagnostic.virtualTextLevel" *coc-config-diagnostic-virtualTextLevel* +"tree.key.activeFilter" *coc-config-tree-key-activeFilter* - Filter diagnostic message in virtual text by level. + Trigger key active filter. - Scope: `language-overridable`, default: `null` + Scope: `application`, default: `"f"` -"diagnostic.virtualTextLimitInOneLine" *coc-config-diagnostic-virtualTextLimitInOneLine* +"tree.key.close" *coc-config-tree-key-close* - The maximum number of diagnostic messages to disaply in one line. + Trigger key to dispose the tree and close tree window. - Scope: `language-overridable`, default: `999` + Scope: `application`, default: `""` -"diagnostic.virtualTextLineSeparator" *coc-config-diagnostic-virtualTextLineSeparator* +"tree.key.collapseAll" *coc-config-tree-key-collapseAll* - The text that will mark a line end from the diagnostic message. + Trigger key to collapse all tree node. - Scope: `language-overridable`, default: `" \ "` + Scope: `application`, default: `"M"` -"diagnostic.virtualTextLines" *coc-config-diagnostic-virtualTextLines* +"tree.key.invoke" *coc-config-tree-key-invoke* - The number of non empty lines from a diagnostic to display. + Trigger key to invoke default command of current node or selection. - Scope: `language-overridable`, default: `3` + Scope: `application`, default: `""` -"diagnostic.virtualTextPrefix" *coc-config-diagnostic-virtualTextPrefix* +"tree.key.selectNext" *coc-config-tree-key-selectNext* - The prefix added virtual text diagnostics. + Trigger key to select next item during filter. - Scope: `language-overridable`, default: `" "` + Scope: `application`, default: `""` -"diagnostic.virtualTextWinCol" *coc-config-diagnostic-virtualTextWinCol* +"tree.key.selectPrevious" *coc-config-tree-key-selectPrevious* - Window column number to align virtual text, neovim only. + Trigger key to select previous item during filter. - Scope: `language-overridable`, default: `null` + Scope: `application`, default: `""` -"diagnostic.warningSign" *coc-config-diagnostic-warningSign* +"tree.key.toggle" *coc-config-tree-key-toggle* - Text of warning sign. + Trigger key to toggle expand state of tree node, does nothing with leaf + node. - Scope: `application`, default: `"⚠"` + Scope: `application`, default: `"t"` -"diagnostic.showRelatedInformation" *coc-config-diagnostic-showRelatedInformation* +"tree.key.toggleSelection" *coc-config-tree-key-toggleSelection* - Display related information in the diagnostic floating window. + Trigger key to select/unselect item. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `""` ------------------------------------------------------------------------------ Dialog~ *coc-config-dialog* +Configurations for dialog windows. + "dialog.confirmKey" *coc-config-dialog-confirmKey* Confirm key for confirm selection used by menu and picker, you can @@ -439,71 +463,12 @@ Dialog~ Scope: `application`, default: `"MoreMsg"` ------------------------------------------------------------------------------- -DocumentHighlight~ - *coc-config-documentHighlight* -"documentHighlight.priority" *coc-config-documentHighlight-priority* - - Match priority used by document highlight, see ':h matchadd'. - - Scope: `resource`, default: `-1` - -"documentHighlight.limit" *coc-config-documentHighlight-limit* - - Limit the highlights added by matchaddpos, too many positions could - cause vim slow. - - Scope: `resource`, default: `100` - -"documentHighlight.timeout" *coc-config-documentHighlight-timeout* - - Timeout for document highlight, in milliseconds. - - Scope: `resource`, default: `300` - ------------------------------------------------------------------------------- -FloatFactory~ - *coc-config-floatFactory* -"floatFactory.floatConfig" *coc-config-floatFactory-floatConfig* - - Configure default float window/popup style created by float factory - (created around cursor and automatically closed), properties of - |coc-config-float| are used. - - Scope: `application`, default: `null` - ------------------------------------------------------------------------------- -Hover~ - *coc-config-hover* -"hover.autoHide" *coc-config-hover-autoHide* - - Automatically hide hover float window on CursorMove or InsertEnter. - - Scope: `application`, default: `true` - -"hover.floatConfig" *coc-config-hover-floatConfig* - - Configuration of floating window/popup for hover documents, see - |coc-config-float|. - - Scope: `application`, default: `null` - -"hover.previewMaxHeight" *coc-config-hover-previewMaxHeight* - - Max height of preview window for hover. - - Scope: `resource`, default: `12` - -"hover.target" *coc-config-hover-target* - - Target to show hover information, could be `float`, `echo` or - `preview`. - - Scope: `resource`, default: `float` - ------------------------------------------------------------------------------ Http proxy~ *coc-config-http* + +Configurations for http requests, used by coc.nvim and some coc extensions. + "http.proxy" *coc-config-http-proxy* The proxy setting to use. If not set, will be inherited from the ` @@ -532,1317 +497,1400 @@ Http proxy~ Scope: `application`, default: `true` ------------------------------------------------------------------------------ -InlayHint~ - *coc-config-inlayHint* -"inlayHint.enable" *coc-config-inlayHint-enable* - - Enable inlay hint support. - - Scope: `language-overridable`, default: `true` - -"inlayHint.enableParameter" *coc-config-inlayHint-enableParameter* - - Enable inlay hints for parameters. - - Scope: `language-overridable`, default: `true` - -"inlayHint.display" *coc-config-inlayHint-display* +Npm~ + *coc-config-npm* +"npm.binPath" *coc-config-npm-binPath* - Display inlay hints. Toggle with :CocCommand document.toggleInlayHint + Command or absolute path to npm or yarn for global extension + install/uninstall. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `"npm"` -"inlayHint.refreshOnInsertMode" *coc-config-inlayHint-refreshOnInsertMode* +------------------------------------------------------------------------------ +Languageserver~ + *coc-config-languageserver* - Refresh inlayHints on insert mode. + Dictionary of Language Servers, key is the ID of corresponding server, + and value is configuration of languageserver. Default: `{}` - Scope: `language-overridable`, default: `false` + Properties of languageserver configuration: -"inlayHint.position" *coc-config-inlayHint-position* + - "enable": Change to `false` to disable that languageserver. - Controls the position of inlay hint, supports `inline` and `eol`. + - "filetypes": Supported filetypes, add * in array for all filetypes. + Note: it's required for start the languageserver, please make sure + your filetype is expected by `:CocCommand document.echoFiletype` command - Scope: `language-overridable`, default: `inline` + - 'maxRestartCount': Maximum restart count when server closed in the + last 3 minutes, default to `4`. ------------------------------------------------------------------------------- -Links~ - *coc-config-links* -"links.enable" *coc-config-links-enable* + - "additionalSchemes": Additional URI schemes, default schemes + including file & untitled. + Note: you have to setup vim provide content for custom URI as well. - Enable document links. + - "cwd": Working directory used to start languageserver, vim's cwd is + used by default. - Scope: `language-overridable`, default: `true` + - "env": Environment variables for child process. -"links.highlight" *coc-config-links-highlight* + - "settings": Settings for languageserver, received on server + initialization. - Use CocLink highlight group to highlight links. + - "trace.server": Trace level of communication between server and + client that showed with output channel, open output channel by + command `:CocCommand workspace.showOutput` - Scope: `application`, default: `false` + - "stdioEncoding": Encoding used for stdio of child process. -"links.tooltip" *coc-config-links-tooltip* + - "initializationOptions": Initialization options passed to + languageserver (it's deprecated) - Show tooltip of link under cursor on CursorHold. + - "rootPatterns": Root patterns used to resolve rootPath from current + file. - Scope: `application`, default: `false` + - "requireRootPattern": If true, doesn't start server when root + pattern not found. ------------------------------------------------------------------------------- -List~ - *coc-config-list* -"list.alignColumns" *coc-config-list-alignColumns* + - "ignoredRootPaths": Absolute root paths that language server should + not use as rootPath, higher priority than rootPatterns. - Whether to align lists in columns. + - "disableDynamicRegister": Disable dynamic registerCapability feature + for this languageserver to avoid duplicated feature registration. - Scope: `application`, default: `false` + - "disableSnippetCompletion": Disable snippet completion feature for + this languageserver. -"list.extendedSearchMode" *coc-config-list-extendedSearchMode* + - "disabledFeatures": Disable features for this languageserver, + valid keys: +> + ["completion", "configuration", "workspaceFolders", "diagnostics", + "willSave", "willSaveUntil", "didSaveTextDocument", + "fileSystemWatcher", "hover", "signatureHelp", "definition", + "references", "documentHighlight", "documentSymbol", + "workspaceSymbol", "codeAction", "codeLens", "formatting", + "documentFormatting", "documentRangeFormatting", + "documentOnTypeFormatting", "rename", "documentLink", + "executeCommand", "pullConfiguration", "typeDefinition", + "implementation", "declaration", "color", "foldingRange", + "selectionRange", "progress", "callHierarchy", "linkedEditing", + "fileEvents", "semanticTokens"] +< + - "formatterPriority": Priority of this languageserver's formatter. - Enable extended search mode which allows multiple search patterns - delimited by spaces. + - "revealOutputChannelOn": Configure message level to show the output + channel buffer. - Scope: `application`, default: `true` + - "progressOnInitialization": Enable progress report on languageserver + initialize. -"list.floatPreview" *coc-config-list-floatPreview* +Language server start with command:~ - Enable preview with float window/popup, default: `false`. + Additional fields can be used for a command languageserver: - Scope: `application`, default: `false` + - "command": Executable program name in $PATH or absolute path of + executable used for start languageserver. -"list.height" *coc-config-list-height* + - "args": Command line arguments of command. - Height of split list window. + - "detached": Detach language server when is true. - Scope: `application`, default: `10` + - "shell": Use shell for server process, default: `false` -"list.indicator" *coc-config-list-indicator* +Language server start with module:~ - The character used as first character in prompt line. + Additional fields can be used for a languageserver started by node + module: - Scope: `application`, default: `">"` + - "module": Absolute filepath of Javascript file. -"list.insertMappings" *coc-config-list-insertMappings* + - "args": Extra arguments used on fork Javascript module. - Custom keymappings on insert mode. + - "runtime": Absolute path of node runtime, node runtime of coc.nvim + is used by default. - Scope: `application`, default: `{}` + - "execArgv": ARGV passed to node on fork, normally used for + debugging, example: `["--nolazy", "--inspect-brk=6045"]` -"list.interactiveDebounceTime" *coc-config-list-interactiveDebounceTime* + - "transport": Transport kind used by server, could be 'ipc', 'stdio', + 'socket' and 'pipe'. 'ipc' is used by default (recommended). - Debounce time for input change on interactive mode. + - "transportPort": Port number used when transport is 'socket'. - Scope: `application`, default: `100` +Language server use initialized socket server:~ -"list.limitLines" *coc-config-list-limitLines* + - "port": Port number of socket server. - Limit lines for list buffer. + - "host": Host of socket server, default to `127.0.0.1`. - Scope: `application`, default: `null` -"list.maxPreviewHeight" *coc-config-list-maxPreviewHeight* +============================================================================== - Max height for preview window of list. +LSP FEATURES - Scope: `application`, default: `12` +Configurations for features provided by language server. -"list.menuAction" *coc-config-list-menuAction* +------------------------------------------------------------------------------ - Use menu picker instead of confirm() for choose action. +CallHierarchy~ + *coc-config-callHierarchy* +"callHierarchy.enableTooltip" *coc-config-callHierarchy-enableTooltip* - Scope: `application`, default: `false` + Enable tooltip to show relative filepath of call hierarchy item. -"list.nextKeymap" *coc-config-list-nextKeymap* + Scope: `application`, default: `true` - Key used for select next line on insert mode. +"callHierarchy.openCommand" *coc-config-callHierarchy-openCommand* - Scope: `application`, default: `""` + Open command for call hierarchy tree view. -"list.normalMappings" *coc-config-list-normalMappings* + Scope: `application`, default: `"edit"` - Custom keymappings on normal mode. +"callHierarchy.splitCommand" *coc-config-callHierarchy-splitCommand* - Scope: `application`, default: `{}` + Window split command used by call hierarchy tree view. -"list.previewHighlightGroup" *coc-config-list-previewHighlightGroup* + Scope: `application`, default: `"botright 30vs"` - Highlight group used for highlight the range in preview window. +------------------------------------------------------------------------------ +CodeLens~ + *coc-config-codeLens* +"codeLens.enable" *coc-config-codeLens-enable* - Scope: `application`, default: `"Search"` + Enable codeLens feature, require neovim with set virtual text feature. -"list.previewSplitRight" *coc-config-list-previewSplitRight* + Scope: `language-overridable`, default: `false` - Use vsplit for preview window. +"codeLens.display" *coc-config-codeLens-display* - Scope: `application`, default: `false` + Display codeLens. Toggle with :CocCommand document.toggleCodeLens -"list.previewToplineOffset" *coc-config-list-previewToplineOffset* + Scope: `language-overridable`, default: `true` - Topline offset for list previews +"codeLens.position" *coc-config-codeLens-position* - Scope: `application`, default: `3` + Position of codeLens, requires nvim >= 0.6.0. -"list.previewToplineStyle" *coc-config-list-previewToplineStyle* + Scope: `resource`, default: `"top"` - Topline style for list previews, could be "offset" or "middle". +"codeLens.separator" *coc-config-codeLens-separator* - Scope: `application`, default: `"offset"` + Separator text for codeLens in virtual text. -"list.previousKeymap" *coc-config-list-previousKeymap* + Scope: `resource`, default: `""` - Key used for select previous line on insert mode. +"codeLens.subseparator" *coc-config-codeLens-subseparator* - Scope: `application`, default: `""` + Subseparator between codeLenses in virtual text. -"list.selectedSignText" *coc-config-list-selectedSignText* + Scope: `resource`, default: `" | "` - Sign text for selected lines. +------------------------------------------------------------------------------ +Colors~ + *coc-config-colors* +"colors.enable" *coc-config-colors-enable* - Scope: `application`, default: `"*"` + Enable colors highlight feature, for terminal vim, 'termguicolors' + option should be enabled and the terminal support gui colors. -"list.signOffset" *coc-config-list-signOffset* + Scope: `language-overridable`, default: `false` - Sign offset of list, should be different from other plugins. +"colors.highlightPriority" *coc-config-colors-highlightPriority* - Scope: `application`, default: `900` + Priority for colors highlights, works on vim8 and neovim >= 0.6.0. -"list.smartCase" *coc-config-list-smartCase* + Scope: `application`, default: `1000` - Use smartcase match for fuzzy match and strict match, --ignore-case - will be ignored, may not affect interactive list. +------------------------------------------------------------------------------ +Cursors~ + *coc-config-cursors* +"cursors.cancelKey" *coc-config-cursors-cancelKey* - Scope: `application`, default: `false` + Key used for cancel cursors session. -"list.source.diagnostics.includeCode" *coc-config-list-source-diagnostics-includeCode* + Scope: `application`, default: `""` - Whether to show the diagnostic code in the list. +"cursors.nextKey" *coc-config-cursors-nextKey* - Scope: `application`, default: `true` + Key used for jump to next cursors position. -"list.source.diagnostics.pathFormat" *coc-config-list-source-diagnostics-pathFormat* + Scope: `application`, default: `""` - Decide how the filepath is shown in the list. +"cursors.previousKey" *coc-config-cursors-previousKey* - Scope: `application`, default: `"full"` + Key used for jump to previous cursors position. -"list.source.outline.ctagsFiletypes" *coc-config-list-source-outline-ctagsFiletypes* + Scope: `application`, default: `""` - Filetypes that should use ctags for outline instead of language server. +"cursors.wrapscan" *coc-config-cursors-wrapscan* - Scope: `application`, default: `[]` + Searches wrap around the first or last cursors range. -"list.source.symbols.excludes" *coc-config-list-source-symbols-excludes* + Scope: `application`, default: `true` - Patterns of minimatch for filepath to exclude from symbols list. +------------------------------------------------------------------------------ +Diagnostic~ + *coc-config-diagnostic* +"diagnostic.autoRefresh" *coc-config-diagnostic-autoRefresh* - Scope: `application`, default: `[]` + Enable automatically refresh diagnostics, use diagnosticRefresh action + when it's disabled. -"list.statusLineSegments" *coc-config-list-statusLineSegments* + Scope: `language-overridable`, default: `true` - An array of statusline segments that will be used to draw the status - line for list windows. +"diagnostic.checkCurrentLine" *coc-config-diagnostic-checkCurrentLine* - Scope: `application`. + When enabled, show all diagnostics of current line if there are none at + the current position. ------------------------------------------------------------------------------- -Notification~ - *coc-config-notification* -"notification.border" *coc-config-notification-border* + Scope: `language-overridable`, default: `false` - Enable rounded border for notification windows. +"diagnostic.displayByAle" *coc-config-diagnostic-displayByAle* - Scope: `application`, default: `true` + Use Ale, coc-diagnostics-shim.nvim, or other provider to display + diagnostics in vim. This setting will disable diagnostic display using + coc's handler. A restart required on change. -"notification.disabledProgressSources" *coc-config-notification-disabledProgressSources* + Scope: `language-overridable`, default: `false` - Sources that should be disabled for message progress, use * to disable - all progresses. +"diagnostic.enable" *coc-config-diagnostic-enable* - Scope: `application`, default: `[]` + Set to false to disable diagnostic display. -"notification.focusable" *coc-config-notification-focusable* + Scope: `language-overridable`, default: `true` - Enable focus by user actions (wincmds, mouse events), neovim only. +"diagnostic.enableHighlightLineNumber" *coc-config-diagnostic-enableHighlightLineNumber* + + Enable highlighting line numbers for diagnostics, only works with neovim. Scope: `application`, default: `true` -"notification.highlightGroup" *coc-config-notification-highlightGroup* +"diagnostic.enableMessage" *coc-config-diagnostic-enableMessage* - Highlight group of notification dialog. + When to enable show messages of diagnostics. - Scope: `application`, default: `"Normal"` + Scope: `application`, default: `"always"` -"notification.marginRight" *coc-config-notification-marginRight* +"diagnostic.enableSign" *coc-config-diagnostic-enableSign* - Margin right to the right of editor window. + Enable signs for diagnostics. - Scope: `application`, default: `10` + Scope: `language-overridable`, default: `true` -"notification.maxHeight" *coc-config-notification-maxHeight* +"diagnostic.errorSign" *coc-config-diagnostic-errorSign* - Maximum content height of notification dialog. + Text of error sign. - Scope: `application`, default: `10` + Scope: `application`, default: `">>"` -"notification.maxWidth" *coc-config-notification-maxWidth* +"diagnostic.filetypeMap" *coc-config-diagnostic-filetypeMap* - Maximum content width of notification dialog. + A map between buffer filetype and the filetype assigned to diagnostics. + To syntax highlight diagnostics with their parent buffer type use `" + default": "bufferType"`. - Scope: `application`, default: `60` + Scope: `application`, default: `{}` -"notification.minProgressWidth" *coc-config-notification-minProgressWidth* +"diagnostic.floatConfig" *coc-config-diagnostic-floatConfig* - Minimal with of progress notification. + Configuration of floating window/popup for diagnostic messages, see + |coc-config-float|. - Scope: `application`, default: `30` + Scope: `application`, default: `null` -"notification.statusLineProgress" *coc-config-notification-statusLineProgress* +"diagnostic.format" *coc-config-diagnostic-format* - Show progress notification in status line, instead of use float - window/popup. + Define the diagnostic format that shown in float window or echoed, + available parts: source, code, severity, message. -"notification.timeout" *coc-config-notification-timeout* + Scope: `language-overridable`, default: `"%message (%source%code)"` - Timeout for auto close notifications, in milliseconds. +"diagnostic.highlightLimit" *coc-config-diagnostic-highlightLimit* - Scope: `application`, default: `10000` + Limit count for highlighted diagnostics, too many diagnostic highlights + could make vim stop responding. -"notification.winblend" *coc-config-notification-winblend* + Scope: `language-overridable`, default: `1000` - Winblend option of notification window, neovim only. +"diagnostic.highlightPriority" *coc-config-diagnostic-highlightPriority* - Scope: `application`, default: `30` + Priority for diagnostic highlights, works on vim8 and neovim >= 0.6.0. ------------------------------------------------------------------------------- -Npm~ - *coc-config-npm* -"npm.binPath" *coc-config-npm-binPath* + Scope: `language-overridable`, default: `4096` - Command or absolute path to npm or yarn for global extension - install/uninstall. +"diagnostic.hintSign" *coc-config-diagnostic-hintSign* - Scope: `application`, default: `"npm"` + Text of hint sign. ------------------------------------------------------------------------------- -Outline~ - *coc-config-outline* -"outline.autoPreview" *coc-config-outline-autoPreview* + Scope: `application`, default: `">>"` - Enable auto preview on cursor move. +"diagnostic.infoSign" *coc-config-diagnostic-infoSign* - Scope: `application`, default: `false` + Text of info sign. -"outline.autoHide" *coc-config-outline-autoHide* + Scope: `application`, default: `">>"` - Automatically hide the outline window when an item is clicked. +"diagnostic.level" *coc-config-diagnostic-level* - Scope: `application`, default: `false` + Used for filter diagnostics by diagnostic severity. -"outline.autoWidth" *coc-config-outline-autoWidth* + Scope: `resource`, default: `"hint"` - Automatically increase window width to avoid wrapped lines. +"diagnostic.locationlistLevel" *coc-config-diagnostic-locationlistLevel* - Scope: `application`, default: `true` + Filter diagnostics in locationlist. -"outline.checkBufferSwitch" *coc-config-outline-checkBufferSwitch* + Scope: `language-overridable`, default: `null` - Recreate outline view after user changed to another buffer on current - tab. +"diagnostic.locationlistUpdate" *coc-config-diagnostic-locationlistUpdate* - Scope: `application`, default: `true` + Update locationlist on diagnostics change, only works with locationlist + opened by :CocDiagnostics command and first window of associated buffer. -"outline.codeActionKinds" *coc-config-outline-codeActionKinds* + Scope: `language-overridable`, default: `true` - Filter code actions in actions menu by kinds. +"diagnostic.messageDelay" *coc-config-diagnostic-messageDelay* - Scope: `application`, default: `["","quickfix","refactor"]` + How long to wait (in milliseconds) before displaying the diagnostic + message with echo or float -"outline.detailAsDescription" *coc-config-outline-detailAsDescription* + Scope: `application`, default: `200` - Show detail as description aside with label, when false detail will be - shown in tooltip on cursor hold. +"diagnostic.messageLevel" *coc-config-diagnostic-messageLevel* - Scope: `application`, default: `true` + Filter diagnostic message in float window/popup. -"outline.expandLevel" *coc-config-outline-expandLevel* + Scope: `language-overridable`, default: `null` - Expand level of tree nodes. +"diagnostic.messageTarget" *coc-config-diagnostic-messageTarget* - Scope: `application`, default: `1` + Diagnostic message target. -"outline.followCursor" *coc-config-outline-followCursor* + Scope: `language-overridable`, default: `"float"` - Reveal item in outline tree on cursor hold. +"diagnostic.refreshOnInsertMode" *coc-config-diagnostic-refreshOnInsertMode* - Scope: `application`, default: `true` + Enable diagnostic refresh on insert mode, default false. -"outline.keepWindow" *coc-config-outline-keepWindow* + Scope: `language-overridable`, default: `false` - Jump back to original window after outline is shown. +"diagnostic.showDeprecated" *coc-config-diagnostic-showDeprecated* - Scope: `application`, default: `false` + Show diagnostics with deprecated tag. -"outline.previewBorder" *coc-config-outline-previewBorder* + Scope: `language-overridable`, default: `true` - Use border for preview window. +"diagnostic.showUnused" *coc-config-diagnostic-showUnused* - Scope: `application`, default: `true` + Show diagnostics with unused tag, affects highlight, sign, virtual + text , message. -"outline.previewBorderHighlightGroup" *coc-config-outline-previewBorderHighlightGroup* + Scope: `language-overridable`, default: `true` - Border highlight group of preview window. +"diagnostic.signLevel" *coc-config-diagnostic-signLevel* - Scope: `application`, default: `"Normal"` + Filter diagnostics displayed in signcolumn. -"outline.previewBorderRounded" *coc-config-outline-previewBorderRounded* + Scope: `language-overridable`, default: `null` - Use rounded border for preview window. +"diagnostic.signPriority" *coc-config-diagnostic-signPriority* - Scope: `application`, default: `false` + Priority of diagnostic signs. -"outline.previewHighlightGroup" *coc-config-outline-previewHighlightGroup* + Scope: `resource`, default: `10` - Highlight group of preview window. +"diagnostic.virtualText" *coc-config-diagnostic-virtualText* - Scope: `application`, default: `"Normal"` + Use virtual text to display diagnostics. -"outline.previewMaxWidth" *coc-config-outline-previewMaxWidth* + Scope: `language-overridable`, default: `false` - Max width of preview window. +"diagnostic.virtualTextAlign" *coc-config-diagnostic-virtualTextAlign* - Scope: `application`, default: `80` + Position of virtual text. Vim9 only. -"outline.previewWinblend" *coc-config-outline-previewWinblend* + Scope: `language-overridable`, default: `"after"` - Enables pseudo-transparency by set 'winblend' option of window, neovim - only. +"diagnostic.virtualTextCurrentLineOnly" *coc-config-diagnostic-virtualTextCurrentLineOnly* - Scope: `application`, default: `0` + Only show virtualText diagnostic on current cursor line. -"outline.showLineNumber" *coc-config-outline-showLineNumber* + Scope: `language-overridable`, default: `true` - Show line number of symbols. +"diagnostic.virtualTextFormat" *coc-config-diagnostic-virtualTextFormat* - Scope: `application`, default: `true` + Define the virtual text diagnostic format, available parts: source, code + , severity, message. -"outline.sortBy" *coc-config-outline-sortBy* + Scope: `language-overridable`, default: `"%message"` - Default sort method for symbols outline. +"diagnostic.virtualTextLevel" *coc-config-diagnostic-virtualTextLevel* - Scope: `application`, default: `"category"` + Filter diagnostic message in virtual text by level. -"outline.splitCommand" *coc-config-outline-splitCommand* + Scope: `language-overridable`, default: `null` - Window split command used by outline. +"diagnostic.virtualTextLimitInOneLine" *coc-config-diagnostic-virtualTextLimitInOneLine* - Scope: `application`, default: `"botright 30vs"` + The maximum number of diagnostic messages to disaply in one line. -"outline.switchSortKey" *coc-config-outline-switchSortKey* + Scope: `language-overridable`, default: `999` - The key used to switch sort method for symbols provider of current - tree view. +"diagnostic.virtualTextLineSeparator" *coc-config-diagnostic-virtualTextLineSeparator* - Scope: `application`, default: `""` + The text that will mark a line end from the diagnostic message. -"outline.togglePreviewKey" *coc-config-outline-togglePreviewKey* + Scope: `language-overridable`, default: `" \ "` - The key used to toggle auto preview feature. +"diagnostic.virtualTextLines" *coc-config-diagnostic-virtualTextLines* - Scope: `application`, default: `"p"` + The number of non empty lines from a diagnostic to display. ------------------------------------------------------------------------------- -PullDiagnostic~ - *coc-config-pullDiagnostic* -"pullDiagnostic.ignored" *coc-config-pullDiagnostic-ignored* + Scope: `language-overridable`, default: `3` - Minimatch patterns to match full filepath that should be ignored for - pullDiagnostic. +"diagnostic.virtualTextPrefix" *coc-config-diagnostic-virtualTextPrefix* - Scope: `application`, default: `[]` + The prefix added virtual text diagnostics. -"pullDiagnostic.onChange" *coc-config-pullDiagnostic-onChange* + Scope: `language-overridable`, default: `" "` - Whether to pull for diagnostics on document change. +"diagnostic.virtualTextWinCol" *coc-config-diagnostic-virtualTextWinCol* - Scope: `language-overridable`, default: `true` + Window column number to align virtual text, neovim only. -"pullDiagnostic.onSave" *coc-config-pullDiagnostic-onSave* + Scope: `language-overridable`, default: `null` - Whether to pull for diagnostics on document save. +"diagnostic.warningSign" *coc-config-diagnostic-warningSign* - Scope: `language-overridable`, default: `false` + Text of warning sign. -"pullDiagnostic.workspace" *coc-config-pullDiagnostic-workspace* + Scope: `application`, default: `"⚠"` - Whether to pull for workspace diagnostics when possible. +"diagnostic.showRelatedInformation" *coc-config-diagnostic-showRelatedInformation* - Scope: `application`, default: `true` + Display related information in the diagnostic floating window. + + Scope: `language-overridable`, default: `true` ------------------------------------------------------------------------------ -Refactor~ - *coc-config-refactor* -"refactor.afterContext" *coc-config-refactor-afterContext* +DocumentHighlight~ + *coc-config-documentHighlight* +"documentHighlight.priority" *coc-config-documentHighlight-priority* - Print num lines of trailing context after each match. + Match priority used by document highlight, see ':h matchadd'. - Scope: `application`, default: `3` + Scope: `resource`, default: `-1` -"refactor.beforeContext" *coc-config-refactor-beforeContext* +"documentHighlight.limit" *coc-config-documentHighlight-limit* - Print num lines of leading context before each match. + Limit the highlights added by matchaddpos, too many positions could + cause vim slow. - Scope: `application`, default: `3` + Scope: `resource`, default: `100` -"refactor.openCommand" *coc-config-refactor-openCommand* +"documentHighlight.timeout" *coc-config-documentHighlight-timeout* - Open command for refactor window. + Timeout for document highlight, in milliseconds. - Scope: `application`, default: `"vsplit"` + Scope: `resource`, default: `300` -"refactor.saveToFile" *coc-config-refactor-saveToFile* +------------------------------------------------------------------------------ +Hover~ + *coc-config-hover* +"hover.autoHide" *coc-config-hover-autoHide* - Save changed buffer to file when write refactor buffer with ':noa wa' - command. + Automatically hide hover float window on CursorMove or InsertEnter. Scope: `application`, default: `true` -"refactor.showMenu" *coc-config-refactor-showMenu* +"hover.floatConfig" *coc-config-hover-floatConfig* - Refactor buffer local mapping to bring up menu for this chunk. + Configuration of floating window/popup for hover documents, see + |coc-config-float|. - Scope: `application`, default: `""` + Scope: `application`, default: `null` ------------------------------------------------------------------------------- -SemanticTokens~ - *coc-config-semanticTokens* -"semanticTokens.combinedModifiers" *coc-config-semanticTokens-combinedModifiers* +"hover.previewMaxHeight" *coc-config-hover-previewMaxHeight* - Semantic token modifiers that should have highlight combined with - syntax highlights. + Max height of preview window for hover. - Scope: `language-overridable`, default: `["deprecated"]` + Scope: `resource`, default: `12` -"semanticTokens.enable" *coc-config-semanticTokens-enable* +"hover.target" *coc-config-hover-target* - Enable semantic tokens support. + Target to show hover information, could be `float`, `echo` or + `preview`. - Scope: `language-overridable`, default: `false` + Scope: `resource`, default: `float` -"semanticTokens.highlightPriority" *coc-config-semanticTokens-highlightPriority* +------------------------------------------------------------------------------ +InlayHint~ + *coc-config-inlayHint* +"inlayHint.enable" *coc-config-inlayHint-enable* - Priority for semantic tokens highlight. + Enable inlay hint support. - Scope: `language-overridable`, default: `2048` + Scope: `language-overridable`, default: `true` -"semanticTokens.incrementTypes" *coc-config-semanticTokens-incrementTypes* +"inlayHint.enableParameter" *coc-config-inlayHint-enableParameter* - Semantic token types that should increase highlight when insert at the - start and end position of token. + Enable inlay hints for parameters. - Scope: `language-overridable`, default: `["variable","string","parameter"]` + Scope: `language-overridable`, default: `true` ------------------------------------------------------------------------------- -Signature~ - *coc-config-signature* -"signature.enable" *coc-config-signature-enable* +"inlayHint.display" *coc-config-inlayHint-display* - Enable show signature help when trigger character typed. + Display inlay hints. Toggle with :CocCommand document.toggleInlayHint Scope: `language-overridable`, default: `true` -"signature.floatConfig" *coc-config-signature-floatConfig* +"inlayHint.refreshOnInsertMode" *coc-config-inlayHint-refreshOnInsertMode* - Configuration of floating window/popup for signature documents, see - |coc-config-float|. + Refresh inlayHints on insert mode. - Scope: `application`, default: `null` + Scope: `language-overridable`, default: `false` -"signature.hideOnTextChange" *coc-config-signature-hideOnTextChange* +"inlayHint.position" *coc-config-inlayHint-position* - Hide signature float window when text changed on insert mode. + Controls the position of inlay hint, supports `inline` and `eol`. - Scope: `language-overridable`, default: `false` + Scope: `language-overridable`, default: `inline` -"signature.preferShownAbove" *coc-config-signature-preferShownAbove* +------------------------------------------------------------------------------ +Links~ + *coc-config-links* +"links.enable" *coc-config-links-enable* - Show signature help float window above cursor when possible, require - restart coc.nvim on change. + Enable document links. - Scope: `application`, default: `true` + Scope: `language-overridable`, default: `true` -"signature.target" *coc-config-signature-target* +"links.highlight" *coc-config-links-highlight* - Target of signature help, use float when possible by default. + Use CocLink highlight group to highlight links. - Scope: `language-overridable`, default: `"float"` + Scope: `application`, default: `false` -"signature.triggerSignatureWait" *coc-config-signature-triggerSignatureWait* +"links.tooltip" *coc-config-links-tooltip* - Timeout for trigger signature help, in milliseconds. + Show tooltip of link under cursor on CursorHold. - Scope: `language-overridable`, default: `500` + Scope: `application`, default: `false` ------------------------------------------------------------------------------ -Snippet~ - *coc-config-snippet* -"snippet.highlight" *coc-config-snippet-highlight* +List~ + *coc-config-list* +"list.alignColumns" *coc-config-list-alignColumns* - Use highlight group 'CocSnippetVisual' to highlight placeholders with - same index of current one. + Whether to align lists in columns. - Scope: `resource`, default: `false` + Scope: `application`, default: `false` -"snippet.nextPlaceholderOnDelete" *coc-config-snippet-nextPlaceholderOnDelete* +"list.extendedSearchMode" *coc-config-list-extendedSearchMode* - Automatically jump to the next placeholder when the current one is - completely deleted. + Enable extended search mode which allows multiple search patterns + delimited by spaces. - Scope: `resource`, default: `false` + Scope: `application`, default: `true` -"snippet.statusText" *coc-config-snippet-statusText* +"list.floatPreview" *coc-config-list-floatPreview* - Text shown in statusline to indicate snippet session is activated. + Enable preview with float window/popup, default: `false`. - Scope: `application`, default: `"SNIP"` + Scope: `application`, default: `false` ------------------------------------------------------------------------------- -Suggest~ - *coc-config-suggest* -"suggest.acceptSuggestionOnCommitCharacter" *coc-config-suggest-acceptSuggestionOnCommitCharacter* +"list.height" *coc-config-list-height* - Controls whether suggestions should be accepted on commit characters. - For example, in JavaScript, the semi-colon (`;`) can be a commit - character that accepts a suggestion and types that character. + Height of split list window. - Scope: `language-overridable`, default: `false` + Scope: `application`, default: `10` -"suggest.asciiCharactersOnly" *coc-config-suggest-asciiCharactersOnly* +"list.indicator" *coc-config-list-indicator* - Trigger suggest with ASCII characters only. + The character used as first character in prompt line. - Scope: `language-overridable`, default: `false` + Scope: `application`, default: `">"` -"suggest.chineseSegments" *coc-config-suggest-chineseSegments* +"list.insertMappings" *coc-config-list-insertMappings* - Divide Chinese sentence into segments in around/buffer source. + Custom keymappings on insert mode. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `{}` -"suggest.asciiMatch" *coc-config-suggest-asciiMatch* +"list.interactiveDebounceTime" *coc-config-list-interactiveDebounceTime* - Convert unicode characters to ascii for match. + Debounce time for input change on interactive mode. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `100` -"suggest.autoTrigger" *coc-config-suggest-autoTrigger* +"list.limitLines" *coc-config-list-limitLines* - How should completion be triggered, could be `"always"`, `"trigger"` - or `"none"`. + Limit lines for list buffer. - Scope: `language-overridable`, default: `"always"` + Scope: `application`, default: `null` -"suggest.completionItemKindLabels" *coc-config-suggest-completionItemKindLabels* +"list.maxPreviewHeight" *coc-config-list-maxPreviewHeight* - Set custom labels to completion items' kinds. - Default value: > - { - "text": "v", - "method": "f", - "function": "f", - "constructor": "f", - "field": "m", - "variable": "v", - "class": "C", - "interface": "I", - "module": "M", - "property": "m", - "unit": "U", - "value": "v", - "enum": "E", - "keyword": "k", - "snippet": "S", - "color": "v", - "file": "F", - "reference": "r", - "folder": "F", - "enumMember": "m", - "constant": "v", - "struct": "S", - "event": "E", - "operator": "O", - "typeParameter": "T", - "default": "" - } -< - Scope: `application` + Max height for preview window of list. -"suggest.defaultSortMethod" *coc-config-suggest-defaultSortMethod* + Scope: `application`, default: `12` - Default sorting behavior when trigger is empty, could be `"length"`, - `"alphabetical"` or `"none"`. +"list.menuAction" *coc-config-list-menuAction* - Scope: `language-overridable`, default: `"length"` + Use menu picker instead of confirm() for choose action. -"suggest.detailField" *coc-config-suggest-detailField* + Scope: `application`, default: `false` - Where to show the detail text of CompleteItem from language server. +"list.nextKeymap" *coc-config-list-nextKeymap* - Scope: `application`, default: `"preview"` + Key used for select next line on insert mode. -"suggest.enableFloat" *coc-config-suggest-enableFloat* + Scope: `application`, default: `""` - Enable float window with documentation aside with popupmenu. +"list.normalMappings" *coc-config-list-normalMappings* - Scope: `language-overridable`, default: `true` + Custom keymappings on normal mode. -"suggest.enablePreselect" *coc-config-suggest-enablePreselect* + Scope: `application`, default: `{}` - Enable preselect feature, works when |coc-config-suggest-noselect| is - false. +"list.previewHighlightGroup" *coc-config-list-previewHighlightGroup* - Scope: `application`, default: `true` + Highlight group used for highlight the range in preview window. -"suggest.filterGraceful" *coc-config-suggest-filterGraceful* + Scope: `application`, default: `"Search"` - Controls whether filtering and sorting suggestions accounts for small - typos. +"list.previewSplitRight" *coc-config-list-previewSplitRight* - Scope: `language-overridable`, default: `true` + Use vsplit for preview window. -"suggest.filterOnBackspace" *coc-config-suggest-filterOnBackspace* + Scope: `application`, default: `false` - Filter complete items on backspace. +"list.previewToplineOffset" *coc-config-list-previewToplineOffset* - Scope: `language-overridable`, default: `true` + Topline offset for list previews -"suggest.floatConfig" *coc-config-suggest-floatConfig* + Scope: `application`, default: `3` - Configure style of popup menu and documentation window for completion, - see |coc-config-float|. +"list.previewToplineStyle" *coc-config-list-previewToplineStyle* - Note: some properties not work, including: "title", "focusable", - "close" and "maxHeight" (use 'pumheight' option for maximum height of - popup menu). + Topline style for list previews, could be "offset" or "middle". - Note: "maxWidth" not works for popup menu, use - |coc-config-suggest-labelMaxLength| instead. + Scope: `application`, default: `"offset"` -"suggest.formatItems" *coc-config-suggest-formatItems* +"list.previousKeymap" *coc-config-list-previousKeymap* - Items shown in popup menu in order. + Key used for select previous line on insert mode. - Scope: `application`, default: `["abbr","menu","kind","shortcut"]` + Scope: `application`, default: `""` -"suggest.highPrioritySourceLimit" *coc-config-suggest-highPrioritySourceLimit* +"list.selectedSignText" *coc-config-list-selectedSignText* - Max items count for source priority bigger than or equal to 90. + Sign text for selected lines. - Scope: `language-overridable`, default: `null` + Scope: `application`, default: `"*"` -"suggest.insertMode" *coc-config-suggest-insertMode* +"list.signOffset" *coc-config-list-signOffset* - Controls whether words are overwritten when accepting completions. + Sign offset of list, should be different from other plugins. - Scope: `language-overridable`, default: `“replace"` + Scope: `application`, default: `900` -"suggest.ignoreRegexps" *coc-config-suggest-ignoreRegexps* +"list.smartCase" *coc-config-list-smartCase* - Regexps to ignore when trigger suggest. + Use smartcase match for fuzzy match and strict match, --ignore-case + will be ignored, may not affect interactive list. - Scope: `language-overridable`, default: `[]` + Scope: `application`, default: `false` -"suggest.invalidInsertCharacters" *coc-config-suggest-invalidInsertCharacters* +"list.source.diagnostics.includeCode" *coc-config-list-source-diagnostics-includeCode* - Invalid character for strip valid word when inserting text of complete - item. + Whether to show the diagnostic code in the list. - Scope: `application`, default: `["\r","\n"]` + Scope: `application`, default: `true` -"suggest.labelMaxLength" *coc-config-suggest-labelMaxLength* +"list.source.diagnostics.pathFormat" *coc-config-list-source-diagnostics-pathFormat* - Max length of abbr that shown as label of complete item. + Decide how the filepath is shown in the list. - Scope: `application`, default: `200` + Scope: `application`, default: `"full"` -"suggest.languageSourcePriority" *coc-config-suggest-languageSourcePriority* +"list.source.outline.ctagsFiletypes" *coc-config-list-source-outline-ctagsFiletypes* - Priority of language sources. + Filetypes that should use ctags for outline instead of language server. - Scope: `language-overridable`, default: `99` + Scope: `application`, default: `[]` -"suggest.localityBonus" *coc-config-suggest-localityBonus* +"list.source.symbols.excludes" *coc-config-list-source-symbols-excludes* - Boost suggestions that appear closer to the cursor position. + Patterns of minimatch for filepath to exclude from symbols list. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `[]` -"suggest.lowPrioritySourceLimit" *coc-config-suggest-lowPrioritySourceLimit* +"list.statusLineSegments" *coc-config-list-statusLineSegments* - Max items count for source priority lower than 90. + An array of statusline segments that will be used to draw the status + line for list windows. - Scope: `language-overridable`, default: `null` + Scope: `application`. -"suggest.maxCompleteItemCount" *coc-config-suggest-maxCompleteItemCount* +------------------------------------------------------------------------------ +Notification~ + *coc-config-notification* +"notification.border" *coc-config-notification-border* - Maximum number of complete items shown in vim. + Enable rounded border for notification windows. - Scope: `language-overridable`, default: `256` + Scope: `application`, default: `true` -"suggest.minTriggerInputLength" *coc-config-suggest-minTriggerInputLength* +"notification.disabledProgressSources" *coc-config-notification-disabledProgressSources* - Minimal input length for trigger completion. + Sources that should be disabled for message progress, use * to disable + all progresses. - Scope: `language-overridable`, default: `1` + Scope: `application`, default: `[]` -"suggest.noselect" *coc-config-suggest-noselect* +"notification.focusable" *coc-config-notification-focusable* - Not make vim select first item on popupmenu shown. + Enable focus by user actions (wincmds, mouse events), neovim only. - Scope: `application`, default: `false` + Scope: `application`, default: `true` -"suggest.preferCompleteThanJumpPlaceholder" *coc-config-suggest-preferCompleteThanJumpPlaceholder* +"notification.highlightGroup" *coc-config-notification-highlightGroup* - Confirm completion instead of jump to next placeholder when completion - is activated. + Highlight group of notification dialog. - Scope: `resource`, default: `false` + Scope: `application`, default: `"Normal"` -"suggest.pumFloatConfig" *coc-config-suggest-pumFloatConfig* +"notification.marginRight" *coc-config-notification-marginRight* - Configure style of popup menu, |coc-config-suggest-floatConfig| is - used when not specified, see |coc-config-float|. + Margin right to the right of editor window. - Available properties: "border", "rounded", "highlight", - "borderhighlight", "winblend" and "shadow". + Scope: `application`, default: `10` - Note: 'winblend' option is used for custom popup menu when not - configured, use 'pumwidth' for minimal width of popup menu and - 'pumheight' for maximum height of popup menu. +"notification.maxHeight" *coc-config-notification-maxHeight* - Scope: `application`, default: `null` + Maximum content height of notification dialog. -"suggest.removeDuplicateItems" *coc-config-suggest-removeDuplicateItems* + Scope: `application`, default: `10` - Remove completion items with duplicated word for all sources, snippet - items are excluded. +"notification.maxWidth" *coc-config-notification-maxWidth* - Scope: `language-overridable`, default: `false` + Maximum content width of notification dialog. -"suggest.removeCurrentWord" *coc-config-suggest-removeCurrentWord* + Scope: `application`, default: `60` - Remove word item (from around and buffer source) that is identical to - current input +"notification.minProgressWidth" *coc-config-notification-minProgressWidth* - Scope: `language-overridable`, default: `false` + Minimal with of progress notification. -"suggest.reTriggerAfterIndent" *coc-config-suggest-reTriggerAfterIndent* + Scope: `application`, default: `30` - Controls re-trigger or not after indent changes. +"notification.statusLineProgress" *coc-config-notification-statusLineProgress* - Scope: `application`, default: `true` + Show progress notification in status line, instead of use float + window/popup. -"suggest.reversePumAboveCursor" *coc-config-suggest-reversePumAboveCursor* +"notification.timeout" *coc-config-notification-timeout* - Reverse order of complete items when pum shown above cursor. + Timeout for auto close notifications, in milliseconds. - Scope: `application`, default: `false` + Scope: `application`, default: `10000` -"suggest.selection" *coc-config-suggest-selection* +"notification.winblend" *coc-config-notification-winblend* - Controls how suggestions are pre-selected when showing the suggest list. + Winblend option of notification window, neovim only. - Scope: `application`, default: `"first"` + Scope: `application`, default: `30` -"suggest.snippetIndicator" *coc-config-suggest-snippetIndicator* +------------------------------------------------------------------------------ +Outline~ + *coc-config-outline* +"outline.autoPreview" *coc-config-outline-autoPreview* - The character used in abbr of complete item to indicate the item could - be expand as snippet. + Enable auto preview on cursor move. - Scope: `application`, default: `"~"` + Scope: `application`, default: `false` -"suggest.snippetsSupport" *coc-config-suggest-snippetsSupport* +"outline.autoHide" *coc-config-outline-autoHide* - Set to false to disable snippets support of completion. + Automatically hide the outline window when an item is clicked. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `false` -"suggest.timeout" *coc-config-suggest-timeout* +"outline.autoWidth" *coc-config-outline-autoWidth* - Timeout for completion, in milliseconds. + Automatically increase window width to avoid wrapped lines. - Scope: `language-overridable`, default: `5000` + Scope: `application`, default: `true` -"suggest.triggerAfterInsertEnter" *coc-config-suggest-triggerAfterInsertEnter* +"outline.checkBufferSwitch" *coc-config-outline-checkBufferSwitch* - Trigger completion after InsertEnter, |coc-config-suggest-autoTrigger| - should be 'always' to enable this option + Recreate outline view after user changed to another buffer on current + tab. - Scope: `language-overridable`, default: `false` + Scope: `application`, default: `true` -"suggest.triggerCompletionWait" *coc-config-suggest-triggerCompletionWait* +"outline.codeActionKinds" *coc-config-outline-codeActionKinds* - Wait time between text change and completion start, cancel completion - when text changed during wait. + Filter code actions in actions menu by kinds. - Scope: `language-overridable`, default: `0` + Scope: `application`, default: `["","quickfix","refactor"]` -"suggest.virtualText" *coc-config-suggest-virtualText* +"outline.detailAsDescription" *coc-config-outline-detailAsDescription* - Show virtual text after cursor for insert word of current selected - complete item. + Show detail as description aside with label, when false detail will be + shown in tooltip on cursor hold. - Scope: `application`, default: `false` + Scope: `application`, default: `true` ------------------------------------------------------------------------------- -Tree~ - *coc-config-tree* -"tree.openedIcon" *coc-config-tree-openedIcon* +"outline.expandLevel" *coc-config-outline-expandLevel* - Opened icon of tree view. + Expand level of tree nodes. - Scope: `application`, default: `"-"` + Scope: `application`, default: `1` -"tree.closedIcon" *coc-config-tree-closedIcon* +"outline.followCursor" *coc-config-outline-followCursor* - Closed icon of tree view. + Reveal item in outline tree on cursor hold. - Scope: `application`, default: `"+"` + Scope: `application`, default: `true` -"tree.key.actions" *coc-config-tree-key-actions* +"outline.keepWindow" *coc-config-outline-keepWindow* - Trigger key to invoke actions. + Jump back to original window after outline is shown. - Scope: `application`, default: `""` + Scope: `application`, default: `false` -"tree.key.activeFilter" *coc-config-tree-key-activeFilter* +"outline.previewBorder" *coc-config-outline-previewBorder* - Trigger key active filter. + Use border for preview window. - Scope: `application`, default: `"f"` + Scope: `application`, default: `true` -"tree.key.close" *coc-config-tree-key-close* +"outline.previewBorderHighlightGroup" *coc-config-outline-previewBorderHighlightGroup* - Trigger key to dispose the tree and close tree window. + Border highlight group of preview window. - Scope: `application`, default: `""` + Scope: `application`, default: `"Normal"` -"tree.key.collapseAll" *coc-config-tree-key-collapseAll* +"outline.previewBorderRounded" *coc-config-outline-previewBorderRounded* - Trigger key to collapse all tree node. + Use rounded border for preview window. - Scope: `application`, default: `"M"` + Scope: `application`, default: `false` -"tree.key.invoke" *coc-config-tree-key-invoke* +"outline.previewHighlightGroup" *coc-config-outline-previewHighlightGroup* - Trigger key to invoke default command of current node or selection. + Highlight group of preview window. - Scope: `application`, default: `""` + Scope: `application`, default: `"Normal"` -"tree.key.selectNext" *coc-config-tree-key-selectNext* +"outline.previewMaxWidth" *coc-config-outline-previewMaxWidth* - Trigger key to select next item during filter. + Max width of preview window. - Scope: `application`, default: `""` + Scope: `application`, default: `80` -"tree.key.selectPrevious" *coc-config-tree-key-selectPrevious* +"outline.previewWinblend" *coc-config-outline-previewWinblend* - Trigger key to select previous item during filter. + Enables pseudo-transparency by set 'winblend' option of window, neovim + only. - Scope: `application`, default: `""` + Scope: `application`, default: `0` -"tree.key.toggle" *coc-config-tree-key-toggle* +"outline.showLineNumber" *coc-config-outline-showLineNumber* - Trigger key to toggle expand state of tree node, does nothing with leaf - node. + Show line number of symbols. - Scope: `application`, default: `"t"` + Scope: `application`, default: `true` -"tree.key.toggleSelection" *coc-config-tree-key-toggleSelection* +"outline.sortBy" *coc-config-outline-sortBy* - Trigger key to select/unselect item. + Default sort method for symbols outline. - Scope: `application`, default: `""` + Scope: `application`, default: `"category"` ------------------------------------------------------------------------------- -TypeHierarchy~ - *coc-config-typeHierarchy* -"typeHierarchy.enableTooltip" *coc-config-typeHierarchy-enableTooltip* +"outline.splitCommand" *coc-config-outline-splitCommand* - Enable tooltip to show relative filepath of type hierarchy item. + Window split command used by outline. - Scope: `application`, default: `true` + Scope: `application`, default: `"botright 30vs"` -"typeHierarchy.openCommand" *coc-config-typeHierarchy-openCommand* +"outline.switchSortKey" *coc-config-outline-switchSortKey* - Open command for type hierarchy tree view. + The key used to switch sort method for symbols provider of current + tree view. - Scope: `application`, default: `"edit"` + Scope: `application`, default: `""` -"typeHierarchy.splitCommand" *coc-config-typeHierarchy-splitCommand* +"outline.togglePreviewKey" *coc-config-outline-togglePreviewKey* - Window split command used by type hierarchy tree view. + The key used to toggle auto preview feature. - Scope: `application`, default: `"botright 30vs"` + Scope: `application`, default: `"p"` ------------------------------------------------------------------------------ -Workspace~ - *coc-config-workspace* -"workspace.rootPatterns" *coc-config-workspace-rootPatterns* +PullDiagnostic~ + *coc-config-pullDiagnostic* +"pullDiagnostic.ignored" *coc-config-pullDiagnostic-ignored* - Root patterns to resolve workspaceFolder from parent folders of opened - files, resolved from up to down. + Minimatch patterns to match full filepath that should be ignored for + pullDiagnostic. - Scope: `application`, default: `[".git",".hg",".projections.json"]` + Scope: `application`, default: `[]` -"workspace.bottomUpFiletypes" *coc-config-workspace-bottomUpFiletypes* +"pullDiagnostic.onChange" *coc-config-pullDiagnostic-onChange* - Filetypes that should have workspace folder should resolved from base - directory of file, or ["*"] for any filetype. + Whether to pull for diagnostics on document change. - Scope: `application`, default: `[]` + Scope: `language-overridable`, default: `true` -"workspace.ignoredFiletypes" *coc-config-workspace-ignoredFiletypes* +"pullDiagnostic.onSave" *coc-config-pullDiagnostic-onSave* - Filetypes that should be ignored for workspace folder resolve. + Whether to pull for diagnostics on document save. - Scope: `resource`, default: `[]` + Scope: `language-overridable`, default: `false` -"workspace.ignoredFolders" *coc-config-workspace-ignoredFolders* +"pullDiagnostic.workspace" *coc-config-pullDiagnostic-workspace* - List of folders that should not be resolved as workspace folder, - environment variables and minimatch patterns can be used. + Whether to pull for workspace diagnostics when possible. - Scope: `application`, default: `["$HOME"]` + Scope: `application`, default: `true` -"workspace.openOutputCommand" *coc-config-workspace-openOutputCommand* +------------------------------------------------------------------------------ +Refactor~ + *coc-config-refactor* +"refactor.afterContext" *coc-config-refactor-afterContext* - Command used to open output channel. + Print num lines of trailing context after each match. - Scope: `resource`, default: `"vs"` + Scope: `application`, default: `3` -"workspace.openResourceCommand" *coc-config-workspace-openResourceCommand* +"refactor.beforeContext" *coc-config-refactor-beforeContext* - Command to open files that not loaded, load files as hidden buffers - when empty. + Print num lines of leading context before each match. - Scope: `application`, default: `"tab drop"` + Scope: `application`, default: `3` -"workspace.workspaceFolderCheckCwd" *coc-config-workspace-workspaceFolderCheckCwd* +"refactor.openCommand" *coc-config-refactor-openCommand* - Whether the current working directory should be used first when - checking patterns match for workspace folder. + Open command for refactor window. - Scope: `application`, default: `true` + Scope: `application`, default: `"vsplit"` -"workspace.workspaceFolderFallbackCwd" *coc-config-workspace-workspaceFolderFallbackCwd* +"refactor.saveToFile" *coc-config-refactor-saveToFile* - Use current working directory as workspace folder when no root - patterns resolved. + Save changed buffer to file when write refactor buffer with ':noa wa' + command. Scope: `application`, default: `true` ------------------------------------------------------------------------------- -Preferences~ - *coc-config-preferences* -"coc.preferences.bracketEnterImprove" *coc-preferences-bracketEnterImprove* +"refactor.showMenu" *coc-config-refactor-showMenu* - Improve enter inside bracket `<> {} [] ()` by add new empty line below - and place cursor to it. Works with `coc#on_enter()` + Refactor buffer local mapping to bring up menu for this chunk. - Scope: `language-overridable`, default: `true` + Scope: `application`, default: `""` -"coc.preferences.currentFunctionSymbolAutoUpdate" *coc-preferences-currentFunctionSymbolAutoUpdate* +------------------------------------------------------------------------------ +SemanticTokens~ + *coc-config-semanticTokens* +"semanticTokens.combinedModifiers" *coc-config-semanticTokens-combinedModifiers* - Automatically update the value of b:coc_current_function on CursorMove - event + Semantic token modifiers that should have highlight combined with + syntax highlights. + + Scope: `language-overridable`, default: `["deprecated"]` + +"semanticTokens.enable" *coc-config-semanticTokens-enable* + + Enable semantic tokens support. Scope: `language-overridable`, default: `false` -"coc.preferences.currentFunctionSymbolDebounceTime" *coc-preferences-currentFunctionSymbolDebounceTime* +"semanticTokens.highlightPriority" *coc-config-semanticTokens-highlightPriority* - Set debounce timer for the update of b:coc_current_function on CursorMove - event + Priority for semantic tokens highlight. - Scope: `application`, default: `300` + Scope: `language-overridable`, default: `2048` -"coc.preferences.enableLinkedEditing" *coc-preferences-enableLinkedEditing* +"semanticTokens.incrementTypes" *coc-config-semanticTokens-incrementTypes* - Enable linked editing support. + Semantic token types that should increase highlight when insert at the + start and end position of token. + + Scope: `language-overridable`, default: `["variable","string","parameter"]` + +------------------------------------------------------------------------------ +Signature~ + *coc-config-signature* +"signature.enable" *coc-config-signature-enable* + + Enable show signature help when trigger character typed. + + Scope: `language-overridable`, default: `true` + +"signature.floatConfig" *coc-config-signature-floatConfig* + + Configuration of floating window/popup for signature documents, see + |coc-config-float|. + + Scope: `application`, default: `null` + +"signature.hideOnTextChange" *coc-config-signature-hideOnTextChange* + + Hide signature float window when text changed on insert mode. Scope: `language-overridable`, default: `false` -"coc.preferences.enableMarkdown" *coc-preferences-enableMarkdown* +"signature.preferShownAbove" *coc-config-signature-preferShownAbove* - Tell the language server that markdown text format is supported, note - that markdown text may not rendered as expected. + Show signature help float window above cursor when possible, require + restart coc.nvim on change. Scope: `application`, default: `true` -"coc.preferences.enableMessageDialog" *coc-preferences-enableMessageDialog* +"signature.target" *coc-config-signature-target* - Enable messages shown in notification dialog. + Target of signature help, use float when possible by default. - Scope: `application`, default: `false` + Scope: `language-overridable`, default: `"float"` -"coc.preferences.excludeImageLinksInMarkdownDocument" *coc-preferences-excludeImageLinksInMarkdownDocument* +"signature.triggerSignatureWait" *coc-config-signature-triggerSignatureWait* - Exclude image links from markdown text in float window. + Timeout for trigger signature help, in milliseconds. - Scope: `application`, default: `true` + Scope: `language-overridable`, default: `500` -"coc.preferences.enableGFMBreaksInMarkdownDocument" *coc-preferences-enableGFMBreaksInmakrdownDocument* +------------------------------------------------------------------------------ +Snippet~ + *coc-config-snippet* +"snippet.highlight" *coc-config-snippet-highlight* - Exclude GFM breaks in markdown document. + Use highlight group 'CocSnippetVisual' to highlight placeholders with + same index of current one. - Scope: `application`, default: `true` + Scope: `resource`, default: `false` -"coc.preferences.extensionUpdateCheck" *coc-preferences-extensionUpdateCheck* +"snippet.nextPlaceholderOnDelete" *coc-config-snippet-nextPlaceholderOnDelete* - Interval for check extension update, could be "daily", "weekly" or - "never" + Automatically jump to the next placeholder when the current one is + completely deleted. - Scope: `application`, default: `"never"` + Scope: `resource`, default: `false` -"coc.preferences.extensionUpdateUIInTab" *coc-preferences-extensionUpdateUIInTab* +"snippet.statusText" *coc-config-snippet-statusText* - Open `CocUpdate` UI in tab + Text shown in statusline to indicate snippet session is activated. - Scope: `application`, default: `false` + Scope: `application`, default: `"SNIP"` -"coc.preferences.floatActions" *coc-preferences-floatActions* +------------------------------------------------------------------------------ +Suggest~ + *coc-config-suggest* +"suggest.acceptSuggestionOnCommitCharacter" *coc-config-suggest-acceptSuggestionOnCommitCharacter* - Set to false to disable float/popup support for actions menu. + Controls whether suggestions should be accepted on commit characters. + For example, in JavaScript, the semi-colon (`;`) can be a commit + character that accepts a suggestion and types that character. - Scope: `application`, default: `true` + Scope: `language-overridable`, default: `false` -"coc.preferences.formatOnSave" *coc-preferences-formatOnSave* +"suggest.asciiCharactersOnly" *coc-config-suggest-asciiCharactersOnly* - Set to true to enable formatting on save. + Trigger suggest with ASCII characters only. Scope: `language-overridable`, default: `false` -"coc.preferences.formatOnSaveTimeout" *coc-preferences-formatOnSaveTimeout* +"suggest.chineseSegments" *coc-config-suggest-chineseSegments* - How long before the format command run on save will time out. + Divide Chinese sentence into segments in around/buffer source. - Scope: `language-overridable`, default: `200` + Scope: `language-overridable`, default: `true` -"coc.preferences.formatOnType" *coc-preferences-formatOnType* +"suggest.asciiMatch" *coc-config-suggest-asciiMatch* - Set to true to enable formatting on typing + Convert unicode characters to ascii for match. - Scope: `language-overridable`, default: `false` + Scope: `language-overridable`, default: `true` -"coc.preferences.formatterExtension" *coc-preferences-formatterExtension* +"suggest.autoTrigger" *coc-config-suggest-autoTrigger* - Extension used for formatting documents. When set to null, the formatter with highest priority is used. + How should completion be triggered, could be `"always"`, `"trigger"` + or `"none"`. - Scope: `language-overridable`, default: `null` + Scope: `language-overridable`, default: `"always"` -"coc.preferences.jumpCommand" *coc-preferences-jumpCommand* +"suggest.completionItemKindLabels" *coc-config-suggest-completionItemKindLabels* - Command used for location jump, like goto definition, goto references - etc. Can be also a custom command that gives file as an argument. + Set custom labels to completion items' kinds. + Default value: > + { + "text": "v", + "method": "f", + "function": "f", + "constructor": "f", + "field": "m", + "variable": "v", + "class": "C", + "interface": "I", + "module": "M", + "property": "m", + "unit": "U", + "value": "v", + "enum": "E", + "keyword": "k", + "snippet": "S", + "color": "v", + "file": "F", + "reference": "r", + "folder": "F", + "enumMember": "m", + "constant": "v", + "struct": "S", + "event": "E", + "operator": "O", + "typeParameter": "T", + "default": "" + } +< + Scope: `application` - Scope: `application`, default: `"edit"` +"suggest.defaultSortMethod" *coc-config-suggest-defaultSortMethod* -"coc.preferences.maxFileSize" *coc-preferences-maxFileSize* + Default sorting behavior when trigger is empty, could be `"length"`, + `"alphabetical"` or `"none"`. - Maximum file size in bytes that coc.nvim should handle, default - '10MB'. + Scope: `language-overridable`, default: `"length"` - Scope: `application`, default: `"10MB"` +"suggest.detailField" *coc-config-suggest-detailField* -"coc.preferences.messageLevel" *coc-preferences-messageLevel* + Where to show the detail text of CompleteItem from language server. - Message level for filter echoed messages, could be 'more', 'warning' - and 'error' + Scope: `application`, default: `"preview"` - Scope: `application`, default: `"more"` +"suggest.enableFloat" *coc-config-suggest-enableFloat* -"coc.preferences.promptInput" *coc-preferences-promptInput* + Enable float window with documentation aside with popupmenu. - Use prompt buffer in float window for user input. + Scope: `language-overridable`, default: `true` + +"suggest.enablePreselect" *coc-config-suggest-enablePreselect* + + Enable preselect feature, works when |coc-config-suggest-noselect| is + false. Scope: `application`, default: `true` -"coc.preferences.renameFillCurrent" *coc-preferences-renameFillCurrent* +"suggest.filterGraceful" *coc-config-suggest-filterGraceful* - Disable to stop Refactor-Rename float/popup window from populating - with old name in the New Name field. + Controls whether filtering and sorting suggestions accounts for small + typos. - Scope: `application`, default: `true` + Scope: `language-overridable`, default: `true` -"coc.preferences.silentAutoupdate" *coc-preferences-silentAutoupdate* +"suggest.filterOnBackspace" *coc-config-suggest-filterOnBackspace* - Not open split window with update status when performing auto update. + Filter complete items on backspace. - Scope: `application`, default: `true` + Scope: `language-overridable`, default: `true` -"coc.preferences.useQuickfixForLocations" *coc-preferences-useQuickfixForLocations* +"suggest.floatConfig" *coc-config-suggest-floatConfig* - Use vim's quickfix list for jump locations, need restart on change. + Configure style of popup menu and documentation window for completion, + see |coc-config-float|. + + Note: some properties not work, including: "title", "focusable", + "close" and "maxHeight" (use 'pumheight' option for maximum height of + popup menu). + + Note: "maxWidth" not works for popup menu, use + |coc-config-suggest-labelMaxLength| instead. + +"suggest.formatItems" *coc-config-suggest-formatItems* + + Items shown in popup menu in order. + + Scope: `application`, default: `["abbr","menu","kind","shortcut"]` + +"suggest.highPrioritySourceLimit" *coc-config-suggest-highPrioritySourceLimit* + + Max items count for source priority bigger than or equal to 90. + + Scope: `language-overridable`, default: `null` + +"suggest.insertMode" *coc-config-suggest-insertMode* + + Controls whether words are overwritten when accepting completions. + + Scope: `language-overridable`, default: `“replace"` + +"suggest.ignoreRegexps" *coc-config-suggest-ignoreRegexps* + + Regexps to ignore when trigger suggest. + + Scope: `language-overridable`, default: `[]` + +"suggest.invalidInsertCharacters" *coc-config-suggest-invalidInsertCharacters* + + Invalid character for strip valid word when inserting text of complete + item. + + Scope: `application`, default: `["\r","\n"]` + +"suggest.labelMaxLength" *coc-config-suggest-labelMaxLength* + + Max length of abbr that shown as label of complete item. + + Scope: `application`, default: `200` + +"suggest.languageSourcePriority" *coc-config-suggest-languageSourcePriority* + + Priority of language sources. + + Scope: `language-overridable`, default: `99` + +"suggest.localityBonus" *coc-config-suggest-localityBonus* + + Boost suggestions that appear closer to the cursor position. + + Scope: `language-overridable`, default: `true` + +"suggest.lowPrioritySourceLimit" *coc-config-suggest-lowPrioritySourceLimit* + + Max items count for source priority lower than 90. + + Scope: `language-overridable`, default: `null` + +"suggest.maxCompleteItemCount" *coc-config-suggest-maxCompleteItemCount* + + Maximum number of complete items shown in vim. + + Scope: `language-overridable`, default: `256` + +"suggest.minTriggerInputLength" *coc-config-suggest-minTriggerInputLength* + + Minimal input length for trigger completion. + + Scope: `language-overridable`, default: `1` + +"suggest.noselect" *coc-config-suggest-noselect* + + Not make vim select first item on popupmenu shown. Scope: `application`, default: `false` -"coc.preferences.watchmanPath" *coc-preferences-watchmanPath* +"suggest.preferCompleteThanJumpPlaceholder" *coc-config-suggest-preferCompleteThanJumpPlaceholder* - executable path for https://facebook.github.io/watchman/, detected - from $PATH by default + Confirm completion instead of jump to next placeholder when completion + is activated. - Scope: `application`, default: `null` + Scope: `resource`, default: `false` -"coc.preferences.willSaveHandlerTimeout" *coc-preferences-willSaveHandlerTimeout* +"suggest.pumFloatConfig" *coc-config-suggest-pumFloatConfig* - Will save handler timeout. + Configure style of popup menu, |coc-config-suggest-floatConfig| is + used when not specified, see |coc-config-float|. - Scope: `application`, default: `500` + Available properties: "border", "rounded", "highlight", + "borderhighlight", "winblend" and "shadow". -"coc.preferences.tagDefinitionTimeout" *coc-preferences-tagDefinitionTimeout* + Note: 'winblend' option is used for custom popup menu when not + configured, use 'pumwidth' for minimal width of popup menu and + 'pumheight' for maximum height of popup menu. - The timeout of CocTagFunc. - Scope: `application`, default: `0` + Scope: `application`, default: `null` ------------------------------------------------------------------------------- -Float configuration~ - *coc-config-float* +"suggest.removeDuplicateItems" *coc-config-suggest-removeDuplicateItems* -Used by `suggest.floatConfig`, `diagnostic.floatConfig`, -`signature.floatConfig` and `hover.floatConfig`, following properties are -supported: + Remove completion items with duplicated word for all sources, snippet + items are excluded. - - "border": Change to `true` to enable border. - - "rounded": Use rounded borders when border is `true`. - - "highlight": Background highlight group of float window, default: - `"CocFloating"`. - - "title": Title text used by float window, default: `""`. - - "borderhighlight": Border highlight group of float window, default: - `"CocFloating"`. - - "close": Set to `true` to draw close icon. - - "maxWidth": Maximum width of float window, contains border. - - "maxHeight": Maximum height of float window, contains border. - - "winblend": Set 'winblend' option of window, neovim only, default: - `0`. - - "focusable": Set to false to make window not focusable, neovim only. - - "shadow": Set to true to enable shadow, neovim only. - - "position": Controls how floating windows are positioned. When set to `'fixed'`, the window will be positioned according to the `top`, `bottom`, `left`, and `right` settings. When set to `'auto'`, the window follows the default position. - - "top": Distance from the top of the editor window in characters. Only takes effect when `position` is set to `'fixed'`. Will be ignored if `bottom` is set. - - "bottom": Distance from the bottom of the editor window in characters. Only takes effect when `position` is set to `'fixed'`. Takes precedence over `top` if both are set. - - "left": Distance from the left edge of the editor window in characters. Only takes effect when `position` is set to `'fixed'`. Will be ignored if `right` is set. - - "right": "Distance from the right edge of the editor window in characters. Only takes effect when `position` is set to `'fixed'`. Takes precedence over `left` if both are set." + Scope: `language-overridable`, default: `false` ------------------------------------------------------------------------------- -Languageserver~ - *coc-config-languageserver* +"suggest.removeCurrentWord" *coc-config-suggest-removeCurrentWord* - Dictionary of Language Servers, key is the ID of corresponding server, - and value is configuration of languageserver. Default: `{}` + Remove word item (from around and buffer source) that is identical to + current input - Properties of languageserver configuration: + Scope: `language-overridable`, default: `false` - - "enable": Change to `false` to disable that languageserver. +"suggest.reTriggerAfterIndent" *coc-config-suggest-reTriggerAfterIndent* - - "filetypes": Supported filetypes, add * in array for all filetypes. - Note: it's required for start the languageserver, please make sure - your filetype is expected by `:CocCommand document.echoFiletype` command + Controls re-trigger or not after indent changes. - - 'maxRestartCount': Maximum restart count when server closed in the - last 3 minutes, default to `4`. + Scope: `application`, default: `true` - - "additionalSchemes": Additional URI schemes, default schemes - including file & untitled. - Note: you have to setup vim provide content for custom URI as well. +"suggest.reversePumAboveCursor" *coc-config-suggest-reversePumAboveCursor* - - "cwd": Working directory used to start languageserver, vim's cwd is - used by default. + Reverse order of complete items when pum shown above cursor. - - "env": Environment variables for child process. + Scope: `application`, default: `false` - - "settings": Settings for languageserver, received on server - initialization. +"suggest.selection" *coc-config-suggest-selection* - - "trace.server": Trace level of communication between server and - client that showed with output channel, open output channel by - command `:CocCommand workspace.showOutput` + Controls how suggestions are pre-selected when showing the suggest list. - - "stdioEncoding": Encoding used for stdio of child process. + Scope: `application`, default: `"first"` - - "initializationOptions": Initialization options passed to - languageserver (it's deprecated) +"suggest.snippetIndicator" *coc-config-suggest-snippetIndicator* - - "rootPatterns": Root patterns used to resolve rootPath from current - file. + The character used in abbr of complete item to indicate the item could + be expand as snippet. - - "requireRootPattern": If true, doesn't start server when root - pattern not found. + Scope: `application`, default: `"~"` - - "ignoredRootPaths": Absolute root paths that language server should - not use as rootPath, higher priority than rootPatterns. +"suggest.snippetsSupport" *coc-config-suggest-snippetsSupport* - - "disableDynamicRegister": Disable dynamic registerCapability feature - for this languageserver to avoid duplicated feature registration. + Set to false to disable snippets support of completion. - - "disableSnippetCompletion": Disable snippet completion feature for - this languageserver. + Scope: `language-overridable`, default: `true` - - "disabledFeatures": Disable features for this languageserver, - valid keys: -> - ["completion", "configuration", "workspaceFolders", "diagnostics", - "willSave", "willSaveUntil", "didSaveTextDocument", - "fileSystemWatcher", "hover", "signatureHelp", "definition", - "references", "documentHighlight", "documentSymbol", - "workspaceSymbol", "codeAction", "codeLens", "formatting", - "documentFormatting", "documentRangeFormatting", - "documentOnTypeFormatting", "rename", "documentLink", - "executeCommand", "pullConfiguration", "typeDefinition", - "implementation", "declaration", "color", "foldingRange", - "selectionRange", "progress", "callHierarchy", "linkedEditing", - "fileEvents", "semanticTokens"] -< - - "formatterPriority": Priority of this languageserver's formatter. +"suggest.timeout" *coc-config-suggest-timeout* - - "revealOutputChannelOn": Configure message level to show the output - channel buffer. + Timeout for completion, in milliseconds. - - "progressOnInitialization": Enable progress report on languageserver - initialize. + Scope: `language-overridable`, default: `5000` -Language server start with command:~ +"suggest.triggerAfterInsertEnter" *coc-config-suggest-triggerAfterInsertEnter* - Additional fields can be used for a command languageserver: + Trigger completion after InsertEnter, |coc-config-suggest-autoTrigger| + should be 'always' to enable this option - - "command": Executable program name in $PATH or absolute path of - executable used for start languageserver. + Scope: `language-overridable`, default: `false` - - "args": Command line arguments of command. +"suggest.triggerCompletionWait" *coc-config-suggest-triggerCompletionWait* - - "detached": Detach language server when is true. + Wait time between text change and completion start, cancel completion + when text changed during wait. - - "shell": Use shell for server process, default: `false` + Scope: `language-overridable`, default: `0` -Language server start with module:~ +"suggest.virtualText" *coc-config-suggest-virtualText* - Additional fields can be used for a languageserver started by node - module: + Show virtual text after cursor for insert word of current selected + complete item. - - "module": Absolute filepath of Javascript file. + Scope: `application`, default: `false` - - "args": Extra arguments used on fork Javascript module. +------------------------------------------------------------------------------ +TypeHierarchy~ + *coc-config-typeHierarchy* +"typeHierarchy.enableTooltip" *coc-config-typeHierarchy-enableTooltip* - - "runtime": Absolute path of node runtime, node runtime of coc.nvim - is used by default. + Enable tooltip to show relative filepath of type hierarchy item. - - "execArgv": ARGV passed to node on fork, normally used for - debugging, example: `["--nolazy", "--inspect-brk=6045"]` + Scope: `application`, default: `true` - - "transport": Transport kind used by server, could be 'ipc', 'stdio', - 'socket' and 'pipe'. 'ipc' is used by default (recommended). +"typeHierarchy.openCommand" *coc-config-typeHierarchy-openCommand* - - "transportPort": Port number used when transport is 'socket'. + Open command for type hierarchy tree view. -Language server use initialized socket server:~ + Scope: `application`, default: `"edit"` - - "port": Port number of socket server. +"typeHierarchy.splitCommand" *coc-config-typeHierarchy-splitCommand* - - "host": Host of socket server, default to `127.0.0.1`. + Window split command used by type hierarchy tree view. + + Scope: `application`, default: `"botright 30vs"` ============================================================================== vim:tw=78:nosta:noet:ts=8:sts=0:ft=help:noet:fen: diff --git a/doc/coc.txt b/doc/coc.txt index b18677049a7..246907b9487 100644 --- a/doc/coc.txt +++ b/doc/coc.txt @@ -199,7 +199,7 @@ Update global extensions:~ Use |:CocUpdate| or |:CocUpdateSync|. -To update extensions automatically, config |coc-preferences-extensionUpdateCheck|. +To configure extension update, see |coc-config-extensions|. Manage extensions list:~ diff --git a/history.md b/history.md index d3578252686..be3396af831 100644 --- a/history.md +++ b/history.md @@ -2,6 +2,10 @@ Notable changes of coc.nvim: +## 2025-02-20 + +Use `extensions` section for extension related configurations. Deprecated configuration sections: `coc.preferences.extensionUpdateCheck`, `coc.preferences.extensionUpdateUIInTab` and `coc.preferences.silentAutoupdate`. + ## 2025-01-03 - Add `diagnostic.displayByVimDiagnostic` configuration, set diagnostics to `vim.diagnostic` on nvim, and prevent coc.nvim's handler to display in virtualText/sign/floating etc. diff --git a/src/__tests__/completion/language.test.ts b/src/__tests__/completion/language.test.ts index af71b9288b9..ce61f415acd 100644 --- a/src/__tests__/completion/language.test.ts +++ b/src/__tests__/completion/language.test.ts @@ -615,6 +615,14 @@ describe('language source', () => { await helper.confirmCompletion(0) await helper.waitFor('getline', ['.'], 'foo()') }) + + it('should use textEditText when exists with default range', async () => { + await start({ label: 'foo', insertText: 'bar', textEditText: 'foofoo' }, { + editRange: Range.create(0, 0, 0, 0) + }) + await helper.confirmCompletion(0) + await helper.waitFor('getline', ['.'], 'foofoo') + }) }) describe('textEdit', () => { diff --git a/src/__tests__/handler/locations.test.ts b/src/__tests__/handler/locations.test.ts index c1a080c176c..937d0052899 100644 --- a/src/__tests__/handler/locations.test.ts +++ b/src/__tests__/handler/locations.test.ts @@ -278,10 +278,10 @@ describe('locations', () => { expect(res).toEqual([ { name: 'foo', - cmd: 'silent keepjumps call cursor(3, 1)', + cmd: 'silent keepjumps call coc#cursor#move_to(2, 0)', filename: 'test://bar' }, - { name: 'foo', cmd: 'silent keepjumps call cursor(2, 1)', filename: '/foo' } + { name: 'foo', cmd: 'silent keepjumps call coc#cursor#move_to(1, 0)', filename: '/foo' } ]) }) }) diff --git a/src/__tests__/modules/extensionModules.test.ts b/src/__tests__/modules/extensionModules.test.ts index 4528fcb3cdf..91102dbdd78 100644 --- a/src/__tests__/modules/extensionModules.test.ts +++ b/src/__tests__/modules/extensionModules.test.ts @@ -387,7 +387,7 @@ describe('InstallBuffer', () => { it('should sync by not split', async () => { global.__TEST__ = false - let buf = new InstallBuffer(false) + let buf = new InstallBuffer({ isUpdate: false, updateUIInTab: false }) disposables.push(buf) events.requesting = true await buf.start(['a', 'b', 'c']) @@ -397,7 +397,7 @@ describe('InstallBuffer', () => { }) it('should draw buffer with stats', async () => { - let buf = new InstallBuffer(true) + let buf = new InstallBuffer({ isUpdate: true, updateUIInTab: true }) disposables.push(buf) buf.draw() await buf.start(['a', 'b', 'c', 'd']) @@ -418,7 +418,7 @@ describe('InstallBuffer', () => { }) it('should stop when all items finished', async () => { - let buf = new InstallBuffer(false) + let buf = new InstallBuffer({ isUpdate: false }) disposables.push(buf) await buf.start(['a', 'b']) buf.startProgress('a') @@ -433,7 +433,7 @@ describe('InstallBuffer', () => { it('should show messages and dispose', async () => { events.requesting = true - let buf = new InstallBuffer(true) + let buf = new InstallBuffer({ isUpdate: true }) disposables.push(buf) await buf.start(['a', 'b']) buf.startProgress('a') @@ -456,7 +456,7 @@ describe('InstallBuffer', () => { describe('InstallChannel', () => { it('should create install InstallChannel', async () => { let outputChannel = window.createOutputChannel('test') - let channel = new InstallChannel(true, outputChannel) + let channel = new InstallChannel({ isUpdate: true }, outputChannel) channel.start(['a', 'b']) channel.startProgress('a') channel.addMessage('a', 'msg', true) @@ -467,7 +467,7 @@ describe('InstallChannel', () => { it('should create update InstallChannel', async () => { let outputChannel = window.createOutputChannel('test') - let channel = new InstallChannel(false, outputChannel) + let channel = new InstallChannel({ isUpdate: false }, outputChannel) channel.start(['a', 'b']) channel.startProgress('a') channel.finishProgress('a', true) diff --git a/src/__tests__/modules/extensions.test.ts b/src/__tests__/modules/extensions.test.ts index 6133daa79e4..f8a28695a24 100644 --- a/src/__tests__/modules/extensions.test.ts +++ b/src/__tests__/modules/extensions.test.ts @@ -8,6 +8,7 @@ import extensions, { Extensions, toUrl } from '../../extension' import { writeFile, writeJson } from '../../util/fs' import workspace from '../../workspace' import helper from '../helper' +import { ConfigurationUpdateTarget } from '../../configuration/types' let tmpfolder: string beforeAll(async () => { @@ -45,13 +46,32 @@ describe('extensions', () => { extensions.addSchemeProperty('', null) }) + it('should get update settings', async () => { + let settings = extensions.getUpdateSettings() + expect(settings.updateCheck).toBe('never') + expect(settings.updateUIInTab).toBe(false) + expect(settings.silentAutoupdate).toBe(true) + let config = workspace.getConfiguration('extensions') + await config.update('updateCheck', 'weekly', ConfigurationUpdateTarget.Global) + await config.update('updateUIInTab', true, ConfigurationUpdateTarget.Global) + await config.update('silentAutoupdate', false, ConfigurationUpdateTarget.Global) + settings = extensions.getUpdateSettings() + expect(settings.updateCheck).toBe('weekly') + expect(settings.updateUIInTab).toBe(true) + expect(settings.silentAutoupdate).toBe(false) + await config.update('updateCheck', undefined, ConfigurationUpdateTarget.Global) + await config.update('updateUIInTab', undefined, ConfigurationUpdateTarget.Global) + await config.update('silentAutoupdate', undefined, ConfigurationUpdateTarget.Global) + }) + it('should toggle auto update', async () => { await commands.executeCommand('extensions.toggleAutoUpdate') - let config = workspace.getConfiguration('coc.preferences').get('extensionUpdateCheck') - expect(config).toBe('daily') + let config = workspace.getConfiguration('extensions') + expect(config.get('updateCheck')).toBe('daily') await commands.executeCommand('extensions.toggleAutoUpdate') - config = workspace.getConfiguration('coc.preferences').get('extensionUpdateCheck') - expect(config).toBe('never') + config = workspace.getConfiguration('extensions') + expect(config.get('updateCheck')).toBe('never') + await config.update('extensions.updateCheck', undefined, ConfigurationUpdateTarget.Global) }) it('should get extensions stat', async () => { @@ -212,7 +232,7 @@ describe('extensions', () => { } } as any }) - await extensions.updateExtensions() + await extensions.updateExtensions(true, true) spy.mockRestore() s.mockRestore() }) diff --git a/src/completion/source-language.ts b/src/completion/source-language.ts index 0a205f9ecde..c52421d39da 100644 --- a/src/completion/source-language.ts +++ b/src/completion/source-language.ts @@ -29,6 +29,7 @@ export default class LanguageSource implements ISource { public readonly sourceType = SourceType.Service private _enabled = true private itemDefaults: ItemDefaults = {} + private hasDefaultRange: boolean // cursor position on trigger private triggerContext: TriggerContext | undefined // Kept Promise for resolve @@ -70,8 +71,9 @@ export default class LanguageSource implements ISource { if (!result || token.isCancellationRequested) return null let completeItems = Array.isArray(result) ? result : result.items if (!completeItems || completeItems.length == 0) return null - let itemDefaults = this.itemDefaults = toObject(result['itemDefaults']) + let itemDefaults = this.itemDefaults = toObject(result['itemDefaults']) let isIncomplete = Is.isCompletionList(result) ? result.isIncomplete === true : false + this.hasDefaultRange = Range.is(itemDefaults.editRange) return { isIncomplete, items: completeItems, itemDefaults } } @@ -153,7 +155,7 @@ export default class LanguageSource implements ISource { } // replace range must contains cursor position. if (range.end.character < character) range.end.character = character - let newText = textEdit ? textEdit.newText : (textEditText ? textEditText : insertText) ?? label + let newText = textEdit ? textEdit.newText : (textEditText && this.hasDefaultRange ? textEditText : insertText) ?? label // adjust range by indent let indentCount = fixIndent(line, pos.text, range) // cursor moved count diff --git a/src/completion/types.ts b/src/completion/types.ts index 0f0c1bb204d..8a5e22be37d 100644 --- a/src/completion/types.ts +++ b/src/completion/types.ts @@ -39,6 +39,7 @@ export interface CompleteOption { export interface CompleteDoneOption extends CompleteOption { readonly snippetsSupport: boolean readonly insertMode: InsertMode + readonly itemDefaults?: ItemDefaults } // For filter, render and resolve diff --git a/src/extension/index.ts b/src/extension/index.ts index f1cfa0721eb..9562cceee9a 100644 --- a/src/extension/index.ts +++ b/src/extension/index.ts @@ -5,16 +5,17 @@ import { createLogger } from '../logger' import type { OutputChannel } from '../types' import { concurrent } from '../util' import { distinct, isFalsyOrEmpty } from '../util/array' -import { dataHome, VERSION } from '../util/constants' +import { VERSION, dataHome } from '../util/constants' import { isUrl } from '../util/is' import { fs, path, which } from '../util/node' +import { toObject } from '../util/object' import { executable } from '../util/processes' import { Event } from '../util/protocol' import window from '../window' import workspace from '../workspace' import { IInstaller, Installer } from './installer' import { API, Extension, ExtensionInfo, ExtensionItem, ExtensionManager, ExtensionState, ExtensionToLoad } from './manager' -import { checkExtensionRoot, ExtensionStat, loadExtensionJson, loadGlobalJsonAsync } from './stat' +import { ExtensionStat, checkExtensionRoot, loadExtensionJson, loadGlobalJsonAsync } from './stat' import { InstallBuffer, InstallChannel, InstallUI } from './ui' const logger = createLogger('extensions-index') @@ -27,6 +28,12 @@ export interface PropertyScheme { [key: string]: any } +export interface UpdateSettings { + updateCheck: string + updateUIInTab: boolean + silentAutoupdate: boolean +} + const EXTENSIONS_FOLDER = path.join(dataHome, 'extensions') // global local file native @@ -52,20 +59,31 @@ export class Extensions { commands.register({ id: 'extensions.toggleAutoUpdate', execute: async () => { - let config = workspace.getConfiguration('coc.preferences', null) - let interval = config.get('extensionUpdateCheck', 'daily') + let settings = this.getUpdateSettings() let target = ConfigurationUpdateTarget.Global - if (interval == 'never') { - await config.update('extensionUpdateCheck', 'daily', target) + let config = workspace.getConfiguration(null, null) + if (settings.updateCheck == 'never') { + await config.update('extensions.updateCheck', 'daily', target) void window.showInformationMessage('Extension auto update enabled.') } else { - await config.update('extensionUpdateCheck', 'never', target) + await config.update('extensions.updateCheck', 'never', target) void window.showInformationMessage('Extension auto update disabled.') } + await config.update('coc.preferences.extensionUpdateCheck', undefined, target) } }, false, 'toggle auto update of extensions.') } + public getUpdateSettings(): UpdateSettings { + let config = workspace.getConfiguration(null, null) + let extensionsConfig = toObject>(config.inspect('extensions').globalValue) + return { + updateCheck: extensionsConfig.updateCheck ?? config.get('coc.preferences.extensionUpdateCheck', 'never'), + updateUIInTab: extensionsConfig.updateUIInTab ?? config.get('coc.preferences.extensionUpdateUIInTab', false), + silentAutoupdate: extensionsConfig.silentAutoupdate ?? config.get('coc.preferences.silentAutoupdate', true) + } + } + public async init(runtimepath: string): Promise { if (process.env.COC_NO_PLUGINS == '1') return let stats = await this.globalPromise @@ -77,16 +95,17 @@ export class Extensions { public async activateExtensions(): Promise { await this.manager.activateExtensions() - if (process.env.COC_NO_PLUGINS == '1') return + if (process.env.COC_NO_PLUGINS == '1') { + logger.warn('Extensions disabled by env COC_NO_PLUGINS') + return + } let names = this.states.filterGlobalExtensions(workspace.env.globalExtensions) void this.installExtensions(names) // check extensions need watch & install - let config = workspace.initialConfiguration.get('coc.preferences') as any - let interval = config.extensionUpdateCheck - let silent = config.silentAutoupdate - if (this.states.shouldUpdate(interval)) { + let settings = this.getUpdateSettings() + if (this.states.shouldUpdate(settings.updateCheck)) { this.outputChannel.appendLine('Start auto update...') - this.updateExtensions(silent).catch(e => { + this.updateExtensions(settings.silentAutoupdate, settings.updateUIInTab).catch(e => { this.outputChannel.appendLine(`Error on updateExtensions ${e}`) }) } @@ -168,8 +187,8 @@ export class Extensions { return null } - private createInstallerUI(isUpdate: boolean, silent: boolean): InstallUI { - return silent ? new InstallChannel(isUpdate, this.outputChannel) : new InstallBuffer(isUpdate) + private createInstallerUI(isUpdate: boolean, silent: boolean, updateUIInTab: boolean): InstallUI { + return silent ? new InstallChannel({ isUpdate }, this.outputChannel) : new InstallBuffer({ isUpdate, updateUIInTab }) } public createInstaller(npm: string, def: string): IInstaller { @@ -183,7 +202,7 @@ export class Extensions { if (isFalsyOrEmpty(list) || !this.npm) return let { npm } = this list = distinct(list) - let installBuffer = this.createInstallerUI(false, false) + let installBuffer = this.createInstallerUI(false, false, false) await Promise.resolve(installBuffer.start(list)) let fn = async (key: string): Promise => { try { @@ -211,7 +230,7 @@ export class Extensions { /** * Update global extensions */ - public async updateExtensions(silent = false): Promise { + public async updateExtensions(silent = false, updateUIInTab = false): Promise { let { npm } = this if (!npm) return let stats = this.globalExtensionStats() @@ -224,7 +243,7 @@ export class Extensions { }) this.states.setLastUpdate() this.cleanModulesFolder() - let installBuffer = this.createInstallerUI(true, silent) + let installBuffer = this.createInstallerUI(true, silent, updateUIInTab) await Promise.resolve(installBuffer.start(stats.map(o => o.id))) let fn = async (stat: ExtensionInfo): Promise => { let { id } = stat diff --git a/src/extension/ui.ts b/src/extension/ui.ts index 3fb35c872b2..3b53d2135e8 100644 --- a/src/extension/ui.ts +++ b/src/extension/ui.ts @@ -18,6 +18,11 @@ export enum State { Success, } +interface InstallSettings { + isUpdate: boolean + updateUIInTab?: boolean +} + export interface InstallUI { start(names: string[]): void | Promise addMessage(name: string, msg: string, isProgress?: boolean): void @@ -26,7 +31,15 @@ export interface InstallUI { } export class InstallChannel implements InstallUI { - constructor(private isUpdate: boolean, private channel: OutputChannel) { + constructor(private settings: InstallSettings, private channel: OutputChannel) { + } + + private get isUpdate(): boolean { + return this.settings.isUpdate + } + + public getText(): string { + return this.isUpdate ? 'update' : 'install' } public start(names: string[]): void { @@ -40,14 +53,14 @@ export class InstallChannel implements InstallUI { } public startProgress(name: string): void { - this.channel.appendLine(`Start ${this.isUpdate ? 'update' : 'install'} ${name}`) + this.channel.appendLine(`Start ${this.getText()} ${name}`) } public finishProgress(name: string, succeed?: boolean): void { if (succeed) { - this.channel.appendLine(`${name} ${this.isUpdate ? 'update' : 'install'} succeed!`) + this.channel.appendLine(`${name} ${this.getText()} succeed!`) } else { - this.channel.appendLine(`${name} ${this.isUpdate ? 'update' : 'install'} failed!`) + this.channel.appendLine(`${name} ${this.getText()} failed!`) } } } @@ -63,7 +76,7 @@ export class InstallBuffer implements InstallUI { private interval: NodeJS.Timeout public bufnr: number - constructor(private isUpdate: boolean) { + constructor(private settings: InstallSettings) { let floatFactory = window.createFloatFactory({ modes: ['n'] }) this.disposables.push(floatFactory) let fn = debounce(async (bufnr, cursor) => { @@ -165,6 +178,10 @@ export class InstallBuffer implements InstallUI { return this.interval == null } + private get isUpdate(): boolean { + return this.settings.isUpdate + } + // draw frame public draw(): void { let { remains, bufnr } = this @@ -193,9 +210,8 @@ export class InstallBuffer implements InstallUI { private async show(): Promise { let isSync = events.requesting === true let { nvim } = workspace - const useTab = workspace.getConfiguration('coc.preferences').get('extensionUpdateUIInTab', false) nvim.pauseNotification() - nvim.command(isSync ? 'enew' : (useTab ? 'tabnew' : 'vs +enew'), true) + nvim.command(isSync ? 'enew' : (this.settings.updateUIInTab ? 'tabnew' : 'vs +enew'), true) nvim.call('bufnr', ['%'], true) nvim.command('setl buftype=nofile bufhidden=wipe noswapfile nobuflisted wrap undolevels=-1', true) if (!isSync) nvim.command('nnoremap q :q', true) diff --git a/src/handler/locations.ts b/src/handler/locations.ts index 6364e7cef93..37d834bbf09 100644 --- a/src/handler/locations.ts +++ b/src/handler/locations.ts @@ -136,7 +136,7 @@ export default class LocationsHandler { const filename = parsedURI.scheme == 'file' ? parsedURI.fsPath : parsedURI.toString() return { name: word, - cmd: `silent keepjumps call cursor(${location.range.start.line + 1}, ${location.range.start.character + 1})`, + cmd: `silent keepjumps call coc#cursor#move_to(${location.range.start.line}, ${location.range.start.character})`, filename, } }) diff --git a/src/plugin.ts b/src/plugin.ts index 2b006026ae8..5da009c9a9b 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -151,7 +151,7 @@ export default class Plugin { this.addAction('runCommand', (...args: any[]) => this.handler.commands.runCommand(...args)) this.addAction('repeatCommand', () => this.handler.commands.repeat()) this.addAction('installExtensions', (...list: string[]) => extensions.installExtensions(list)) - this.addAction('updateExtensions', (silent: boolean) => extensions.updateExtensions(silent)) + this.addAction('updateExtensions', (silent: boolean) => extensions.updateExtensions(silent, extensions.getUpdateSettings().updateUIInTab)) this.addAction('extensionStats', () => extensions.getExtensionStates()) this.addAction('loadedExtensions', () => extensions.manager.loadedExtensions) this.addAction('watchExtension', (id: string) => extensions.manager.watchExtension(id)) diff --git a/src/util/object.ts b/src/util/object.ts index 99170ef1f60..3098de2f621 100644 --- a/src/util/object.ts +++ b/src/util/object.ts @@ -7,7 +7,7 @@ export function isEmpty(obj: object | null | undefined): boolean { return Object.keys(obj).length == 0 } -export function toObject(obj: T | null | undefined): T | {} { +export function toObject(obj: T | null | undefined): Partial { return obj == null ? {} : obj }