Commit 2a71933
committed
feat(loader): handle hyphens in file names when deactivating
## Description
When deactivating plugins `vim.g.loaded_` variables are cleared based on
a common pattern plugins use to use avoid multiple initializing. The
current logic handles most cases, except when a lua file has a hyphen in
which case it is unlikely to clear the correct variable. For example:
- [nvim-treesitter.lua](https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/nvim-treesitter.lua)
- variable used: `vim.g.loaded_nvim_treesitter`
- current logic clears: `vim.g.loaded_nvim-treesitter`1 parent e6a8824 commit 2a71933
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
0 commit comments