fix: extensions not working without deepcopy (#223)
This commit is contained in:
parent
82826ef661
commit
11280b44f2
|
@ -4,9 +4,9 @@ local nerdtree = require('lualine.extensions.nerdtree')
|
|||
|
||||
local M = {}
|
||||
|
||||
M.sections = nerdtree.sections
|
||||
M.sections = vim.deepcopy(nerdtree.sections)
|
||||
|
||||
M.inactive_sections = nerdtree.inactive_sections
|
||||
M.inactive_sections = vim.deepcopy(nerdtree.inactive_sections)
|
||||
|
||||
M.filetypes = {'CHADTree'}
|
||||
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
-- MIT license, see LICENSE for more details.
|
||||
local M = {}
|
||||
|
||||
M.sections = {lualine_a = {'FugitiveHead'}, lualine_z = {'location'}}
|
||||
local function fugitive_branch()
|
||||
local icon = '' -- e0a0
|
||||
return icon .. ' ' .. vim.fn.FugitiveHead()
|
||||
end
|
||||
|
||||
M.inactive_sections = M.sections
|
||||
M.sections = {lualine_a = {fugitive_branch}, lualine_z = {'location'}}
|
||||
|
||||
M.inactive_sections = vim.deepcopy(M.sections)
|
||||
|
||||
M.filetypes = {'fugitive'}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ local M = {}
|
|||
|
||||
M.sections = {lualine_a = {fzf_statusline}}
|
||||
|
||||
M.inactive_sections = M.sections
|
||||
M.inactive_sections = vim.deepcopy(M.sections)
|
||||
|
||||
M.filetypes = {'fzf'}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ local M = {}
|
|||
|
||||
M.sections = {lualine_a = {get_short_cwd}}
|
||||
|
||||
M.inactive_sections = M.sections
|
||||
M.inactive_sections = vim.deepcopy(M.sections)
|
||||
|
||||
M.filetypes = {'nerdtree'}
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ local nerdtree = require('lualine.extensions.nerdtree')
|
|||
|
||||
local M = {}
|
||||
|
||||
M.sections = nerdtree.sections
|
||||
M.sections = vim.deepcopy(nerdtree.inactive_sections)
|
||||
|
||||
M.inactive_sections = nerdtree.inactive_sections
|
||||
M.inactive_sections = vim.deepcopy(nerdtree.inactive_sections)
|
||||
|
||||
M.filetypes = {'NvimTree'}
|
||||
|
||||
|
|
Loading…
Reference in New Issue