148 | Example lightline configuration:
149 |
150 | let g:lightline = {
151 | \ 'active': {
152 | \ 'left': [
153 | \ [ 'mode', 'paste' ],
154 | \ [ 'readonly', 'filename', 'modified' ],
155 | \ [ 'luapad_msg']
156 | \ ],
157 | \ 'right': [
158 | \ ['luapad_status'],
159 | \ ['lineinfo'],
160 | \ ['percent'],
161 | \ ],
162 | \ },
163 | \ 'component_function': {
164 | \ 'luapad_msg': 'luapad#lightline_msg',
165 | \ 'luapad_status': 'luapad#lightline_status',
166 | \ },
167 | \ }
168 |
169 |
170 |
177 | Example galaxyline configuration:
178 |
179 | local function luapad_color()
180 | if require('luapad.statusline').status() == 'ok' then
181 | return colors.green
182 | else
183 | return colors.red
184 | end
185 | end
186 |
187 |
188 |
189 | require('galaxyline').section.right[1] = {
190 | Luapad = {
191 | condition = require('luapad.state').current,
192 | highlight = { luapad_color(), colors.bg },
193 | provider = function()
194 | vim.cmd('hi GalaxyLuapad guifg=' .. luapad_color())
195 | local status = require('luapad.statusline').status()
196 | return string.upper(tostring(status))
197 | end
198 | }
199 | }
200 |
201 |
202 |