feat: added extension for trouble (#932)
* added extension for trouble * add trouble extension to readme
This commit is contained in:
parent
3256691f8e
commit
7600962455
|
@ -899,6 +899,7 @@ extensions = {'quickfix'}
|
|||
- quickfix
|
||||
- symbols-outline
|
||||
- toggleterm
|
||||
- trouble
|
||||
|
||||
#### Custom extensions
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
local M = {}
|
||||
|
||||
local function get_trouble_mode()
|
||||
local opts = require('trouble.config').options
|
||||
|
||||
local words = vim.split(opts.mode, '[%W]')
|
||||
for i, word in ipairs(words) do
|
||||
words[i] = word:sub(1, 1):upper() .. word:sub(2)
|
||||
end
|
||||
|
||||
return table.concat(words, ' ')
|
||||
end
|
||||
|
||||
M.sections = {
|
||||
lualine_a = {
|
||||
get_trouble_mode,
|
||||
},
|
||||
}
|
||||
|
||||
M.filetypes = { 'Trouble' }
|
||||
|
||||
return M
|
Loading…
Reference in New Issue