From 61cd6e6ef8c398be898b30de935a2bcaa60067a1 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Mon, 25 Oct 2021 23:21:38 -0400 Subject: [PATCH] feat: add fern extension (#398) * Add fern extension Fern[^1] is general purpose tree view that can browse and manipulate file trees. This extension provides a simple and useful statusline for fern buffers. [^1]: https://github.com/lambdalisue/fern.vim * Reuse nerdtree code for fern * doc: mention fern in README Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> --- README.md | 1 + doc/lualine.txt | 1 + lua/lualine/extensions/fern.lua | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lua/lualine/extensions/fern.lua diff --git a/README.md b/README.md index 6962418..053ae8e 100644 --- a/README.md +++ b/README.md @@ -605,6 +605,7 @@ extensions = {'quickfix'} Available extensions * chadtree +* fern * fugitive * fzf * nerdtree diff --git a/doc/lualine.txt b/doc/lualine.txt index 3132616..834e951 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -604,6 +604,7 @@ Available extensions ~ - chadtree +- fern - fugitive - fzf - nerdtree diff --git a/lua/lualine/extensions/fern.lua b/lua/lualine/extensions/fern.lua new file mode 100644 index 0000000..39f5e91 --- /dev/null +++ b/lua/lualine/extensions/fern.lua @@ -0,0 +1,11 @@ +-- MIT license, see LICENSE for more details. +-- Extension for fern file explorer. +local nerdtree = require 'lualine.extensions.nerdtree' + +local M = {} + +M.sections = vim.deepcopy(nerdtree.sections) + +M.filetypes = { 'fern' } + +return M