@@ -28,6 +28,13 @@ type Client struct {
28 registrations *csync.Slice[protocol.FileSystemWatcher]
28 registrations *csync.Slice[protocol.FileSystemWatcher]
32+ // Ensure the watcher is initialized with a reasonable file limit
33+ if _, err := Ulimit(); err != nil {
34+ slog.Error("Error setting file limit", "error", err)
31// New creates a new workspace watcher for the given client.
38// New creates a new workspace watcher for the given client.
32func New(name string, client *lsp.Client) *Client {
39func New(name string, client *lsp.Client) *Client {
33 return &Client{
40 return &Client{