Skip to content

Commit

Permalink
chore(doc): remove doc for vim & nvim which not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Feb 20, 2025
1 parent 65574c5 commit 61e65da
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 35 deletions.
3 changes: 0 additions & 3 deletions autoload/coc/float.vim
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,6 @@ function! coc#float#has_scroll() abort
endfunction

function! coc#float#scroll(forward, ...)
if !has('nvim-0.4.0') && !has('patch-8.2.0750')
throw 'coc#float#scroll() requires nvim >= 0.4.0 or vim >= 8.2.0750'
endif
let amount = get(a:, 1, 0)
let winids = filter(coc#float#get_float_win_list(), 'coc#float#scrollable(v:val) && getwinvar(v:val,"kind","") !=# "pum"')
if empty(winids)
Expand Down
4 changes: 2 additions & 2 deletions data/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@
"diagnostic.virtualText": {
"type": "boolean",
"scope": "language-overridable",
"description": "Use virtual text to display diagnostics, requires neovim >= 0.5.0 or vim >= 9.0.0067.",
"description": "Use virtual text to display diagnostics.",
"default": false
},
"diagnostic.virtualTextAlign": {
Expand Down Expand Up @@ -2262,7 +2262,7 @@
"suggest.virtualText": {
"type": "boolean",
"scope": "application",
"description": "Show virtual text for insert word of selected item, requires neovim >= 0.5.0 or vim >= 9.0.0067",
"description": "Show virtual text for insert word of selected item",
"default": false
},
"tree.closedIcon": {
Expand Down
7 changes: 3 additions & 4 deletions doc/coc-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ Diagnostic~

"diagnostic.virtualText" *coc-config-diagnostic-virtualText*

Use virtual text to display diagnostics, requires neovim >= 0.5.0 or
vim >= 9.0.0067.
Use virtual text to display diagnostics.

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

Expand Down Expand Up @@ -1386,8 +1385,8 @@ Suggest~

"suggest.virtualText" *coc-config-suggest-virtualText*

Show virtual text for insert word of selected item, requires
neovim >= 0.5.0 or vim >= 9.0.0067.
Show virtual text after cursor for insert word of current selected
complete item.

Scope: `application`, default: `false`

Expand Down
24 changes: 7 additions & 17 deletions doc/coc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ automatic completion of coc.nvim by use `"suggest.autoTrigger": "none"` (or
==============================================================================
REQUIREMENTS *coc-requirements*

Neovim >= 0.4.0 or Vim >= 8.1.1719.
Neovim >= 0.8.0 or Vim >= 9.0.0483.

NodeJS https://nodejs.org/ >= 16.18.0.

Expand Down Expand Up @@ -1002,8 +1002,6 @@ DOCUMENT COLORS *coc-document-colors*
Document colors added color highlights to vim buffers. To enable document
color highlights, use |coc-config-colors-enable|.

The feature requires vim >= 8.1.1719 or neovim >= 0.5.0.

Note: the highlights define gui colors only, make use you have 'termguicolors'
enabled (and your terminal support gui colors) if you're using vim in
terminal.
Expand Down Expand Up @@ -1304,8 +1302,6 @@ SEMANTIC HIGHLIGHTS *coc-semantic-highlights*
Semantic tokens are used to add additional color information to a buffer that
depends on language specific symbol information.

The feature requires vim >= 8.1.1719 or neovim >= 0.5.0.

Use |coc-config-semanticTokens-enable| to enable semantic tokens highlights.

Use `:CocCommand semanticTokens.checkCurrent` to check semantic highlight
Expand Down Expand Up @@ -2316,23 +2312,19 @@ coc#float#has_scroll() *coc#float#has_scroll()*

Example key-mappings:
>
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
<
coc#float#scroll({forward}, [{amount}]) *coc#float#scroll()*

Scroll all scrollable float windows/popups, scroll backward when
{forward} is not `1`. {amount} could be number or full page when
omitted. Popup menu is excluded.

Note: this function requires nvim >= 0.4.0 or vim >= 8.2.750 to work.


CocRequest({id}, {method}, [{params}]) *CocRequest()*

Expand Down Expand Up @@ -3939,8 +3931,6 @@ Note bottom buttons work different on neovim and vim, on neovim you can
click the button since neovim allows focus of window, on vim you have to type
highlighted character to trigger button callback.

Note dialog feature requires neovim >= 0.4.0 or vim >= 8.2.0750 to work.

See |coc-config-dialog| for available configurations.

--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/neovim/api/Buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class Buffer extends BaseApi {
}

/**
* Set virtual text for a line, works on nvim >= 0.5.0 and vim9
* Set virtual text for a line.
* @public
* @param {number} src_id - Source group to use or 0 to use a new group, or -1
* @param {number} line - Line to annotate with virtual text (zero-indexed)
Expand Down
16 changes: 8 additions & 8 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8269,7 +8269,7 @@ declare module 'coc.nvim' {
*/
readonly runtimepath: string
/**
* |virtualText| support in (neo)vim, needs nvim >= 0.5.0 or vim >= 9.0067
* |virtualText| support in (neo)vim
*/
readonly virtualText: boolean
/**
Expand Down Expand Up @@ -8329,15 +8329,15 @@ declare module 'coc.nvim' {
*/
readonly isiTerm: boolean
/**
* version of (neo)vim, on vim it's like: 8020750, on neoivm it's like: 0.5.0
* version of (neo)vim, on vim it's like: 8020750, on neoivm it's like
*/
readonly version: string
/**
* |v:progpath| value, could be empty.
*/
readonly progpath: string
/**
* Is true when dialog feature is supported, which need vim >= 8.2.750 or neovim >= 0.4.0
* Is true when dialog feature is supported
*/
readonly dialog: boolean
/**
Expand Down Expand Up @@ -9829,11 +9829,11 @@ declare module 'coc.nvim' {
cursorline?: boolean
modes?: string[]
excludeImages?: boolean
position?: "fixed" | "auto";
top?: number;
bottom?: number;
left?: number;
right?: number;
position?: "fixed" | "auto"
top?: number
bottom?: number
left?: number
right?: number
}

export interface FloatFactory {
Expand Down

0 comments on commit 61e65da

Please sign in to comment.