mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
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'`
This commit is contained in:
parent
15bfdf73ea
commit
237d2aef4d
@ -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('/', '.')
|
||||
|
Loading…
Reference in New Issue
Block a user