From d78ed25f1faa7e449303590c795692e27b93d3f5 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 10 Sep 2025 16:04:42 -0300 Subject: [PATCH] fix: add back init setting ulimit this was removed in a merge conflict in #1011 Signed-off-by: Carlos Alexandro Becker --- internal/lsp/watcher/watcher.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/lsp/watcher/watcher.go b/internal/lsp/watcher/watcher.go index 18b790349a10f0827f45f8ccb9fb6968980a9d4e..139d144e1e5c65c11962e73201b42b15cd09f98a 100644 --- a/internal/lsp/watcher/watcher.go +++ b/internal/lsp/watcher/watcher.go @@ -28,6 +28,13 @@ type Client struct { registrations *csync.Slice[protocol.FileSystemWatcher] } +func init() { + // Ensure the watcher is initialized with a reasonable file limit + if _, err := Ulimit(); err != nil { + slog.Error("Error setting file limit", "error", err) + } +} + // New creates a new workspace watcher for the given client. func New(name string, client *lsp.Client) *Client { return &Client{