0.0.17 • Published 2 months ago
coc-lightbulb v0.0.17
coc-lightbulb
Code action 💡 for coc.nvim
Show a lightbulb if there are available codeActions for current cursor position
Install
:CocInstall coc-lightbulb
Configuration
name | default | description |
---|---|---|
lightbulb.only | [] | Array of codeActionKind used for filtering |
lightbulb.excludeFiletypes | [] | Disable lightbulb in these filetyps |
lightbulb.enableVirtualText | true | Whether to show virtual text(neovim only) |
lightbulb.virtualTextPosition | auto | Virtual text position |
lightbulb.virtualTextPriority | 50 | Priority of virtual text |
lightbulb.enableSign | false | Whether to show sign |
lightbulb.signPriority | 20 | Priority of sign |
lightbulb.followDiagnostic | true | Don't show lightbulb when b:coc_diagnostic_disable equal to 1 |
{
"lightbulb.text": {
// nerd-font: nf-mdi-lightbulb, text used when there're code actions
"default": "",
// nerd-font: nf-mdi-auto_fix, text used when there're code actions and quickfix exists
"quickfix": ""
}
}
Usage
The variable
b:coc_lightbulb_status
will always be set and you can use it for the statuslineHow to disable lightbulb for current buffer ?
let b:coc_lightbulb_disable = 1
- highlights
by default
" virtual text
hi default LightBulbDefaultVirtualText guifg=#FDD164
hi default link LightBulbQuickFixVirtualText LightBulbDefaultVirtualText
" sign
hi default LightBulbDefaultSign guifg=#FDD164
hi default link LightBulbQuickFixSign LightBulbDefaultSign
" for numhl, you can set LightBulbDefaultSignLine, LightBulbQuickFixSignLine
License
MIT
This extension is built with create-coc-extension