{"id":31658113,"url":"https://github.com/khoido2003/roslyn-filewatch.nvim","last_synced_at":"2026-04-05T09:03:22.168Z","repository":{"id":312905258,"uuid":"1049233333","full_name":"khoido2003/roslyn-filewatch.nvim","owner":"khoido2003","description":"File watcher for Roslyn LSP in Neovim (C#)","archived":false,"fork":false,"pushed_at":"2026-02-06T18:25:39.000Z","size":436,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-06T18:29:43.312Z","etag":null,"topics":["csharp","file-watcher","neovim","neovim-plugin","nvim","roslyn"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khoido2003.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-02T17:15:38.000Z","updated_at":"2026-02-06T18:06:30.000Z","dependencies_parsed_at":"2025-09-02T19:16:32.819Z","dependency_job_id":"66c36b25-b416-4847-8da6-537e4f2d76e3","html_url":"https://github.com/khoido2003/roslyn-filewatch.nvim","commit_stats":null,"previous_names":["khoido2003/roslyn-filewatch.nvim"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/khoido2003/roslyn-filewatch.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoido2003%2Froslyn-filewatch.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoido2003%2Froslyn-filewatch.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoido2003%2Froslyn-filewatch.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoido2003%2Froslyn-filewatch.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khoido2003","download_url":"https://codeload.github.com/khoido2003/roslyn-filewatch.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoido2003%2Froslyn-filewatch.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","file-watcher","neovim","neovim-plugin","nvim","roslyn"],"created_at":"2025-10-07T15:12:47.694Z","updated_at":"2026-03-15T15:22:45.488Z","avatar_url":"https://github.com/khoido2003.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"gallery/2.png\" alt=\"roslyn-status\" width=\"400\"/\u003e\n  \u003cimg src=\"gallery/1.png\" alt=\"checkhealth\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n# roslyn-filewatch.nvim\n\nA lightweight, **file-watching and project-sync plugin** for Neovim that keeps the **Roslyn LSP** up-to-date with file changes.\n\nNow with **Game Engine support**.\n\n---\n\n\u003e [!WARNING]\n\u003e **v0.4.x Breaking Changes**: This release removes all non-file-watching features (Dotnet CLI, NuGet, Explorer) to focus on performance.\n\u003e If you need these features, please pin to `v0.3.9`. See [Migration Guide](#migration-guide-v04x) (Not recommended).\n\n---\n\n## Why?\n\nRoslyn does not watch your project files by default in Neovim/Linux/Mac. Without this, you often need to `:edit!` or restart the LSP to make Roslyn notice file creation, deletion, renaming, or solution changes.\n\nThis plugin adds a robust **cross-platform file watcher**.\n\n---\n\n## Features\n\n### Robust File Watching\n- **Native Rust Acceleration**: Ships with a dynamically linked Rust backend (`roslyn_filewatch_rs`) utilizing the `ignore` crate for 1-3ms instantaneous native repository indexing.\n- **Cross-Platform**: Uses Neovim 0.10+ API natively, with fallback to Native Watchers (`watchman`, `fswatch`) or Sparse Polling.\n- **Smart Detection**: Handles create, delete, change, and **detects renames** (merging delete+create pairs).\n- **Optimization**: Batches events, throttles diagnostics, and avoids watching ignored files (ignores `.git`, `bin`, `obj`, etc.).\n- **Solution-Aware**: Parses `.sln`, `.slnx`, or `.slnf` files across isolated background OS threads (`vim.uv.new_work`) to completely eliminate UI blocking.\n- **csproj-only Support**: Fully supports projects without solution files - automatically detects and watches all `.csproj` files recursively, ensuring new files are immediately recognized by the LSP.\n\n### Performance \u0026 Smart Loading\n- **Deferred Loading**: Delays project loading until you actually open a C# file to speed up startup for large solutions.\n- **Project Warm-up**: Sends initialization notifications to get Roslyn ready without blocking the UI.\n- **Diagnostic Throttling**: Prevents UI lag by smoothing out diagnostic updates during heavy operations (like git checkout).\n\n### Game Engine Support\nFirst-class support for **C# Game Development**.  \nAutomatically detects the engine and applies optimized presets (scan intervals, ignore patterns):\n- **Unity**: Parses `.asmdef`, configures analyzers, handles meta files.\n- **Godot**: Handles `project.godot` and `.godot/`.\n- **Stride**, **MonoGame**, **FNA**: Preset configurations included.\n\n---\n\n## Requirements\n\n### Required\n\n| Dependency | Minimum Version | Purpose |\n|:---|:---|:---|\n| **Neovim** | 0.10+ | Core editor (requires `vim.fs`, `vim.uv`, modern Lua APIs) |\n| **Roslyn LSP client** | — | The C# language server this plugin integrates with |\n| **.NET SDK** | 10.0+ | Needed for `dotnet restore` (auto-restore of NuGet packages) |\n\n### Recommended (Performance)\n\nThese tools dramatically improve performance on large projects. **Without them, the plugin still works** but uses slower fallback mechanisms.\n\n| Dependency | Purpose | Impact |\n|:---|:---|:---|\n| **Rust native module** | Fastest file scanning (1-3ms for entire repos) | 10-100x faster initial scans |\n| **[fd](https://github.com/sharkdp/fd)** | Fast file finder (fallback when Rust unavailable) | 5-20x faster than pure Lua |\n| **[Watchman](https://facebook.github.io/watchman/)** | Facebook's file watching service | Best for huge monorepos (10k+ files) |\n| **[fswatch](https://github.com/emcrisostomo/fswatch)** | Cross-platform file change monitor | Good alternative to Watchman on macOS/Linux |\n\nThe plugin automatically selects the best available backend in this priority order:\n\n```\nRust native → fd/fdfind → Pure Lua (slowest)\nWatchman → fswatch → fs_event/polling\n```\n\n\u003e [!TIP]\n\u003e Run `:checkhealth roslyn_filewatch` to see which scanning tier and watcher backend are active on your system.\n\n---\n\n## Dependency Installation\n\n### Roslyn LSP Client\n\nYou need one of these Neovim Roslyn LSP integrations:\n\n- **[roslyn.nvim](https://github.com/seblyng/roslyn.nvim)** (**Highly recommended**)\n- **[nvim-lspconfig (roslyn_ls)](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#roslyn_ls)**\n\n### .NET SDK\n\nRequired for C# development and NuGet auto-restore.\n\n| Platform | Command |\n|:---|:---|\n| **Windows** | `winget install Microsoft.DotNet.SDK.10` |\n| **macOS** | `brew install dotnet-sdk` |\n| **Ubuntu/Debian** | `sudo apt install dotnet-sdk-10.0` |\n| **Fedora** | `sudo dnf install dotnet-sdk-10.0` |\n| **Arch Linux** | `sudo pacman -S dotnet-sdk` |\n\nOr download from [dotnet.microsoft.com/download](https://dotnet.microsoft.com/download).\n\n### fd (Recommended)\n\nFast file finder used as fallback when the Rust native module is unavailable.\n\n| Platform | Command |\n|:---|:---|\n| **Windows** | `winget install sharkdp.fd` or `scoop install fd` or `choco install fd` |\n| **macOS** | `brew install fd` |\n| **Ubuntu/Debian** | `sudo apt install fd-find` (binary is `fdfind`) |\n| **Fedora** | `sudo dnf install fd-find` |\n| **Arch Linux** | `sudo pacman -S fd` |\n\n### Watchman (Recommended for large repos)\n\nBest performance for monorepos with thousands of files and supported on all platforms.\n\n| Platform | Command |\n|:---|:---|\n| **Windows** | `choco install watchman` or download from [GitHub releases](https://github.com/nicoster/watchman-bin/releases) |\n| **macOS** | `brew install watchman` |\n| **Ubuntu/Debian** | [Official install guide](https://facebook.github.io/watchman/docs/install#linux) (apt from Meta's repo) |\n| **Arch Linux** | `yay -S watchman-bin` |\n\n### fswatch (Optional, macOS/Linux)\n\nAlternative to Watchman for Unix systems.\n\n| Platform | Command |\n|:---|:---|\n| **macOS** | `brew install fswatch` |\n| **Ubuntu/Debian** | `sudo apt install fswatch` |\n| **Fedora** | `sudo dnf install fswatch` |\n| **Arch Linux** | `sudo pacman -S fswatch` |\n\n### Rust Toolchain (Recommended for building from source)\n\nOnly needed if you want to compile the native Rust module yourself instead of using pre-built binaries.\n\n| Platform | Command |\n|:---|:---|\n| **All platforms** | `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \\| sh` |\n| **Windows** | Download from [rustup.rs](https://rustup.rs/) |\n\n\u003e [!NOTE]\n\u003e The build script (`build.lua`) automatically downloads pre-compiled binaries if `cargo` is not found. You only need Rust installed if you want to build from source or the prebuilt binary isn't available for your platform.\n\n---\n\n## Installation\n\n#### Native Rust Backend (Highly Recommended)\n\n\u003e [!IMPORTANT]\n\u003e For the best performance on large repositories (like Unity games or monorepos with heavy `node_modules`), the plugin ships with a **Native Rust Snapshot Module**. \n\u003e The included `build.lua` script handles installation automatically: \n\u003e 1. If you have `cargo` installed locally, it compiles from source natively.\n\u003e 2. If you don't have Rust, it automatically uses `curl` to dynamically download a pre-compiled binary matching your exact OS directly from GitHub Releases.\n\n### lazy.nvim\n```lua\n{\n  \"khoido2003/roslyn-filewatch.nvim\",\n  build = \"nvim -l build.lua --\", -- Compiles or downloads the Native Rust module fallback\n  config = function()\n    require(\"roslyn_filewatch\").setup()\n  end,\n}\n```\n\n### packer.nvim\n```lua\nuse {\n  \"khoido2003/roslyn-filewatch.nvim\",\n  run = \"nvim -l build.lua\",\n  config = function()\n    require(\"roslyn_filewatch\").setup()\n  end,\n}\n```\n\n## Rebuilding the Native Module\n\nIf you need to manually trigger a rebuild (e.g. after updating the plugin):\n\n### lazy.nvim\nThe module is built automatically on install. To rebuild manually:\n\n```lua\n:Lazy build roslyn-filewatch.nvim\n```\n\n### Or from your terminal\n```sh\ncd ~/.local/share/nvim/lazy/roslyn-filewatch.nvim\nnvim -l build.lua\n```\n\n### rocks.nvim / other plugin managers\n```sh\ncd \u003cplugin-install-path\u003e\nnvim -l build.lua\n```\n\n\u003e **Note:** Do not use `:lua dofile(...)` to trigger the build — it does not set the\n\u003e working directory correctly and may fail to locate the plugin root.\n\n### Migration Guide (v0.4.x)\n\n**Breaking Changes**: v0.4.x is a strict **File Watcher** and **Project Sync** tool. All \"IDE-like\" features (Building, Running, Nuget, Explorer) have been removed to minimize bloat and maximize performance.\n\n| Feature | v0.3.x (Deprecated) | v0.4.x (Current) | Replacement |\n| :--- | :--- | :--- | :--- |\n| **Project Watching** | Good | **Instant** (Native Rust + Threading) | - |\n| **Dotnet CLI** | `:RoslynBuild`, `:RoslynRun` | ❌ Removed | Use `dispatch.nvim` or `toggleterm` |\n| **NuGet** | `:RoslynNuget` | ❌ Removed | Use CLI or `nuget.nvim` |\n| **Explorer** | `:RoslynExplorer` | ❌ Removed | Use `neo-tree` or `nvim-tree` |\n| **Game Detection** | Complex Context | **Presets Only** (Performance) | Presets are auto-applied |\n\n**Recommendation:**\n*   **Stay on v0.4.x** if you want the fastest, newest Roslyn experience and stable releases.\n*   **Pin to v0.3.x** if you absolutely rely on the built-in CLI/Explorer commands (Not recommended):\n\n```lua\n{ \"khoido2003/roslyn-filewatch.nvim\", branch = \"v0.3.x\" }\n```\n\n---\n\n## User Manual\n\nThis section covers how to configure and use the plugin effectively in your daily workflow.\n\n### 1. Configuration\n\nThe following settings are commonly adjusted:\n\n```lua\nrequire(\"roslyn_filewatch\").setup({\n  -- === Core Settings ===\n  -- List of LSP client names to hook into (required)\n  client_names = { \"roslyn_ls\", \"roslyn\", \"roslyn_lsp\" },\n  \n  -- Project preset: \"auto\", \"unity\", \"console\", \"large\", \"none\"\n  -- \"auto\" detects Unity/Godot/Large projects and applies optimized settings\n  preset = \"auto\", \n  \n  -- Logging level: vim.log.levels.WARN, INFO, DEBUG, TRACE\n  log_level = vim.log.levels.WARN,\n\n  -- === Performance \u0026 Loading ===\n  -- Defer project loading until first C# file is opened\n  deferred_loading = true,\n  deferred_loading_delay_ms = 500,\n  \n  -- Diagnostic throttling reduces UI lag during heavy file changes\n  diagnostic_throttling = {\n    enabled = true,\n    debounce_ms = 500,  -- Wait 500ms before requesting diagnostics\n    visible_only = true, -- Only request diagnostics for visible buffers\n  },\n\n  -- === File Watching Configuration ===\n  -- Directories to completely ignore (exact case-insensitive match)\n  ignore_dirs = { \n    \"Library\", \"Temp\", \"Obj\", \"Bin\", \".git\", \".idea\", \".vs\", \n    \".godot\", \".mono\", \"node_modules\" \n  },\n  \n  -- Glob patterns to exclude (follows gitignore syntax)\n  -- Example: { \"*.generated.cs\", \"**/foo/**\" }\n  ignore_patterns = {},\n  \n  -- List of extensions to watch\n  watch_extensions = { \n    \".cs\", \".csproj\", \".sln\", \".slnx\", \".slnf\", \n    \".props\", \".targets\", \".razor\", \".cshtml\", \".xaml\" \n  },\n\n  -- Parse .sln/.slnx/.slnf to limit watch scope to project folders\n  -- Highly recommended for performance on monorepos\n  solution_aware = true, \n  \n  -- Respect standard .gitignore files\n  respect_gitignore = true,\n\n  -- === Event Processing ===\n  -- Batch multiple events into single notifications\n  batching = {\n    enabled = true,\n    interval = 300, -- Window to coalesce events (ms)\n  },\n  \n  -- Max events to process per chunk (prevent UI freeze)\n  -- Default: 1000 (Unity), 100 (others)\n  max_events_per_batch = 1000,\n  \n  -- Debounce time for processing file system events\n  processing_debounce_ms = 150,\n  \n  -- Quiet period (seconds) required after activity before triggering full scans\n  -- Helps prevents freezing during massive changes (e.g. Unity re-import)\n  activity_quiet_period = 5,\n  \n  -- Rename detection window (ms) to merge delete+create into rename\n  rename_detection_ms = 200,\n\n  -- === Advanced / Fallback ===\n  -- Polling interval (ms) for fallback watcher and resilience checks\n  poll_interval = 5000, \n  \n  -- Force non-native polling mode (not recommended unless fs_event fails)\n  force_polling = false,\n\n  -- Enable auto-restore of NuGet packages on .csproj change\n  enable_autorestore = true,\n  \n\n})\n```\n\n### 2. Common Workflows\n\n#### **Working with Unity**\n1.  Open your Unity project folder in Neovim.\n2.  The plugin detects `Assets/` and `ProjectSettings/`.\n3.  It automatically switches to the **Unity Preset**:\n    *   Ignores `Library`, `Temp`, `Logs`.\n    *   Increases debounce time (Unity likes to touch many files at once).\n    *   Adds `UNT` analyzer rules to your LSP configuration.\n4.  **Tip**: Use `:RoslynEngineInfo` to confirm Unity mode is active.\n\n### 3. Diagnostics\n\nRun `:checkhealth roslyn_filewatch` to verify your setup. The healthcheck reports:\n\n- **Neovim version** compatibility\n- **libuv** capabilities (fs_event, fs_poll)\n- **Platform** detection and OS-specific notes\n- **Rust native module** status (loaded or fallback)\n- **External tools**: fd, dotnet, watchman, fswatch\n- **Scanning tier** priority chain (which backend is active)\n- **Active Roslyn LSP clients** and their root directories\n\n---\n\n## Command Reference\n\nMost commands are **interactive**—if you run them without arguments, a selection menu will appear.\n\n### Core \n| Command | Description |\n|---------|-------------|\n| `:RoslynFilewatch status` | **Debug Tool**: Shows active watcher status, tracked projects, and health. |\n| `:RoslynFilewatch reload` | **Recovery**: Forces a full file resync and tells the LSP to reload all projects. |\n| `:checkhealth roslyn_filewatch` | Shows comprehensive environment diagnostics. |\n|---|---|\n\n##  Maintainer Guide\n\nFor developers contributing to `roslyn-filewatch.nvim`, this section details the architecture.\n\n### Architecture Overview\n\nThe plugin follows a **Unidirectional Data Flow** pattern to maintain synchronization between the File System and Roslyn with minimal latency and memory usage.\n\n```mermaid\nflowchart TD\n    FS[File System] --\u003e|Events| FS_Event[fs_event.lua]\n    FS_Event --\u003e|Burst Detection| Regen[regen_detector.lua]\n    Regen --\u003e|Filter/Debounce| Buffer[Event Buffer]\n    Buffer --\u003e|Chunked Flush| Watcher[watcher.lua]\n    Watcher --\u003e|Process Queue| Snapshot[snapshot.lua]\n    Snapshot --\u003e|Diff| Changes[Detected Changes]\n    Changes --\u003e|Heuristic| Rename[rename.lua]\n    Rename --\u003e|Batch Notify| Notify[notify.lua]\n    Notify --\u003e|LSP JSON| Roslyn[Roslyn LSP]\n```\n\n#### Scanning Tiers\n\nThe plugin uses a priority chain for file scanning, automatically selecting the fastest available:\n\n```\n┌─────────────────────────────────┐\n│ Tier 1: Rust native module      │  ← Fastest (1-3ms, filtered at native level)\n│   roslyn_filewatch_rs           │\n├─────────────────────────────────┤\n│ Tier 2: fd / fdfind             │  ← Fast (async subprocess, streams results)\n│   External process              │\n├─────────────────────────────────┤\n│ Tier 3: Pure Lua scanner        │  ← Slowest (chunked via vim.defer_fn, never blocks)\n│   uv.fs_scandir + uv.fs_stat    │\n└─────────────────────────────────┘\n```\n\nAll tiers are **fully non-blocking** — the plugin never freezes the Neovim UI during scanning.\n\n#### Core Components (V2 Architecture)\n*   **`watcher.lua`**: The orchestrator. Manages the lifecycle of event handles and the **Self-Healing Watchdog** that restarts frozen listeners. Implements **Chunked Processing** to handle thousands of events.\n*   **`fs_event.lua`**: Upgraded to use Neovim 0.10+ native API. Implements **Dynamic Debounce** and feeds events into the regeneration detector.\n*   **`regen_detector.lua`**: Detects massive file operations (like Unity Asset re-imports or `git checkout`), switching the watcher to Low-Overhead Mode to prevent GC pressure.\n*   **`snapshot.lua`** \u0026 **`roslyn_filewatch_rs`**: The source of truth. Uses a heavily optimized pure-Rust backend to pull full repository snapshots natively in 1-3 milliseconds, completely bypassing Lua loop bottlenecks.\n*   **`sln_parser.lua`**: Uses isolated background libuv OS threads (`vim.uv.new_work`) to parse massive XML solution files completely off the main UI thread.\n*   **`fs_poll.lua`**: The polling fallback logic implements **Sparse Polling**, lazily checking directory `mtime` stamps before performing expensive recursive diffs, dropping idle CPU usage by 99%.\n*   **`notify.lua`**: Handles LSP communication with **Global Deduplication**. Merges redundant requests and sequences `dotnet restore` queues to prevent OOM.\n\n### The Watch Cycle\n\n**1. Startup \u0026 Initialization**\n*   **Async Parsing**: On `LspAttach`, the watcher parses solution files asynchronously.\n*   **Zero-Block Scan**: Performs a background scan to build the initial snapshot. The UI remains fully responsive.\n\n**2. Event Detection \u0026 Optimization**\n*   **Burst Handling**: If 10,000 files change (Unity Regen), `regen_detector` kicks in, disabling expensive per-file tracking and only marking dirty directories.\n*   **Chunked Processing**: Events are processed in chunks of 200-1000 (configurable) with 10ms yields to the main loop, ensuring Neovim never freezes.\n\n**3. Synchronization**\n*   **Changes**: Detected changes are sent to Roslyn via `workspace/didChangeWatchedFiles`.\n*   **Smart Restore**: If a `.csproj` is touched, a restore is queued. If 50 projects change, they are restored one by one.\n\n### Troubleshooting \u0026 Debugging\n\n**\"The watcher is not watching files\"**\n1.  Turn on debug logs: `setup({ log_level = vim.log.levels.DEBUG })`.\n2.  Run `:messages`.\n3.  Check `:RoslynStatus`.\n    *   **Healthy**: \"Watcher: Running (fs_event)\"\n    *   **Issue**: \"Watcher: Polling (Fallback)\" -\u003e Might be slower.\n\n**\"It freezes when I change branch\"**\n1.  This means the dirty scan is taking too long.\n2.  Increase `poll_interval` or `processing_debounce_ms`.\n3.  Ensure `ignore_dirs` includes your build artifacts (`bin`, `obj`).\n\n**\"Slow initial scanning\"**\n1.  Run `:checkhealth roslyn_filewatch` — check the **Scanning Tiers** section.\n2.  Install the Rust native module (fastest) or `fd` (fast fallback).\n3.  Add large generated/build folders to `ignore_dirs`.\n\n**\"NuGet restore not working\"**\n1.  Ensure `dotnet` CLI is installed and in your PATH.\n2.  Check `enable_autorestore = true` in your config.\n3.  Run `:checkhealth roslyn_filewatch` to verify dotnet is detected.\n\n---\n\n## Known Limitations\n\n1.  **Massive Repositories (10k+ files)**\n    *   **Issue**: Initial scan might cause a brief CPU spike.\n    *   **Workaround**: `deferred_loading = true` is enabled by default to delay parsing until work begins.\n    *   **Optimization**: Ensure your `ignore_dirs` list includes all build/cache folders (e.g., `dist`, `node_modules`).\n\n2.  **Network Shares (NFS/SMB)**\n    *   **Issue**: Native file watching (`fs_event`) is notoriously flaky on network drives.\n    *   **Workaround**: The plugin attempts to fall back to polling, but latency will be higher.\n\n3.  **Linux/BSD: \"ENOSPC\" Error**\n    *   **Issue**: You might hit the system limit for file watchers.\n    *   **Fix**: Increase `fs.inotify.max_user_watches` with `sysctl` (Standard Linux limitation).\n\n4.  **External Changes (Git/Unity)**\n    *   **Issue**: Mass changes from outside Neovim (like `git checkout` or Unity re-importing assets) triggers thousands of events.\n    *   **Mitigation**: Automatically throttle these bursts using `processing_debounce_ms` and `activity_quiet_period`, so Neovim stays responsive, but Roslyn might take a few seconds to catch up.\n\n5.  **csproj-only Projects (Fixed in v0.3.5)**\n    *   **Previously**: Projects without `.sln`/`.slnx` files had issues with new files not being recognized by the LSP.\n    *   **Now Fixed**: The plugin automatically:\n        *   Recursively scans for all `.csproj` files in the project\n        *   Sends `project/open` notifications when new source files are created or opened\n        *   Triggers Roslyn project reload via csproj CHANGE events (same as opening old files)\n        *   Automatically restores dependencies when needed (if `enable_autorestore = true`)\n        *   Debounces notifications to prevent constant restores and reduce lag\n    *   **Note**: For best results with csproj-only projects, ensure `enable_autorestore = true` is set in your config.\n\n---\n\n## License\n\nMIT License.  \n\n## Acknowledgements\n\n- Inspired by the pain of using Roslyn in Neovim without file watchers 😅 \n\n- This project relies on several excellent open-source tools:\n\n    - **Neovim** — Lua APIs (`vim.fs`, `vim.uv`) used for cross-platform file watching.\n    - **Roslyn** — Microsoft's C# compiler platform and language server.\n    - **Watchman** — high-performance file watching for large repositories.\n    - **fswatch** — cross-platform filesystem change monitor.\n    - **fd** — fast file discovery used for repository scanning.\n    - **Rust** and the **ignore** crate — powering the native snapshot module for fast indexing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhoido2003%2Froslyn-filewatch.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhoido2003%2Froslyn-filewatch.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhoido2003%2Froslyn-filewatch.nvim/lists"}