From 7ca0de0a0a69ba8ea7cd49ea30c6227e69d9a410 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Fri, 27 May 2022 12:58:47 +0200 Subject: vim: update lightbulb config --- .vim/lua/plugins.lua | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 2a262f3..dbd94f4 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -354,39 +354,16 @@ return require('packer').startup({function() use {'kosayoda/nvim-lightbulb', -- {{{ -- branch = 'virtual-text-column', config = function() - _G.lightbulb_config = { - sign = { - enabled = false, - priority = 10, - }, - float = { - enabled = false, - text = '󰌵', - win_opts = {}, - }, - virtual_text = { - enabled = false, - text = '← 󰌵', - text_pos = 'eol', - column = -1, - }, - -- status text only works on master - status_text = { - enabled = true, - text = '󰌵', - test_unavailable = '', - } + require('nvim-lightbulb').setup { + ignore = {'null-ls'}, + sign = { enabled = false }, + virtual_text = { enabled = false, text = '← 󰌵' }, + status_text = { enabled = true, text = '󰌵', text_unavailable = '' } } - - -- vim.fn.sign_define({{name='LightBulbSign', text='󰌵', texthl='LightBulbVirtualText'}}) - - local group = vim.api.nvim_create_augroup('LightBulbUpdate', { clear = true }) - vim.api.nvim_create_autocmd('CursorHold', { - pattern = '*', - callback = function() - require('nvim-lightbulb').update_lightbulb(_G.lightbulb_config) - end, - group = group, + vim.fn.sign_define({{name='LightBulbSign', text='󰌵', texthl='LightBulbSign'}}) + vim.api.nvim_create_autocmd({'CursorHold', 'CursorHoldI'}, { + callback = require('nvim-lightbulb').update_lightbulb, + group = vim.api.nvim_create_augroup('LightBulbUpdate', {}), }) end} -- }}} -- cgit 1.4.1