on main help sign in
fix: add back init setting ulimit
d78ed25Carlos Alexandro Becker
internal/lsp/watcher/watcher.go+7
@@ -28,6 +28,13 @@ type Client struct {
28 registrations *csync.Slice[protocol.FileSystemWatcher]
28 registrations *csync.Slice[protocol.FileSystemWatcher]
29}
29}
30
30
31+func init() {
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)
35+ }
36+}
37+
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{