neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 237d2aef4d706a787e940670072839f82da41046
parent 15bfdf73ea17e513edcec63be9ba27a5f4f12c7a
Author: monkoose <pythonproof@gmail.com>
Date:   Wed, 11 Sep 2024 07:55:37 +0300

fix(health): return correct name from 'path2name()'

`path2name()` function doesn't process `'pluginname/health/init.lua'` correctly. Instead of retruning `'pluginname'` it returns `'pluginname.health'`
Diffstat:
Mruntime/lua/vim/health.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua @@ -285,8 +285,8 @@ local path2name = function(path) -- Remove everything up to the last /lua/ folder path = path:gsub('^.*/lua/', '') - -- Remove the filename (health.lua) - path = vim.fs.dirname(path) + -- Remove the filename (health.lua) or (health/init.lua) + path = vim.fs.dirname(path:gsub('/init%.lua$', '')) -- Change slashes to dots path = path:gsub('/', '.')