Troubleshooting
Common issues and solutions for the Noir JetBrains Plugin
LSP Not Working / No Code Completion
Section titled “LSP Not Working / No Code Completion”Symptoms:
- No code completion suggestions
- No error highlighting
- No hover information
- Status bar doesn’t show “Noir” indicator
Solutions:
-
Verify nargo is installed
Terminal window nargo --versionIf not found, see Installation for setup.
-
Check PATH configuration Your IDE might not inherit your shell’s PATH. Try:
- Launch IDE from terminal:
open -a "IntelliJ IDEA" - Or set explicit path in Settings → Languages & Frameworks → Noir
- Launch IDE from terminal:
-
Check LSP is enabled Go to Settings → Languages & Frameworks → Noir and ensure “Enable LSP” is checked.
-
Restart the language server Tools → Noir → Restart Language Server
-
Restart the IDE Sometimes a full restart is needed after configuration changes.
No Syntax Highlighting
Section titled “No Syntax Highlighting”Symptoms:
.nrfiles show as plain text- Keywords aren’t colored
- No bracket matching
Solutions:
-
Check file extension Ensure the file ends with
.nr(not.noiror other variants). -
Verify plugin is enabled Go to Settings → Plugins and ensure “Noir” is listed and has a checkmark.
-
Reopen the file Close the file and reopen it. Sometimes the file type isn’t recognized immediately.
-
Clear caches File → Invalidate Caches → Invalidate and Restart
nargo Not Found in PATH
Section titled “nargo Not Found in PATH”Symptoms:
- Error message: “nargo not found”
- LSP fails to start
- Actions like “Expand Macros” fail
Solutions:
Check Shell Configuration
Section titled “Check Shell Configuration”nargo is typically installed to ~/.nargo/bin. Ensure this is in your PATH:
For Zsh (macOS default):
# Add to ~/.zshrcexport PATH="$HOME/.nargo/bin:$PATH"For Bash:
# Add to ~/.bashrc or ~/.bash_profileexport PATH="$HOME/.nargo/bin:$PATH"After editing, restart your terminal and IDE.
IDE PATH Inheritance Issue
Section titled “IDE PATH Inheritance Issue”IDEs launched from Dock/Spotlight may not inherit shell PATH. Options:
-
Launch from terminal:
Terminal window open -a "IntelliJ IDEA"# oropen -a "RustRover" -
Set explicit path: Settings → Languages & Frameworks → Noir → Nargo path
/Users/yourname/.nargo/bin/nargo -
Fix system PATH (macOS):
Terminal window sudo launchctl config user path "$HOME/.nargo/bin:/usr/local/bin:/usr/bin:/bin"Then restart your Mac.
LSP Server Keeps Crashing
Section titled “LSP Server Keeps Crashing”Symptoms:
- Features work briefly then stop
- Repeated “LSP server stopped” notifications
- Errors in IDE logs
Solutions:
-
Check IDE logs Help → Show Log in Finder/Explorer Search for “Noir” or “nargo” to find error messages.
-
Update nargo
Terminal window noirupOlder nargo versions may have LSP bugs.
-
Try a different project If it only crashes on one project, there may be a syntax issue in your code that crashes the LSP.
-
Check for conflicting plugins Disable other language plugins temporarily to check for conflicts.
Completion Is Slow/Laggy
Section titled “Completion Is Slow/Laggy”Symptoms:
- Long delay before completion popup appears
- IDE becomes unresponsive when typing
- High CPU usage
Solutions:
-
Enable lightweight mode Settings → Languages & Frameworks → Noir → Enable “Lightweight mode”
This disables completion while keeping diagnostics and navigation.
-
Check project size Large projects with many files can slow down LSP. Consider:
- Excluding non-essential directories
- Breaking into smaller sub-projects
-
Update nargo
Terminal window noirupNewer versions may have performance improvements.
-
Increase IDE memory Help → Edit Custom VM Options
-Xmx4096mRestart IDE after changing.
Diagnostics Not Appearing
Section titled “Diagnostics Not Appearing”Symptoms:
- Errors aren’t highlighted
- No problems in Problems tool window
- Code compiles with errors but IDE shows none
Solutions:
-
Wait for indexing After opening a project, LSP needs time to analyze files. Wait for indexing to complete (shown in status bar).
-
Check for nargo compile errors Run
nargo checkin terminal. If it fails with an error, LSP may not be able to start properly. -
Restart LSP Tools → Noir → Restart Language Server
-
Check lightweight mode Lightweight mode still shows diagnostics. If diagnostics are missing, it’s not a lightweight mode issue.
Checking IDE Logs
Section titled “Checking IDE Logs”To find detailed error information:
-
Go to Help → Show Log in Finder/Explorer
-
Open
idea.log(or the latest log file) -
Search for:
- “Noir”
- “nargo”
- “LSP”
- “Error”
-
Look for stack traces or error messages
Common log locations:
| OS | Location |
|---|---|
| macOS | ~/Library/Logs/JetBrains/[IDE]/idea.log |
| Windows | %APPDATA%\JetBrains\[IDE]\log\idea.log |
| Linux | ~/.cache/JetBrains/[IDE]/log/idea.log |
Getting Help
Section titled “Getting Help”If these solutions don’t work:
-
Check GitHub Issues View existing issues
-
Open a new issue Include:
- IDE name and version
- Plugin version
- nargo version (
nargo --version) - Steps to reproduce
- Relevant log excerpts
-
Noir Community