Skip to content

Commit

Permalink
fix(pkg): added support for detecting modules with `pcall(require, ".…
Browse files Browse the repository at this point in the history
…..")`
  • Loading branch information
folke committed Jun 5, 2024
1 parent 1f54b6e commit be8332e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazydev/pkg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local M = {}

M.PAT_MODULE_BASE = "%-%-%-%s*@module%s*[\"']([%w%.%-_/]+)"
M.PAT_REQUIRE_BASE = "require%s*%(?%s*['\"]([%w%.%-_/]+)"
M.PAT_REQUIRE_BASE = "require%s*,?%s*%(?%s*['\"]([%w%.%-_/]+)"
M.PAT_MODULE_BEFORE = M.PAT_MODULE_BASE .. "$"
M.PAT_REQUIRE_BEFORE = M.PAT_REQUIRE_BASE .. "$"
M.PAT_MODULE = M.PAT_MODULE_BASE .. "[\"']"
Expand Down

0 comments on commit be8332e

Please sign in to comment.