diff --git a/README.md b/README.md index e500578..a76350a 100644 --- a/README.md +++ b/README.md @@ -312,6 +312,8 @@ extensions = { 'fzf' } * fugitive * fzf * nerdtree +* chadtree +* nvim-tree diff --git a/lua/lualine/extensions/chadtree.lua b/lua/lualine/extensions/chadtree.lua new file mode 100644 index 0000000..f210ea5 --- /dev/null +++ b/lua/lualine/extensions/chadtree.lua @@ -0,0 +1,13 @@ +-- Copyright (c) 2020-2021 hoob3rt +-- MIT license, see LICENSE for more details. +local nerdtree = require('lualine.extensions.nerdtree') + +local M = {} + +M.sections = nerdtree.sections + +M.inactive_sections = nerdtree.inactive_sections + +M.filetypes = {'CHADTree'} + +return M diff --git a/lua/lualine/extensions/nerdtree.lua b/lua/lualine/extensions/nerdtree.lua index 7a6516c..f3741af 100644 --- a/lua/lualine/extensions/nerdtree.lua +++ b/lua/lualine/extensions/nerdtree.lua @@ -1,8 +1,10 @@ -- Copyright (c) 2020-2021 hoob3rt -- MIT license, see LICENSE for more details. +local function get_short_cwd() return vim.fn.fnamemodify(vim.fn.getcwd(), ':~') end + local M = {} -M.sections = {lualine_a = {vim.fn.getcwd}} +M.sections = {lualine_a = {get_short_cwd}} M.inactive_sections = M.sections diff --git a/lua/lualine/extensions/nvim-tree.lua b/lua/lualine/extensions/nvim-tree.lua new file mode 100644 index 0000000..ae73fd5 --- /dev/null +++ b/lua/lualine/extensions/nvim-tree.lua @@ -0,0 +1,13 @@ +-- Copyright (c) 2020-2021 hoob3rt +-- MIT license, see LICENSE for more details. +local nerdtree = require('lualine.extensions.nerdtree') + +local M = {} + +M.sections = nerdtree.sections + +M.inactive_sections = nerdtree.inactive_sections + +M.filetypes = {'NvimTree'} + +return M