diff --git a/README.md b/README.md index 6787b3e..5e19258 100644 --- a/README.md +++ b/README.md @@ -387,11 +387,12 @@ extensions = { 'fzf' }
Available extensions +* chadtree * fugitive * fzf * nerdtree -* chadtree * nvim-tree +* quickfix
diff --git a/doc/lualine.txt b/doc/lualine.txt index 7f5ed78..8bc4be2 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -506,11 +506,12 @@ using a plugin which is supported you can load it this way: < Available extensions + * chadtree * fugitive * fzf * nerdtree - * chadtree * nvim-tree + * quickfix -------------------------------------------------------------------------------- CONGIG EXAMPLES *lualine_config_examples* diff --git a/lua/lualine/extensions/quickfix.lua b/lua/lualine/extensions/quickfix.lua new file mode 100644 index 0000000..c9af169 --- /dev/null +++ b/lua/lualine/extensions/quickfix.lua @@ -0,0 +1,19 @@ +-- Copyright (c) 2020-2021 hoob3rt +-- MIT license, see LICENSE for more details. +local function quickfix() return 'Quickfix List' end + +local function quickfix_title() return vim.fn.getqflist({title = 0}).title end + +local M = {} + +M.sections = { + lualine_a = {quickfix}, + lualine_b = {quickfix_title}, + lualine_z = {'location'} +} + +M.inactive_sections = vim.deepcopy(M.sections) + +M.filetypes = {'qf'} + +return M