Memory leak when opening files due to `max_width = 0.3` change
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 2.6k
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I encountered a memory leak related to the recent change in commit [`5e0804e`](https://github.com/j-hui/fidget.nvim/commit/5e0804e7fb9511d046e52146f47f571278eabc33), where `max_width` was updated to `0.3`.
## Steps to reproduce
1. In a typescript project using the `vtsls` LSP, create a file named `required-permissions.decorator.ts`.
2. Open the file.
3. Observe excessive memory consumption, eventually leading to a memory leak.
## Workaround
Manually setting `max_width = 0` in the config prevents the issue:
```lua
{
"j-hui/fidget.nvim",
opts = {
notification = {
window = {
max_width = 0, -- `0` means no maximum width.
},
},
},
},
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing commit 5e0804e and the notification window handling for max_width. Reproduce the leak in a TypeScript project with vtsls by opening required-permissions.decorator.ts, then compare behavior with max_width set to 0. Done means the default setting no longer causes excessive memory consumption while opening the file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100