This commit is contained in:
array-in-a-matrix 2022-01-08 20:17:08 -05:00
parent a0e4b3bf88
commit 7e4f8a6159
59 changed files with 559 additions and 307 deletions

View file

@ -25,12 +25,30 @@ _True snippet and additional text editing support_
- 🌟 **Featured**: [full LSP support](https://github.com/neoclide/coc.nvim/wiki/Language-servers#supported-features)
- ❤️ **Flexible**: [configured like VSCode](https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file), [extensions work like in VSCode](https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions)
**Gold Sponsors**
<a href="https://opencollective.com/cocnvim#platinum-sponsors">
<img src="https://opencollective.com/cocnvim/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
</a>
**Silver Sponsors**
<a href="https://opencollective.com/cocnvim#platinum-sponsors">
<img src="https://opencollective.com/cocnvim/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
</a>
**Bronze Sponsors**
<a href="https://opencollective.com/cocnvim#platinum-sponsors">
<img src="https://opencollective.com/cocnvim/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
</a>
## Quick Start
Install [nodejs](https://nodejs.org/en/download/) >= 12.12:
```sh
curl -sL install-node.now.sh/lts | bash
```bash
curl -sL install-node.vercel.app/lts | bash
```
For [vim-plug](https://github.com/junegunn/vim-plug) users:
@ -200,6 +218,9 @@ nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Run the Code Lens action on the current line.
nmap <leader>cl <Plug>(coc-codelens-action)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
@ -233,7 +254,7 @@ command! -nargs=0 Format :call CocAction('format')
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
@ -322,6 +343,13 @@ Try these steps when you have problem with coc.nvim.
<a href="https://opencollective.com/cocnvim/backer/31/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/31/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/32/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/32/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/33/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/33/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/34/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/34/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/35/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/35/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/36/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/36/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/37/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/37/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/38/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/38/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/39/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/39/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim/backer/40/website?requireActive=false" target="_blank"><img src="https://opencollective.com/cocnvim/backer/40/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/cocnvim#backer" target="_blank"><img src="https://images.opencollective.com/static/images/become_backer.svg"></a>

View file

@ -194,3 +194,24 @@ function! coc#do_notify(id, method, result)
call Fn(a:result)
endif
endfunction
function! coc#complete_indent() abort
let l:curpos = getcurpos()
let l:indent_pre = indent('.')
let l:startofline = &startofline
let l:virtualedit = &virtualedit
set nostartofline
set virtualedit=all
normal! ==
let &startofline = l:startofline
let &virtualedit = l:virtualedit
let l:shift = indent('.') - l:indent_pre
let l:curpos[2] += l:shift
let l:curpos[4] += l:shift
call cursor(l:curpos[1:])
if l:shift != 0
call coc#_cancel()
endif
endfunction

View file

@ -149,7 +149,7 @@ function! s:funcs.feedkeys(keys, mode, escape_csi)
endfunction
function! s:funcs.list_runtime_paths()
return split(&runtimepath, ',')
return globpath(&runtimepath, '', 0, 1)
endfunction
function! s:funcs.command_output(cmd)
@ -310,7 +310,7 @@ function! s:funcs.buf_clear_namespace(bufnr, srcId, startLine, endLine) abort
endif
let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr
let start = a:startLine + 1
let end = a:endLine == -1 ? len(getbufline(bufnr, 1, '$')) : a:endLine + 1
let end = a:endLine == -1 ? len(getbufline(bufnr, 1, '$')) : a:endLine
if a:srcId == -1
call prop_clear(start, end, {'bufnr' : bufnr})
else
@ -376,8 +376,14 @@ function! s:funcs.buf_set_lines(bufnr, start, end, strict, ...) abort
if delCount
let start = startLnum + len(replacement)
let saved_reg = @"
silent execute start . ','.(start + delCount - 1).'d'
let system_reg = @*
if exists('*deletebufline')
silent call deletebufline(curr, start, start + delCount - 1)
else
silent execute start . ','.(start + delCount - 1).'d'
endif
let @" = saved_reg
let @* = system_reg
endif
endif
call winrestview(storeView)
@ -396,8 +402,12 @@ function! s:funcs.buf_set_lines(bufnr, start, end, strict, ...) abort
endif
if delCount
let start = startLnum + len(replacement)
let saved_reg = @"
let system_reg = @*
"8.1.0039
silent call deletebufline(a:bufnr, start, start + delCount - 1)
let @" = saved_reg
let @* = system_reg
endif
endif
endif

View file

@ -284,7 +284,7 @@ function! coc#float#nvim_close_btn(config, winid, border, hlgroup, winblend, rel
\ 'focusable': v:true,
\ 'style': 'minimal',
\ }
if has('nvim-0.5.0')
if has('nvim-0.5.1')
let config['zindex'] = 300
endif
if winid
@ -318,7 +318,7 @@ function! coc#float#nvim_right_pad(config, winid, hlgroup, winblend, related) ab
\ 'focusable': v:false,
\ 'style': 'minimal',
\ }
if has('nvim-0.5.0')
if has('nvim-0.5.1')
let config['zindex'] = 300
endif
if winid && nvim_win_is_valid(winid)
@ -359,7 +359,7 @@ function! coc#float#nvim_buttons(config, winid, buttons, borderbottom, pad, hlgr
\ 'focusable': 1,
\ 'style': 'minimal',
\ }
if has('nvim-0.5.0')
if has('nvim-0.5.1')
let config['zindex'] = 300
if a:shadow
let config['border'] = 'shadow'
@ -447,7 +447,7 @@ function! coc#float#nvim_scrollbar(winid) abort
\ 'focusable': v:false,
\ 'style': 'minimal',
\ }
if has('nvim-0.5.0')
if has('nvim-0.5.1')
let opts['zindex'] = 300
endif
if id
@ -619,6 +619,7 @@ function! coc#float#create_prompt_win(title, default, opts) abort
exe 'inoremap <silent><expr><nowait><buffer> <cr> "\<C-r>=coc#float#prompt_insert(getline(''.''))\<cr>\<esc>"'
call feedkeys('A', 'in')
endif
call coc#util#do_autocmd('CocOpenFloatPrompt')
return [bufnr, winid]
endfunction
@ -1682,8 +1683,17 @@ endfunction
" get popup position for vim8 based on config of neovim float window
function! s:popup_position(config) abort
let relative = get(a:config, 'relative', 'editor')
let border = get(a:config, 'border', [0, 0, 0, 0])
let delta = get(border, 0, 0) + get(border, 2, 0)
if relative ==# 'cursor'
return [s:popup_cursor(a:config['row']), s:popup_cursor(a:config['col'])]
if a:config['row'] < 0
let delta = - delta
elseif a:config['row'] == 0
let delta = - get(border, 0, 0)
else
let delta = 0
endif
return [s:popup_cursor(a:config['row'] + delta), s:popup_cursor(a:config['col'])]
endif
return [a:config['row'] + 1, a:config['col'] + 1]
endfunction

View file

@ -331,10 +331,12 @@ function! coc#highlight#compose_hlgroup(fgGroup, bgGroup) abort
endif
let fgId = synIDtrans(hlID(a:fgGroup))
let bgId = synIDtrans(hlID(a:bgGroup))
let guifg = synIDattr(fgId, 'reverse', 'gui') !=# '1' ? synIDattr(fgId, 'fg', 'gui') : synIDattr(fgId, 'bg', 'gui')
let guibg = synIDattr(bgId, 'reverse', 'gui') !=# '1' ? synIDattr(bgId, 'bg', 'gui') : synIDattr(bgId, 'fg', 'gui')
let ctermfg = synIDattr(fgId, 'reverse', 'cterm') !=# '1' ? synIDattr(fgId, 'fg', 'cterm') : synIDattr(fgId, 'bg', 'cterm')
let ctermbg = synIDattr(bgId, 'reverse', 'cterm') !=# '1' ? synIDattr(bgId, 'bg', 'cterm') : synIDattr(bgId, 'fg', 'cterm')
let isGuiReversed = synIDattr(fgId, 'reverse', 'gui') !=# '1' || synIDattr(bgId, 'reverse', 'gui') !=# '1'
let guifg = isGuiReversed ? synIDattr(fgId, 'fg', 'gui') : synIDattr(fgId, 'bg', 'gui')
let guibg = isGuiReversed ? synIDattr(bgId, 'bg', 'gui') : synIDattr(bgId, 'fg', 'gui')
let isCtermReversed = synIDattr(fgId, 'reverse', 'cterm') !=# '1' || synIDattr(bgId, 'reverse', 'cterm') !=# '1'
let ctermfg = isCtermReversed ? synIDattr(fgId, 'fg', 'cterm') : synIDattr(fgId, 'bg', 'cterm')
let ctermbg = isCtermReversed ? synIDattr(bgId, 'bg', 'cterm') : synIDattr(bgId, 'fg', 'cterm')
let bold = synIDattr(fgId, 'bold') ==# '1'
let italic = synIDattr(fgId, 'italic') ==# '1'
let underline = synIDattr(fgId, 'underline') ==# '1'
@ -362,6 +364,9 @@ function! coc#highlight#compose_hlgroup(fgGroup, bgGroup) abort
elseif underline
let cmd .= ' cterm=underline gui=underline'
endif
if cmd ==# 'silent hi ' . hlGroup
return 'Normal'
endif
execute cmd
return hlGroup
endfunction

View file

@ -245,7 +245,7 @@ function! coc#list#preview(lines, config) abort
execute 'noa '.mod.' sb +resize\ '.height.' '.bufnr
let winid = win_getid()
endif
noa call winrestview({"lnum": lnum ,"topline":max([1, lnum - 3])})
noa call winrestview({"lnum": lnum ,"topline":s:get_topline(a:config, lnum, winid)})
call setwinvar(winid, '&signcolumn', 'no')
call setwinvar(winid, '&number', 1)
call setwinvar(winid, '&cursorline', 0)
@ -264,7 +264,7 @@ function! coc#list#preview(lines, config) abort
call nvim_win_set_height(winid, height)
endif
endif
call coc#compat#execute(winid, ['syntax clear', 'noa call winrestview({"lnum":'.lnum.',"topline":'.max([1, lnum - 3]).'})'])
call coc#compat#execute(winid, ['syntax clear', 'noa call winrestview({"lnum":'.lnum.',"topline":'.s:get_topline(a:config, lnum, winid).'})'])
endif
call setwinvar(winid, '&foldenable', 0)
if s:prefix.' '.name != bufname(bufnr)
@ -312,3 +312,13 @@ function! s:load_buffer(name) abort
endif
return 0
endfunction
function! s:get_topline(config, lnum, winid) abort
let toplineStyle = get(a:config, 'toplineStyle', 'offset')
if toplineStyle == 'middle'
return max([1, a:lnum - winheight(a:winid)/2])
endif
let toplineOffset = get(a:config, 'toplineOffset', 3)
return max([1, a:lnum - toplineOffset])
endfunction

View file

@ -3,7 +3,7 @@ let s:root = expand('<sfile>:h:h:h')
let s:is_win = has('win32') || has('win64')
let s:is_vim = !has('nvim')
let s:clear_match_by_id = has('nvim-0.5.0') || has('patch-8.1.1084')
let s:vim_api_version = 10
let s:vim_api_version = 11
let s:activate = ""
let s:quit = ""
@ -159,6 +159,15 @@ function! coc#util#jump(cmd, filepath, ...) abort
let extra = empty(get(a:, 1, [])) ? '' : '+'.(a:1[0] + 1)
exe 'pedit '.extra.' '.fnameescape(file)
return
elseif a:cmd == 'drop' && exists('*bufadd')
let dstbuf = bufadd(path)
let binfo = getbufinfo(dstbuf)
if len(binfo) == 1 && empty(binfo[0].windows)
exec 'buffer '.dstbuf
let &buflisted = 1
else
exec 'drop '.fnameescape(file)
endif
else
exe a:cmd.' '.fnameescape(file)
endif
@ -351,6 +360,7 @@ function! coc#util#get_complete_option()
\ 'synname': synname,
\ 'changedtick': b:changedtick,
\ 'blacklist': get(b:, 'coc_suggest_blacklist', []),
\ 'indentkeys': coc#util#get_indentkeys()
\}
endfunction
@ -442,6 +452,9 @@ function! coc#util#open_terminal(opts) abort
setl norelativenumber
setl nonumber
setl bufhidden=wipe
if exists('#User#CocTerminalOpen')
exe 'doautocmd <nomodeline> User CocTerminalOpen'
endif
let cmd = get(a:opts, 'cmd', '')
let autoclose = get(a:opts, 'autoclose', 1)
if empty(cmd)
@ -529,7 +542,7 @@ function! coc#util#vim_info()
\ 'colorscheme': get(g:, 'colors_name', ''),
\ 'workspaceFolders': get(g:, 'WorkspaceFolders', v:null),
\ 'background': &background,
\ 'runtimepath': &runtimepath,
\ 'runtimepath': join(globpath(&runtimepath, '', 0, 1), ','),
\ 'locationlist': get(g:,'coc_enable_locationlist', 1),
\ 'progpath': v:progpath,
\ 'guicursor': &guicursor,
@ -546,7 +559,7 @@ function! coc#util#highlight_options()
return {
\ 'colorscheme': get(g:, 'colors_name', ''),
\ 'background': &background,
\ 'runtimepath': &runtimepath,
\ 'runtimepath': join(globpath(&runtimepath, '', 0, 1), ','),
\}
endfunction
@ -874,3 +887,14 @@ function! coc#util#get_format_opts(bufnr) abort
let tabsize = &shiftwidth == 0 ? &tabstop : &shiftwidth
return [tabsize, &expandtab]
endfunction
" Get indentkeys for indent on TextChangedP, consider = for word indent only.
function! coc#util#get_indentkeys() abort
if empty(&indentexpr)
return ''
endif
if &indentkeys !~# '='
return ''
endif
return &indentkeys
endfunction

View file

@ -30,26 +30,26 @@ function! coc#window#gotoid(winid) abort
endif
endfunction
" Avoid autocmd & errors
" Avoid errors
function! coc#window#close(winid) abort
if empty(a:winid) || a:winid == -1
return
endif
if exists('*nvim_win_is_valid') && exists('*nvim_win_close')
if nvim_win_is_valid(a:winid)
noa call nvim_win_close(a:winid, 1)
call nvim_win_close(a:winid, 1)
endif
elseif exists('*win_execute')
call coc#compat#execute(a:winid, 'noa close!', 'silent!')
else
let curr = win_getid()
if curr == a:winid
noa silent! close!
silent! close!
else
let res = win_gotoid(a:winid)
if res
noa silent! close!
noa call win_gotoid(curr)
silent! close!
call win_gotoid(curr)
endif
endif
endif

File diff suppressed because one or more lines are too long

View file

@ -99,7 +99,7 @@
"formatterPriority": {
"type": "number",
"default": 0,
"description": "Priority of this languageserver's fomatter."
"description": "Priority of this languageserver's formatter."
},
"env": {
"type": "object",
@ -467,12 +467,12 @@
"default": 5000,
"minimum": 500,
"maximum": 15000,
"description": "Timeout for completion, in miliseconds."
"description": "Timeout for completion, in milliseconds."
},
"suggest.minTriggerInputLength": {
"type": "integer",
"default": 1,
"description": "Mininal input length for trigger completion, default 1"
"description": "Minimal input length for trigger completion, default 1"
},
"suggest.triggerCompletionWait": {
"type": "integer",
@ -583,7 +583,7 @@
},
"diagnostic.highlighLimit": {
"type": "number",
"description": "Limit count for highlighted diagnostics, too many diagnostic highlights could make vim stop responsing",
"description": "Limit count for highlighted diagnostics, too many diagnostic highlights could make vim stop responding",
"default": 1000
},
"diagnostic.autoRefresh": {
@ -633,6 +633,16 @@
"description": "Use NeoVim virtual text to display diagnostics",
"default": false
},
"diagnostic.virtualTextAlignRight": {
"type": "boolean",
"description": "Make virtual text align to the right of window.",
"default": false
},
"diagnostic.virtualTextWinCol": {
"type": ["number", "null"],
"description": "Window column number to align virtual text",
"default": null
},
"diagnostic.virtualTextCurrentLineOnly": {
"type": "boolean",
"description": "Only show virtualText diagnostic on current cursor line",
@ -752,7 +762,7 @@
"default": 500,
"minimum": 200,
"maximum": 1000,
"description": "Timeout for trigger signature help, in miliseconds."
"description": "Timeout for trigger signature help, in milliseconds."
},
"signature.target": {
"type": "string",
@ -1017,6 +1027,17 @@
"default": "Search",
"description": "Highlight group used for highlight the range in preview window."
},
"list.previewToplineStyle": {
"type": "string",
"default": "offset",
"description": "Topline style for list previews",
"enum": ["offset", "middle"]
},
"list.previewToplineOffset": {
"type": "number",
"default": 3,
"description": "Topline offset for list previews"
},
"list.nextKeymap": {
"type": "string",
"default": "<C-j>",

View file

@ -62,24 +62,26 @@ Some of its key features include:~
- APIs compatible with both Vim8 and Neovim.
- Loading VSCode-like extensions.
- Configuring coc.nvim and its extensions with a JSON configuration file.
- Configuring Language Servers implemented according to Language Server Protocol (LSP).
- Configuring Language Servers implemented according to Language Server
Protocol (LSP).
It's designed to have an as good as possible integration with other Vim plugins.
It is designed for best possible integration with other Vim plugins.
Note: This plugin doesn't come with any support for any specific language. You
will need to install a coc extension or set up a languageserver for LSP features.
Note: This plugin doesn't come with support for any specific language. You
will need to install a coc extension or set up the language server yourself.
Note: This plugin doesn't change any of your existing key-mappings. You will
need to create key-mappings by yourself.
need to create key-mappings by yourself, see README for examples.
Note: automatic completion plugins can't play nicely together, you can disable
automatic completion of coc.nvim by use `"suggest.autoTrigger": "none"` (or
Note: Automatic completion plugins can't play nicely together, you can disable
automatic completion of coc.nvim through `"suggest.autoTrigger": "none"` (or
`"suggest.autoTrigger": "trigger"`) in your settings file.
==============================================================================
REQUIREMENTS *coc-requirements*
Neovim >= 0.3.2 or Vim >= 8.0.1453.
Neovim >= 0.3.2 or Vim >= 8.0.1453, for best experience, use neovim >= 0.4.0
or vim >= 8.2.0750.
NodeJS https://nodejs.org/ >= 12.12.0.
@ -116,12 +118,13 @@ You can also use Vim's native package management: >
==============================================================================
CONFIGURATION *coc-configuration*
The configurations of coc.nvim are stored in a file named `coc-settings.json`.
You can open it using |:CocConfig|. This will create/open a global settings
The configuration of coc.nvim is stored in `coc-settings.json` file. You can
open it through |:CocConfig|. This will open (or create) a global settings
files in folder returned by |coc#util#get_config_home()|
To create a configuration file used by project only, use |:CocLocalConfig| to
create/open `.vim/coc-settings.json` inside current workspace folder.
To create a local configuration project for a specific workspace, use
|:CocLocalConfig|: this will create `.vim/coc-settings.json` in the current
workspace folder.
The global configuration file can be created in another directory by setting
`g:coc_config_home` in your `.vimrc` or `init.vim`: >
@ -154,7 +157,8 @@ Built-in configurations:~
"http.proxyAuthorization":~
The value to send as the `Proxy-Authorization` header for every network request.
The value to send as the `Proxy-Authorization` header for every
network request.
"http.proxyCA":~
@ -293,8 +297,8 @@ Built-in configurations:~
"suggest.keepCompleteopt":~
When enabled, 'completeopt' is not overridden. Autocompletion will be
disabled if 'completeopt' doesn't have 'noinsert' and 'noselect', default:
`false`
disabled if 'completeopt' doesn't have 'noinsert' and 'noselect',
default: `false`
"suggest.lowPrioritySourceLimit":~
@ -370,7 +374,7 @@ Built-in configurations:~
"diagnostic.highlighLimit":~
Limit count for highlighted diagnostics, too many diagnostic
highlights could make vim stop responsing.
highlights could make vim stop responding.
default: `1000`
@ -423,8 +427,8 @@ Built-in configurations:~
"diagnostic.checkCurrentLine":~
Show all diagnostics of the current line if none of them are at the current
position, default: `false`
Show all diagnostics of the current line if none of them are at the
current position, default: `false`
"diagnostic.messageTarget":~
@ -439,13 +443,21 @@ Built-in configurations:~
"diagnostic.displayByAle":~
Use ALE for displaying diagnostics. This will disable coc.nvim for
displaying diagnostics. Restart to make changes take the effect, default:
`false`
displaying diagnostics. Restart to make changes take the effect,
default: `false`
"diagnostic.virtualText":~
Use Neovim virtual text to display diagnostics, default: `false`
"diagnostic.virtualTextAlignRight":~
Make virtual text align to the right of window, default: `false`
"diagnostic.virtualTextWinCol":~
Window column number to align virtual text, default: `null`
"diagnostic.virtualTextCurrentLineOnly":~
Only show virtualText diagnostic on current cursor line, default:
@ -511,8 +523,8 @@ Built-in configurations:~
"signature.enable":~
Enable signature help when trigger character typed. Requires service restart
on change, default: `true`
Enable signature help when trigger character typed. Requires service
restart on change, default: `true`
"signature.floatConfig":~
@ -532,13 +544,13 @@ Built-in configurations:~
"signature.preferShownAbove":~
Show signature help's floating window above cursor when possible. Requires
restart on change, default: `true`
Show signature help's floating window above cursor when possible.
Requires restart on change, default: `true`
"signature.hideOnTextChange":~
Hide signature help's floating window when text changed. Requires restart
on change, default: `false`
Hide signature help's floating window when text changed. Requires
restart on change, default: `false`
*coc-config-refactor*
"refactor.saveToFile":~
@ -561,7 +573,8 @@ Built-in configurations:~
*coc-config-hover*
"hover.target":~
Target to show hover information, default is floating window when possible.
Target to show hover information, default is floating window when
possible.
Valid options: ["preview", "echo", "float"]
@ -682,7 +695,8 @@ Built-in configurations:~
"list.signOffset":~
Sign offset of list, should be different from other plugins, default: `900`
Sign offset of list, should be different from other plugins, default:
`900`
"list.selectedSignText":~
@ -706,6 +720,17 @@ Built-in configurations:~
Highlight group used for highlighting the range in preview window,
default: `"Search"`
"list.previewToplineStyle":~
Topline style for list previews
default: `"offset"`
Valid options: ["offset","middle"]
"list.previewToplineOffset":~
Topline offset for list previews
default: `3`
"list.nextKeymap":~
Key for selecting next line in the insert mode, default: `"<C-j>"`
@ -716,8 +741,8 @@ Built-in configurations:~
"list.extendedSearchMode": ~
Enable extended search mode which allows multiple search patterns delimited
by spaces, default: `true`
Enable extended search mode which allows multiple search patterns
delimited by spaces, default: `true`
"list.normalMappings":~
@ -884,6 +909,19 @@ Built-in configurations:~
Will save handler timeout, default: `500`
"coc.preferences.semanticTokensHighlights"~
Enable semanticTokens highlight if language server support it.
Default: `true`
Note: this configuration is expected to change in the future.
"coc.preferences.renameFillCurrent"~
Disable to stop Refactor-Rename float/popup window from populating
with old name in the New Name field.
Default: `true`
*coc-config-cursors*
"cursors.cancelKey":~
@ -1113,7 +1151,7 @@ Language server start with module:~
is used by default.
- "execArgv": Argv passed to node on fork, normally used for
debugging, ex: `["--nolazy", "--inspect-brk=6045"]`
debugging, example: `["--nolazy", "--inspect-brk=6045"]`
- "transport": Transport kind used by server, could be 'ipc', 'stdio',
'socket' and 'pipe'. 'ipc' is used by default (recommended).
@ -1392,7 +1430,7 @@ User defined variables:~
b:coc_enabled *b:coc_enabled*
Set to `0` on buffer create if you don't want coc.nvim receive content
from buffer. Normally used with |BufAdd| autocmd, ex:
from buffer. Normally used with |BufAdd| autocmd, example:
>
" Disable file with size > 1MB
autocmd BufAdd * if getfsize(expand('<afile>')) > 1024*1024 |
@ -1403,7 +1441,7 @@ b:coc_root_patterns *b:coc_root_patterns*
Root patterns used for resolving workspaceFolder for
the current file, will be used instead of
`"coc.preferences.rootPatterns"` setting. E.g.: >
`"coc.preferences.rootPatterns"` setting. Example: >
autocmd FileType python let b:coc_root_patterns =
\ ['.git', '.env']
@ -1411,7 +1449,7 @@ b:coc_root_patterns *b:coc_root_patterns*
b:coc_suggest_disable *b:coc_suggest_disable*
Disable completion support of current buffer. E.g.: >
Disable completion support of current buffer. Example: >
" Disable completion for python
autocmd FileType python let b:coc_suggest_disable = 1
@ -1423,14 +1461,14 @@ b:coc_diagnostic_disable *b:coc_diagnostic_disable*
b:coc_suggest_blacklist *b:coc_suggest_blacklist*
List of input words for which completion should not be triggered.
E.g.: >
Example: >
" Disable completion for 'end' in lua files
autocmd FileType lua let b:coc_suggest_blacklist = ["end"]
b:coc_additional_keywords *b:coc_additional_keywords*
Addition keyword characters for generate keywords. E.g.: >
Addition keyword characters for generate keywords. Example: >
" Add keyword characters for css
autocmd FileType css let b:coc_additional_keywords = ["-"]
@ -1533,7 +1571,7 @@ g:coc_snippet_prev *g:coc_snippet_prev*
g:coc_filetype_map *g:coc_filetype_map*
Map for document filetypes so the server could handle current document
as another filetype, ex: >
as another filetype, example: >
let g:coc_filetype_map = {
\ 'html.swig': 'html',
@ -1560,7 +1598,7 @@ g:coc_selectmode_mapping *g:coc_selectmode_mapping*
g:coc_node_path *g:coc_node_path*
Path to node executable to start coc service. ex: >
Path to node executable to start coc service, example: >
let g:coc_node_path = '/usr/local/opt/node@12/bin/node'
<
@ -1572,7 +1610,7 @@ g:coc_node_args *g:coc_node_args*
Arguments passed to node when starting coc service from source code.
Useful for starting coc in debug mode, ex: >
Useful for starting coc in debug mode, example: >
>
let g:coc_node_args = ['--nolazy', '--inspect-brk=6045']
<
@ -1642,7 +1680,7 @@ g:coc_data_home *g:coc_data_home*
g:coc_sources_disable_map *g:coc_sources_disable_map*
Configure disabled sources for different filetypes.
Use `:CocList sources` for loaded complete sources. ex:
Use `:CocList sources` for loaded complete sources. Example:
>
let g:coc_sources_disable_map = { \ 'python': ['omni', 'tag'] \ }
@ -1668,7 +1706,8 @@ g:coc_prompt_win_width *g:coc_prompt_win_width*
g:coc_markdown_disabled_languages *g:coc_markdown_disabled_languages*
Filetype list that should be disabled for highlight in markdown block, ex: >
Filetype list that should be disabled for highlight in markdown block,
Example: >
let g:coc_markdown_disabled_languages = ['html']
@ -1744,7 +1783,7 @@ coc#start([{option}]) *coc#start()*
- `source` specific completion source name.
ex: >
Example: >
inoremap <silent> <C-w> <C-R>=coc#start({'source': 'word'})<CR>
<
@ -1753,7 +1792,7 @@ coc#start([{option}]) *coc#start()*
coc#config({section}, {value}) *coc#config()*
Change user configuration by Vim script, no changes would be made to
user configuration file. ex: >
user configuration file. Example: >
call coc#config('coc.preferences', {
\ 'timeout': 1000,
@ -1780,7 +1819,7 @@ coc#add_extension({name}, ...) *coc#add_extension()*
Deprecated function for install extensions not exists.
Use |g:coc_global_extensions| variable instead.
ex: >
Example: >
call coc#add_extension('coc-json', 'coc-tsserver', 'coc-rls')
<
@ -1800,7 +1839,7 @@ coc#add_command({id}, {command}, [{title}]) *coc#add_command()*
coc#refresh() *coc#refresh()*
Start or refresh completion at current cursor position, bind this to
'imap' to trigger completion, ex: >
'imap' to trigger completion, example: >
inoremap <silent><expr> <c-space> coc#refresh()
<
@ -1822,7 +1861,7 @@ coc#on_enter() *coc#on_enter()*
Notify coc.nvim that `<enter>` has been pressed.
Used for the format on type and improvement of brackets, ex: >
Used for the format on type and improvement of brackets, example: >
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
@ -1880,7 +1919,8 @@ coc#util#root_patterns() *coc#util#root_patterns()*
<
coc#util#get_config({key}) *coc#util#get_config()*
Get configuration (mostly defined in coc-settings.json) by {key}, ex: >
Get configuration (mostly defined in coc-settings.json) by {key},
example: >
:echo coc#util#get_config('coc.preferences')
@ -1926,7 +1966,7 @@ coc#float#scroll({forward}, [{amount}]) *coc#float#scroll()*
CocRequest({id}, {method}, [{params}]) *CocRequest()*
Send a request to language client of {id} with {method} and optional
{params}. ex: >
{params}. Example: >
call CocRequest('tslint', 'textDocument/tslint/allFixes',
\ {'textDocument': {'uri': 'file:///tmp'}})
@ -1942,7 +1982,7 @@ CocRequestAsync({id}, {method}, [{params}, [{callback}]])
CocNotify({id}, {method}, [{params}]) *CocNotify()*
Send notification to remote language server, ex:
Send notification to remote language server, example:
>
call CocNotify('ccls', '$ccls/reload')
<
@ -2144,6 +2184,11 @@ Acceptable {action} names for |CocAction()| and |CocActionAsync|.
Same as |CocAction('doHover')|, but includes definition contents from
definition provider when possible.
"references" [{excludeDeclaration}] *CocAction('references')*
Get references location list, declaration locations are included by
default.
"showSignatureHelp" *CocAction('showSignatureHelp')*
Echo signature help of current function, return `v:false` when
@ -2679,6 +2724,13 @@ AUTOCMD *coc-autocmds*
Triggered when a floating window is opened. The window is not
focused, use |g:coc_last_float_win| to get window id.
*CocOpenFloatPrompt*
:autocmd User CocOpenFloatPrompt {command}
Triggered when a floating prompt window is opened (triggered after
CocOpenFloat).
*CocTerminalOpen*
:autocmd User CocTerminalOpen {command}
@ -2763,7 +2815,7 @@ List related~
Tree view related~
CocTree* *CocTree*
CocTree *CocTree*
*CocTreeTitle* for title in tree view.
*CocTreeDescription* for description beside label.
@ -2772,7 +2824,7 @@ CocTree* *CocTree*
Symbol icons~
CocSymbol* *CocSymbol*
CocSymbol *CocSymbol*
Highlight groups for symbol icons, including:
@ -2941,7 +2993,7 @@ LIST COMMAND *coc-list-command*
:CocList [{...options}] [{source}] [{...args}] *:CocList*
Open coc list of {source}, Ex: >
Open coc list of {source}, example: >
:CocList --normal location
<
@ -3157,7 +3209,7 @@ Use |coc-list-mappings-custom| to override default mappings.
*coc-list-mappings-custom*
Configurations `"list.normalMappings"` and `"list.insertMappings"` are used
for customizing the list key-mappings, ex: >
for customizing the list key-mappings, example: >
"list.insertMappings": {
"<C-r>": "do:refresh",
@ -3214,7 +3266,8 @@ The mapping expression should be `command:arguments`, available commands:
'paste' - append text from system clipboard to prompt.
'eval' - append text to prompt from result of VimL expression.
'action' - execute action of list, use <tab> to find available actions.
'feedkeys' - feedkeys to list window, use `\\` in JSON to escape special characters.
'feedkeys' - feedkeys to list window, use `\\` in JSON to escape special
characters.
'normal' - execute normal command in list window.
'normal!' - execute normal command without remap.
'command' - execute command.
@ -3225,7 +3278,7 @@ The mapping expression should be `command:arguments`, available commands:
Context argument contains the following properties:
'name' - name of the list, ex: `'location'`.
'name' - name of the list, example: `'location'`.
'args' - arguments of the list.
'input' - current input of prompt.
'winid' - window id on list activated.
@ -3450,7 +3503,7 @@ STATUSLINE SUPPORT *coc-status*
Diagnostics info and other status info contributed by extensions could be
shown in statusline.
The easiest way is add `%{coc#status()}` to your 'statusline' option. Ex: >
The easiest way is add `%{coc#status()}` to your 'statusline' option. Example: >
set statusline^=%{coc#status()}
>

View file

@ -103,6 +103,7 @@ CocAction('outgoingCalls') coc.txt /*CocAction('outgoingCalls')*
CocAction('pickColor') coc.txt /*CocAction('pickColor')*
CocAction('quickfixes') coc.txt /*CocAction('quickfixes')*
CocAction('refactor') coc.txt /*CocAction('refactor')*
CocAction('references') coc.txt /*CocAction('references')*
CocAction('refreshSource') coc.txt /*CocAction('refreshSource')*
CocAction('reloadExtension') coc.txt /*CocAction('reloadExtension')*
CocAction('rename') coc.txt /*CocAction('rename')*
@ -163,6 +164,7 @@ CocMenuSel coc.txt /*CocMenuSel*
CocNotify() coc.txt /*CocNotify()*
CocNvimInit coc.txt /*CocNvimInit*
CocOpenFloat coc.txt /*CocOpenFloat*
CocOpenFloatPrompt coc.txt /*CocOpenFloatPrompt*
CocRegistNotification() coc.txt /*CocRegistNotification()*
CocRequest() coc.txt /*CocRequest()*
CocRequestAsync() coc.txt /*CocRequestAsync()*

View file

@ -1,8 +1,5 @@
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 branch 'release' of https://github.com/neoclide/coc.nvim
a9da141dbcb16e72754269a85c20e14832e81639 not-for-merge branch 'feat/typings-SemanticTokensBuilder' of https://github.com/neoclide/coc.nvim
d409bae8d243ea1f364c91fda5e623414fc4aa29 not-for-merge branch 'feat/use-ts-hi-group' of https://github.com/neoclide/coc.nvim
d8faa211837900a087e5a37654d225adee7a8cc3 not-for-merge branch 'fix/create-config-file' of https://github.com/neoclide/coc.nvim
03c4689f6c86371e570eb3fa1d5fc33726aeeb07 not-for-merge branch 'fix/filetype-detect' of https://github.com/neoclide/coc.nvim
6d541365a13ac63bd3674c4987f481301edc2620 not-for-merge branch 'fix/globpath' of https://github.com/neoclide/coc.nvim
2901abc80548b8e6aadb2cec48688e52b0aa6104 not-for-merge branch 'fix/typos-schema' of https://github.com/neoclide/coc.nvim
19a630de325ed71e153e8ca89f114b040c878b1b not-for-merge branch 'master' of https://github.com/neoclide/coc.nvim
28e7f0376bcb661afa9e3b8b352152b981f5eda3 branch 'release' of https://github.com/neoclide/coc.nvim
29c4afbc045a192ce6996b8f0d6250fd30f889d4 not-for-merge branch 'feat/lineAt' of https://github.com/neoclide/coc.nvim
788d4ee0605fef8eec02ea686f17ca47f625a891 not-for-merge branch 'feat/use-ts-hi-group' of https://github.com/neoclide/coc.nvim
77496dce6d217b442b06352920e7f31e7ef6c236 not-for-merge branch 'fix/doc-extensionUpdateCheck' of https://github.com/neoclide/coc.nvim
8f2a2dc441617f3d4943886cf45a62814dae7ca9 not-for-merge branch 'master' of https://github.com/neoclide/coc.nvim

View file

@ -5,3 +5,5 @@
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 287c743c9f227fdf0e1db452bbb8ae3c5caffc36 linux <linux@archlinux.localdomain> 1636403107 -0500 checkout: moving from release to release
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 287c743c9f227fdf0e1db452bbb8ae3c5caffc36 linux <linux@archlinux.localdomain> 1636786427 -0500 checkout: moving from release to release
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 287c743c9f227fdf0e1db452bbb8ae3c5caffc36 linux <linux@archlinux.localdomain> 1636786624 -0500 checkout: moving from release to release
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 287c743c9f227fdf0e1db452bbb8ae3c5caffc36 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 checkout: moving from release to release
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 28e7f0376bcb661afa9e3b8b352152b981f5eda3 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 merge origin/release: Fast-forward

View file

@ -1 +1,2 @@
0000000000000000000000000000000000000000 287c743c9f227fdf0e1db452bbb8ae3c5caffc36 linux <linux@archlinux.localdomain> 1632171242 -0400 branch: Created from refs/remotes/origin/release
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 28e7f0376bcb661afa9e3b8b352152b981f5eda3 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 merge origin/release: Fast-forward

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 29c4afbc045a192ce6996b8f0d6250fd30f889d4 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 fetch --progress: storing head

View file

@ -1 +1,2 @@
5c8569bb4d20903c7767644037b5e9566b844ced d409bae8d243ea1f364c91fda5e623414fc4aa29 linux <linux@archlinux.localdomain> 1636403107 -0500 fetch --progress: forced-update
d409bae8d243ea1f364c91fda5e623414fc4aa29 788d4ee0605fef8eec02ea686f17ca47f625a891 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 fetch --progress: forced-update

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 77496dce6d217b442b06352920e7f31e7ef6c236 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 fetch --progress: storing head

View file

@ -1,3 +1,4 @@
03c9add7cd867a013102dcb45fb4e75304d227d7 80012b82bca3e1491408dfe7bf0911774d1555c5 array-in-a-matrix <nova.neutrino@protonmail.com> 1634528024 -0400 fetch --progress: fast-forward
80012b82bca3e1491408dfe7bf0911774d1555c5 9f6e29b6f9661ebba10ff3df84de11d96c8a9e56 linux <linux@archlinux.localdomain> 1636403107 -0500 fetch --progress: fast-forward
9f6e29b6f9661ebba10ff3df84de11d96c8a9e56 19a630de325ed71e153e8ca89f114b040c878b1b linux <linux@archlinux.localdomain> 1636786427 -0500 fetch --progress: fast-forward
19a630de325ed71e153e8ca89f114b040c878b1b 8f2a2dc441617f3d4943886cf45a62814dae7ca9 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 fetch --progress: fast-forward

View file

@ -0,0 +1 @@
287c743c9f227fdf0e1db452bbb8ae3c5caffc36 28e7f0376bcb661afa9e3b8b352152b981f5eda3 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 fetch --progress: fast-forward

View file

@ -1 +1 @@
287c743c9f227fdf0e1db452bbb8ae3c5caffc36
28e7f0376bcb661afa9e3b8b352152b981f5eda3

View file

@ -0,0 +1 @@
29c4afbc045a192ce6996b8f0d6250fd30f889d4

View file

@ -1 +1 @@
d409bae8d243ea1f364c91fda5e623414fc4aa29
788d4ee0605fef8eec02ea686f17ca47f625a891

View file

@ -0,0 +1 @@
77496dce6d217b442b06352920e7f31e7ef6c236

View file

@ -1 +1 @@
19a630de325ed71e153e8ca89f114b040c878b1b
8f2a2dc441617f3d4943886cf45a62814dae7ca9

View file

@ -0,0 +1 @@
28e7f0376bcb661afa9e3b8b352152b981f5eda3

View file

@ -5,3 +5,4 @@
97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 linux <linux@archlinux.localdomain> 1636403107 -0500 checkout: moving from master to master
97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 linux <linux@archlinux.localdomain> 1636786427 -0500 checkout: moving from master to master
97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 linux <linux@archlinux.localdomain> 1636786624 -0500 checkout: moving from master to master
97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 checkout: moving from master to master

View file

@ -66,7 +66,7 @@ For a better look, those sections can be colored differently, depending on vario
* Tiny core written with extensibility in mind ([open/closed principle][8]).
* Integrates with a variety of plugins, including: [vim-bufferline][6],
[fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16],
[fugitive][4], [flog][62], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16],
[undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29],
[vim-signify][30], [quickfixsigns][39], [syntastic][5], [eclim][34],
[lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37],
@ -169,6 +169,9 @@ vim-airline integrates with a variety of plugins out of the box. These extensio
#### [vimagit][50]
![vim-airline-vimagit-demo](https://cloud.githubusercontent.com/assets/533068/22107273/2ea85ba0-de4d-11e6-9fa8-331103b88df4.gif)
#### [flog][62]
![vim-flog-airline-demo](https://user-images.githubusercontent.com/5008897/120819897-4e820280-c554-11eb-963e-6c08a1bbae09.png)
#### [virtualenv][31]
![image](https://f.cloud.github.com/assets/390964/1022566/cf81f830-0d98-11e3-904f-cf4fe3ce201e.png)
@ -365,3 +368,4 @@ If you are interested in becoming a maintainer (we always welcome more maintaine
[59]: https://github.com/neoclide/coc-git
[60]: https://github.com/cdelledonne/vim-cmake
[61]: http://github.com/lambdalisue/battery.vim/
[62]: http://github.com/rbong/vim-flog/

View file

@ -142,9 +142,10 @@ endfunction
" Update the statusline
function! airline#update_statusline()
if airline#util#stl_disabled(winnr())
if airline#util#stl_disabled(winnr()) || airline#util#is_popup_window(winnr())
return
endif
" TODO: need to ignore popup windows here as well?
let range = filter(range(1, winnr('$')), 'v:val != winnr()')
" create inactive statusline
call airline#update_statusline_inactive(range)

View file

@ -198,20 +198,22 @@ function! s:section_is_empty(self, content)
if get(w:, 'airline_skip_empty_sections', -1) == 0
return 0
endif
" assume accents sections to be never empty
" (avoides, that on startup the mode message becomes empty)
if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1
return 0
endif
if empty(a:content)
return 1
endif
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start)
if empty(list)
return 0 " no function in statusline text
let stripped = substitute(a:content,
\ '\(%{.*}\|%#__accent_[^#]*#\|%#__restore__#\|%( \| %)\)', '', 'g')
if !empty(stripped)
return 0 " There is content in the statusline
endif
while len(list) > 0
let expr = list[0]
let exprlist = []
call substitute(a:content, '%{\([^}]*\)}', '\=add(exprlist, submatch(1))', 'g')
for expr in exprlist
try
" catch all exceptions, just in case
if !empty(eval(expr))
@ -220,9 +222,7 @@ function! s:section_is_empty(self, content)
catch
return 0
endtry
let start += 1
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start)
endw
endfor
return 1
endfunction

View file

@ -26,6 +26,7 @@ let s:filetype_overrides = {
\ 'coc-explorer': [ 'CoC Explorer', '' ],
\ 'defx': ['defx', '%{b:defx.paths[0]}'],
\ 'fugitive': ['fugitive', '%{airline#util#wrap(airline#extensions#branch#get_head(),80)}'],
\ 'floggraph': [ 'Flog', '%{get(b:, "flog_status_summary", "")}' ],
\ 'gundo': [ 'Gundo', '' ],
\ 'help': [ 'Help', '%f' ],
\ 'minibufexpl': [ 'MiniBufExplorer', '' ],
@ -471,6 +472,11 @@ function! airline#extensions#load()
call add(s:loaded_ext, 'battery')
endif
if (get(g:, 'airline#extensions#vim9lsp#enabled', 1) && exists('*lsp#errorCount'))
call airline#extensions#vim9lsp#init(s:ext)
call add(s:loaded_ext, 'vim9lsp')
endif
if !get(g:, 'airline#extensions#disable_rtp_load', 0)
" load all other extensions, which are not part of the default distribution.
" (autoload/airline/extensions/*.vim outside of our s:script_path).

View file

@ -3,7 +3,7 @@
" vim: et ts=2 sts=2 sw=2
scriptencoding utf-8
if !get(g:, 'fern_loaded', 0)
if !get(g:, 'loaded_fern', 0)
finish
endif

View file

@ -26,7 +26,10 @@ function! airline#extensions#nvimlsp#get(type) abort
let symbol = is_err ? error_symbol : warning_symbol
if luaeval("pcall(require, 'vim.lsp.diagnostic')")
if luaeval("pcall(require, 'vim.diagnostic')")
let severity = a:type == 'Warning' ? 'Warn' : a:type
let num = len(v:lua.vim.diagnostic.get(0, { 'severity': severity }))
elseif luaeval("pcall(require, 'vim.lsp.diagnostic')")
let num = v:lua.vim.lsp.diagnostic.get_count(0, a:type)
else
let num = v:lua.vim.lsp.util.buf_diagnostics_count(a:type)

View file

@ -220,7 +220,11 @@ function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, mo
if a:clicks == 1 && a:modifiers !~# '[^ ]'
if a:button is# 'l'
" left button - switch to buffer
silent execute 'buffer' a:minwid
try
silent execute 'buffer' a:minwid
catch
call airline#util#warning("Cannot switch buffer, current buffer is modified! See :h 'hidden'")
endtry
elseif a:button is# 'm'
" middle button - delete buffer

View file

@ -10,15 +10,15 @@ endif
function! airline#extensions#taglist#currenttag()
" Update tag list if taglist is not loaded (else we get an empty tag name)
" Load yegappan/taglist and vim-scripts/taglist.vim only once.
let tlist_updated = v:false
if !exists('*Tlist_Get_Filenames()')
if !exists('*taglist#Tlist_Get_Tagname_By_Line()') && !exists('*Tlist_Get_Tagname_By_Line()')
TlistUpdate
let tlist_updated = v:true
endif
if !tlist_updated
if !tlist_updated && exists('*Tlist_Get_Filenames()')
if stridx(Tlist_Get_Filenames(), expand('%:p')) < 0
TlistUpdate
let tlist_updated = v:true
endif
endif
" Is this function is not present it'means you use the old vertsion of

View file

@ -0,0 +1,27 @@
" MIT License. Copyright (c) 2021 DEMAREST Maxime (maxime@indelog.fr)
" Plugin: https://github.com/yegappan/lsp
" vim: et ts=2 sts=2 sw=2
scriptencoding utf-8
if !exists('*lsp#errorCount')
finish
endif
let s:error_symbol = get(g:, 'airline#extensions#vim9lsp#error_symbol', 'E:')
let s:warning_symbol = get(g:, 'airline#extensions#vim9lsp#warning_symbol', 'W:')
function! airline#extensions#vim9lsp#get_warnings() abort
let res = get(lsp#errorCount(), 'Warn', 0)
return res > 0 ? s:warning_symbol . res : ''
endfunction
function! airline#extensions#vim9lsp#get_errors() abort
let res = get(lsp#errorCount(), 'Error', 0)
return res > 0 ? s:error_symbol . res : ''
endfunction
function! airline#extensions#vim9lsp#init(ext) abort
call airline#parts#define_function('vim9lsp_warning_count', 'airline#extensions#vim9lsp#get_warnings')
call airline#parts#define_function('vim9lsp_error_count', 'airline#extensions#vim9lsp#get_errors')
endfunction

View file

@ -11,7 +11,7 @@ function! airline#extensions#virtualenv#init(ext)
endfunction
function! airline#extensions#virtualenv#apply(...)
if &filetype =~# "python"
if match(get(g:, 'airline#extensions#virtualenv#ft', ['python']), &filetype) > -1
if get(g:, 'virtualenv_loaded', 0)
let statusline = virtualenv#statusline()
else
@ -25,7 +25,7 @@ function! airline#extensions#virtualenv#apply(...)
endfunction
function! airline#extensions#virtualenv#update()
if &filetype =~# "python"
if match(get(g:, 'airline#extensions#virtualenv#ft', ['python']), &filetype) > -1
call airline#extensions#virtualenv#apply()
call airline#update_statusline()
endif

View file

@ -191,6 +191,7 @@ function! airline#init#bootstrap()
\ 'neomake_warning_count', 'ale_error_count', 'ale_warning_count',
\ 'lsp_error_count', 'lsp_warning_count', 'scrollbar',
\ 'nvimlsp_error_count', 'nvimlsp_warning_count',
\ 'vim9lsp_warning_count', 'vim9lsp_error_count',
\ 'languageclient_error_count', 'languageclient_warning_count',
\ 'coc_warning_count', 'coc_error_count', 'vista', 'battery'])
@ -242,9 +243,9 @@ function! airline#init#sections()
endif
endif
if !exists('g:airline_section_error')
let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic-err', 'eclim', 'neomake_error_count', 'ale_error_count', 'lsp_error_count', 'nvimlsp_error_count', 'languageclient_error_count', 'coc_error_count'])
let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic-err', 'eclim', 'neomake_error_count', 'ale_error_count', 'lsp_error_count', 'nvimlsp_error_count', 'languageclient_error_count', 'coc_error_count', 'vim9lsp_error_count'])
endif
if !exists('g:airline_section_warning')
let g:airline_section_warning = airline#section#create(['ycm_warning_count', 'syntastic-warn', 'neomake_warning_count', 'ale_warning_count', 'lsp_warning_count', 'nvimlsp_warning_count', 'languageclient_warning_count', 'whitespace', 'coc_warning_count'])
let g:airline_section_warning = airline#section#create(['ycm_warning_count', 'syntastic-warn', 'neomake_warning_count', 'ale_warning_count', 'lsp_warning_count', 'nvimlsp_warning_count', 'languageclient_warning_count', 'whitespace', 'coc_warning_count', 'vim9lsp_warning_count'])
endif
endfunction

View file

@ -204,6 +204,15 @@ function! airline#util#ignore_next_focusgain()
endif
endfunction
function! airline#util#is_popup_window(winnr)
" Keep the statusline active if it's a popup window
if exists('*win_gettype')
return win_gettype(a:winnr) ==# 'popup' || win_gettype(a:winnr) ==# 'autocmd'
else
return getwinvar(a:winnr, '&buftype', '') ==# 'popup'
endif
endfunction
function! airline#util#try_focusgained()
" Ignore lasts for at most one second and is cleared on the first
" focusgained. We use ignore to prevent system() calls from triggering

View file

@ -231,6 +231,7 @@ values):
\ 'coc-explorer': [ 'CoC Explorer', '' ],
\ 'defx': ['defx', '%{b:defx.paths[0]}'],
\ 'fugitive': ['fugitive', '%{airline#util#wrap(airline#extensions#branch#get_head(),80)}'],
\ 'floggraph': [ 'Flog', '%{get(b:, "flog_status_summary", "")}' ],
\ 'gundo': [ 'Gundo', '' ],
\ 'help': [ 'Help', '%f' ],
\ 'minibufexpl': [ 'MiniBufExplorer', '' ],
@ -606,6 +607,13 @@ characters.
let g:airline#extensions#branch#vcs_checks = ['untracked', 'dirty']
<
------------------------------------- *airline-flog*
vim-flog <https://github.com/rbong/vim-flog>
If vim-flog is installed, vim-airline will display the branch name
together with a status summary in the git log graph buffer;
either 'no changes' or the number of added/removed/modified files.
------------------------------------- *airline-bufferline*
vim-bufferline <https://github.com/bling/vim-bufferline>
@ -1460,6 +1468,18 @@ Unite <https://github.com/Shougo/unite.vim>
* enable/disable unite integration >
let g:airline#extensions#unite#enabled = 1
------------------------------------- *airline-vim9lsp*
vim9lsp <https://github.com/yegappan/lsp>
* enable/disable vim9lsp integration >
let airline#extensions#vim9lsp#enabled = 1
<
* vim9lsp error_symbol >
let airline#extensions#vim9lsp#error_symbol = 'E:'
<
* vim9lsp warning >
let airline#extensions#vim9lsp#warning_symbol = 'W:'
<
------------------------------------- *airline-vimagit*
vimagit <https://github.com/jreybert/vimagit>
@ -1518,6 +1538,10 @@ virtualenv <https://github.com/jmcantrell/vim-virtualenv>
* enable/disable virtualenv integration >
let g:airline#extensions#virtualenv#enabled = 1
<
* enable virtualenv for additional filetypes:
(default: python): >
let g:airline#extensions#virtualenv#ft = ['python', 'markdown']
<
------------------------------------- *airline-vista*
vista.vim <https://github.com/liuchengxu/vista.vim>

View file

@ -35,6 +35,7 @@ airline-eclim airline.txt /*airline-eclim*
airline-extensions airline.txt /*airline-extensions*
airline-features airline.txt /*airline-features*
airline-fern airline.txt /*airline-fern*
airline-flog airline.txt /*airline-flog*
airline-fugitiveline airline.txt /*airline-fugitiveline*
airline-funcrefs airline.txt /*airline-funcrefs*
airline-fzf airline.txt /*airline-fzf*
@ -81,6 +82,7 @@ airline-troubleshooting airline.txt /*airline-troubleshooting*
airline-undotree airline.txt /*airline-undotree*
airline-unicode airline.txt /*airline-unicode*
airline-unite airline.txt /*airline-unite*
airline-vim9lsp airline.txt /*airline-vim9lsp*
airline-vimagit airline.txt /*airline-vimagit*
airline-vimcmake airline.txt /*airline-vimcmake*
airline-vimtex airline.txt /*airline-vimtex*

View file

@ -1,5 +1,7 @@
4b96f58902a34abda87fd3105e9d47a08801a891 branch 'master' of https://github.com/vim-airline/vim-airline
dd42c521ca88ad1d1d1099d014c6d0b1d88a8028 branch 'master' of https://github.com/vim-airline/vim-airline
a4d69d53b5c81715ac597db881ec7deae6b0a71a not-for-merge branch '535' of https://github.com/vim-airline/vim-airline
f7835562a33ca57fe7dc3320af3167ca4e255b9d not-for-merge branch '639-spike' of https://github.com/vim-airline/vim-airline
0f78ad819a038b59631d547c241d010bc34bb42e not-for-merge branch 'dynamic_width' of https://github.com/vim-airline/vim-airline
c26cfba4252b54348d3dcf453e34bea044efe07b not-for-merge branch 'fix-airline.vim-test' of https://github.com/vim-airline/vim-airline
2960ae7131d1a3abec3ecb07aa4344e251585c95 not-for-merge branch 'replace-testing-framework' of https://github.com/vim-airline/vim-airline
a6886f2997c4f83b268ccf4796bdaad8372788b4 not-for-merge branch 'vim9script' of https://github.com/vim-airline/vim-airline

View file

@ -8,3 +8,5 @@
17f7dff748c188eb511ff831c4ea1803418f2b42 17f7dff748c188eb511ff831c4ea1803418f2b42 linux <linux@archlinux.localdomain> 1636786427 -0500 checkout: moving from master to master
17f7dff748c188eb511ff831c4ea1803418f2b42 4b96f58902a34abda87fd3105e9d47a08801a891 linux <linux@archlinux.localdomain> 1636786427 -0500 merge origin/master: Fast-forward
4b96f58902a34abda87fd3105e9d47a08801a891 4b96f58902a34abda87fd3105e9d47a08801a891 linux <linux@archlinux.localdomain> 1636786624 -0500 checkout: moving from master to master
4b96f58902a34abda87fd3105e9d47a08801a891 4b96f58902a34abda87fd3105e9d47a08801a891 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690679 -0500 checkout: moving from master to master
4b96f58902a34abda87fd3105e9d47a08801a891 dd42c521ca88ad1d1d1099d014c6d0b1d88a8028 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690679 -0500 merge origin/master: Fast-forward

View file

@ -2,3 +2,4 @@
2e29ab965625d1315f0ad070c928794baea3d66f 26f922753a288df639b8d05d13ed62b9b04a26bc array-in-a-matrix <nova.neutrino@protonmail.com> 1634528025 -0400 merge origin/master: Fast-forward
26f922753a288df639b8d05d13ed62b9b04a26bc 17f7dff748c188eb511ff831c4ea1803418f2b42 linux <linux@archlinux.localdomain> 1636403108 -0500 merge origin/master: Fast-forward
17f7dff748c188eb511ff831c4ea1803418f2b42 4b96f58902a34abda87fd3105e9d47a08801a891 linux <linux@archlinux.localdomain> 1636786427 -0500 merge origin/master: Fast-forward
4b96f58902a34abda87fd3105e9d47a08801a891 dd42c521ca88ad1d1d1099d014c6d0b1d88a8028 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690679 -0500 merge origin/master: Fast-forward

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 c26cfba4252b54348d3dcf453e34bea044efe07b array-in-a-matrix <nova.neutrino@protonmail.com> 1641690677 -0500 fetch --progress: storing head

View file

@ -1,3 +1,4 @@
2e29ab965625d1315f0ad070c928794baea3d66f 26f922753a288df639b8d05d13ed62b9b04a26bc array-in-a-matrix <nova.neutrino@protonmail.com> 1634528024 -0400 fetch --progress: fast-forward
26f922753a288df639b8d05d13ed62b9b04a26bc 17f7dff748c188eb511ff831c4ea1803418f2b42 linux <linux@archlinux.localdomain> 1636403107 -0500 fetch --progress: fast-forward
17f7dff748c188eb511ff831c4ea1803418f2b42 4b96f58902a34abda87fd3105e9d47a08801a891 linux <linux@archlinux.localdomain> 1636786427 -0500 fetch --progress: fast-forward
4b96f58902a34abda87fd3105e9d47a08801a891 dd42c521ca88ad1d1d1099d014c6d0b1d88a8028 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690677 -0500 fetch --progress: fast-forward

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 2960ae7131d1a3abec3ecb07aa4344e251585c95 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690677 -0500 fetch --progress: storing head

View file

@ -1 +1 @@
4b96f58902a34abda87fd3105e9d47a08801a891
dd42c521ca88ad1d1d1099d014c6d0b1d88a8028

View file

@ -0,0 +1 @@
c26cfba4252b54348d3dcf453e34bea044efe07b

View file

@ -1 +1 @@
4b96f58902a34abda87fd3105e9d47a08801a891
dd42c521ca88ad1d1d1099d014c6d0b1d88a8028

View file

@ -0,0 +1 @@
2960ae7131d1a3abec3ecb07aa4344e251585c95

View file

@ -69,14 +69,14 @@ describe 'airline'
it 'should collapse the inactive split if the variable is set true'
let g:airline_inactive_collapse = 1
wincmd s
Expect getwinvar(2, '&statusline') !~ 'airline#parts#mode'
Expect airline#statusline(2) !~ 'airline#parts#mode'
wincmd c
end
it 'should not collapse the inactive split if the variable is set false'
let g:airline_inactive_collapse = 0
wincmd s
Expect getwinvar(2, '&statusline') != 'airline#parts#mode'
Expect airline#statusline(2) =~ 'airline#parts#mode'
wincmd c
end

View file

@ -3,3 +3,4 @@ c72ba0d18946f29aab9c95eb6975d321c68b3681 c72ba0d18946f29aab9c95eb6975d321c68b368
c72ba0d18946f29aab9c95eb6975d321c68b3681 c72ba0d18946f29aab9c95eb6975d321c68b3681 linux <linux@archlinux.localdomain> 1636403107 -0500 checkout: moving from master to master
c72ba0d18946f29aab9c95eb6975d321c68b3681 c72ba0d18946f29aab9c95eb6975d321c68b3681 linux <linux@archlinux.localdomain> 1636786427 -0500 checkout: moving from master to master
c72ba0d18946f29aab9c95eb6975d321c68b3681 c72ba0d18946f29aab9c95eb6975d321c68b3681 linux <linux@archlinux.localdomain> 1636786624 -0500 checkout: moving from master to master
c72ba0d18946f29aab9c95eb6975d321c68b3681 c72ba0d18946f29aab9c95eb6975d321c68b3681 array-in-a-matrix <nova.neutrino@protonmail.com> 1641690678 -0500 checkout: moving from master to master