Skip to content

Commit

Permalink
commit 33d0a52
Browse files Browse the repository at this point in the history
33d0a52 feat(schema): more workspace.ignoredFolders (#5084)
cbf525d fix(inlayHint): only check condition for Neovim (#5083)
6e1efbf fix(inlayHint): correct gravity for virt_text (#5081)
cfa1115 docs(config): add missing docs (#5080)
a00ff12 feat(diagnostic): remove ANSI codes from virtual text (#5077)
16dfda7 chore(packages): bump typescript and ts-eslint (#5074)
  • Loading branch information
fannheyward committed Jul 15, 2024
1 parent 51692dc commit ebe2a20
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
1 change: 1 addition & 0 deletions autoload/coc/vtext.vim
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function! coc#vtext#add(bufnr, src_id, line, blocks, opts) abort
let opts['virt_text'] = a:blocks
if s:n10 && column != 0
let opts['virt_text_pos'] = 'inline'
let opts['right_gravity'] = get(a:opts, 'right_gravity', v:true)
elseif align ==# 'right'
let opts['virt_text_pos'] = 'right_align'
else
Expand Down
26 changes: 21 additions & 5 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35335,6 +35335,10 @@ function ansiparse(str) {
}
return result;
}
function stripAnsiColoring(str) {
const ansiColorCodeRegex = /\u001b\[[0-9;]*m/g;
return str.replace(ansiColorCodeRegex, "");
}
var foregroundColors, backgroundColors, styles2;
var init_ansiparse = __esm({
"src/util/ansiparse.ts"() {
Expand Down Expand Up @@ -40018,7 +40022,13 @@ var init_schema = __esm({
},
"workspace.ignoredFolders": {
type: "array",
default: ["$HOME"],
default: [
"$HOME",
"$HOME/.cargo/**",
"$HOME/.rustup/**",
"$HOME/pkg/mod/**",
"$HOMEBREW_PREFIX/**"
],
scope: "application",
description: "List of folders that should not be resolved as workspace folder, environment variables and minimatch patterns can be used.",
items: {
Expand Down Expand Up @@ -52092,6 +52102,7 @@ var init_buffer = __esm({
init_window();
init_workspace();
init_util4();
init_ansiparse();
signGroup = "CocDiagnostic";
NAMESPACE = "diagnostic";
hlGroups = ["CocErrorHighlight", "CocWarningHighlight", "CocInfoHighlight", "CocHintHighlight", "CocDeprecatedHighlight", "CocUnusedHighlight"];
Expand Down Expand Up @@ -52524,10 +52535,11 @@ var init_buffer = __esm({
let highlight = getNameFromSeverity(diagnostic.severity) + "VirtualText";
let msg = diagnostic.message.split(/\n/).map((l) => l.trim()).filter((l) => l.length > 0).slice(0, this._config.virtualTextLines).join(this._config.virtualTextLineSeparator);
let arr = map.get(line) ?? [];
arr.unshift([virtualTextPrefix + formatDiagnostic(this._config.virtualTextFormat, {
const formattedDiagnostic = formatDiagnostic(this._config.virtualTextFormat, {
...diagnostic,
message: msg
}), highlight]);
});
arr.unshift([virtualTextPrefix + stripAnsiColoring(formattedDiagnostic), highlight]);
map.set(line, arr);
}
for (let [line, blocks] of map.entries()) {
Expand Down Expand Up @@ -85136,7 +85148,11 @@ var init_buffer4 = __esm({
if (this.config.position == "eol" /* Eol */) {
col = 0;
}
buffer.setVirtualText(srcId2, position.line, chunks, { col, hl_mode: "replace" });
let opts = { col, hl_mode: "replace" };
if (!nvim.isVim && item.kind == InlayHintKind.Parameter) {
opts.right_gravity = false;
}
buffer.setVirtualText(srcId2, position.line, chunks, opts);
}
nvim.resumeNotification(true, true);
this._onDidRefresh.fire();
Expand Down Expand Up @@ -89072,7 +89088,7 @@ var init_workspace2 = __esm({
}
async showInfo() {
let lines = [];
let version2 = workspace_default.version + (true ? "-56632971 2024-07-04 19:25:14 +0800" : "");
let version2 = workspace_default.version + (true ? "-33d0a523 2024-07-12 09:31:17 +0800" : "");
lines.push("## versions");
lines.push("");
let out = await this.nvim.call("execute", ["version"]);
Expand Down
24 changes: 24 additions & 0 deletions doc/coc-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,12 @@ InlayHint~

Scope: `language-overridable`, default: `false`

"inlayHint.position" *coc-config-inlayHint-position*

Controls the position of inlay hint, supports `inline` and `eol`.

Scope: `language-overridable`, default: `inline`

------------------------------------------------------------------------------
Links~
*coc-config-links*
Expand Down Expand Up @@ -817,6 +823,12 @@ Outline~

Scope: `application`, default: `false`

"outline.autoHide" *coc-config-outline-autoHide*

Automatically hide the outline window when an item is clicked.

Scope: `application`, default: `false`

"outline.autoWidth" *coc-config-outline-autoWidth*

Automatically increase window width to avoid wrapped lines.
Expand Down Expand Up @@ -1314,6 +1326,12 @@ Suggest~

Scope: `language-overridable`, default: `false`

"suggest.reTriggerAfterIndent" *coc-config-suggest-reTriggerAfterIndent*

Controls re-trigger or not after indent changes.

Scope: `application`, default: `true`

"suggest.reversePumAboveCursor" *coc-config-suggest-reversePumAboveCursor*

Reverse order of complete items when pum shown above cursor.
Expand Down Expand Up @@ -1576,6 +1594,12 @@ Preferences~

Scope: `application`, default: `"never"`

"coc.preferences.extensionUpdateUIInTab" *coc-preferences-extensionUpdateUIInTab*

Open `CocUpdate` UI in tab

Scope: `application`, default: `false`

"coc.preferences.floatActions" *coc-preferences-floatActions*

Set to false to disable float/popup support for actions menu.
Expand Down

0 comments on commit ebe2a20

Please sign in to comment.