No description
  • TypeScript 90.3%
  • JavaScript 9.7%
Find a file
2026-01-19 10:56:25 -05:00
.vscode initial commit 2025-11-29 23:07:26 -05:00
icons initial commit 2025-11-29 23:07:26 -05:00
src refactor: update references from No Clue to NC throughout the extension 2026-01-19 10:56:25 -05:00
syntaxes refactor: update references from No Clue to NC throughout the extension 2026-01-19 10:56:25 -05:00
.gitattributes initial commit 2025-11-29 23:07:26 -05:00
.gitignore initial commit 2025-11-29 23:07:26 -05:00
.vscodeignore initial commit 2025-11-29 23:07:26 -05:00
esbuild.js chore: drop unused ts lsp server 2026-01-16 12:57:24 -05:00
language-configuration.json initial commit 2025-11-29 23:07:26 -05:00
LICENSE initial commit 2025-11-29 23:07:26 -05:00
package-lock.json initial commit 2025-11-29 23:07:26 -05:00
package.json refactor: update references from No Clue to NC throughout the extension 2026-01-19 10:56:25 -05:00
README.md refactor: update references from No Clue to NC throughout the extension 2026-01-19 10:56:25 -05:00
tsconfig.json initial commit 2025-11-29 23:07:26 -05:00

NC Language Support for Visual Studio Code

Rich language support for the NC programming language in Visual Studio Code, featuring IntelliSense, Go to Definition, Diagnostics, and more.

Quick Start

  1. Install the extension
  2. Ensure ncc is installed and in your PATH
  3. Open or create a .nc file
  4. Start coding with full language support!

Features

The extension provides comprehensive language support through the ncc lsp server:

Module System

Full support for NC's module system:

  • Path-based imports: import "std/io", import "std/crypto/hash/md5"
  • Module aliasing: import "std/io" as io_lib
  • Member access: io.println(), md5.sum_hex()
  • Module constants: io.O_RDONLY, io.SEEK_END
  • Public exports: pub fn for exported functions

Code Intelligence

  • Go to Definition (F12 or Ctrl+Click): Jump to symbol definitions
  • Find All References (Shift+F12): Find all usages of a symbol
  • Peek Definition (Alt+F12): Preview definitions inline
  • Go to Type Definition: Navigate to type definitions
  • Go to Implementation: Jump to implementations

Code Editing

  • IntelliSense / Auto-completion (Ctrl+Space): Context-aware code completion
  • Signature Help (Ctrl+Shift+Space): Parameter hints for functions
  • Hover Information: View documentation and type information
  • Document Symbols (Ctrl+Shift+O): Navigate file structure via outline
  • Workspace Symbols (Ctrl+T): Search symbols across the workspace
  • Rename Symbol (F2): Rename symbols with automatic refactoring

Code Quality

  • Diagnostics: Real-time error and warning detection
  • Code Actions (Ctrl+.): Quick fixes and refactoring suggestions
  • Document Formatting (Shift+Alt+F): Auto-format your code
  • Document Highlights: Highlight matching symbols in the document

Navigation

  • Folding Ranges: Collapse/expand code blocks
  • Call Hierarchy: View incoming and outgoing calls
  • Type Hierarchy: Explore type relationships
  • Breadcrumbs: Navigate code structure in the editor

Additional Features

  • Semantic Highlighting: Enhanced syntax highlighting based on semantic analysis
  • Inlay Hints: Inline type and parameter hints
  • Code Lens: Actionable contextual information in code

Configuration

The extension provides several configuration options:

Language Server

The extension uses ncc lsp for language server functionality.

  • nc.languageServer.enabled: Enable/disable the NC language server (default: true)
  • nc.languageServer.path: Path to the ncc executable (default: ncc)
  • nc.languageServer.trace: Set tracing level for debugging (off, messages, verbose)
  • nc.languageServer.maxNumberOfProblems: Maximum number of problems to report (default: 100)

Feature Settings

  • nc.completion.enabled: Enable/disable code completion (default: true)
  • nc.diagnostics.enabled: Enable/disable diagnostics (default: true)

Compiler Integration

  • nc.compiler.path: Path to the ncc compiler executable (default: ncc)
  • nc.compiler.enabled: Enable/disable ncc compiler integration for error checking (default: true)

Setup

The extension requires the ncc compiler to be installed and available:

  1. Install ncc and ensure it's in your PATH, or
  2. Set nc.languageServer.path to the full path to your ncc executable

Example settings.json:

{
  "nc.languageServer.path": "/usr/local/bin/ncc"
}

Commands

Available through the Command Palette (Ctrl+Shift+P):

  • NC: Restart Language Server: Restart the language server if it becomes unresponsive
  • NC: Show Output Channel: Show the language server output for debugging
  • NC: Toggle Language Server Trace Level: Cycle through trace levels (off/messages/verbose)
  • NC: Run File: Execute the current NC file (also Ctrl+F5)

Keyboard Shortcuts

  • F12: Go to Definition
  • Shift+F12: Find All References
  • Alt+F12: Peek Definition
  • F2: Rename Symbol
  • Ctrl+.: Show Code Actions
  • Ctrl+Space: Trigger IntelliSense
  • Ctrl+Shift+Space: Signature Help
  • Ctrl+Shift+O: Go to Symbol in File
  • Ctrl+T: Go to Symbol in Workspace
  • Shift+Alt+F: Format Document
  • Ctrl+F5: Run Current File
  • Ctrl+Click: Go to Definition (mouse)

Development

To contribute to this extension:

  1. Clone the repository
  2. Run npm install to install dependencies
  3. Open in VS Code and press F5 to run the extension in development mode
  4. Make changes to the TypeScript files in src/
  5. Run npm run compile to build
  6. Test with NC files

Building

npm run compile

Watching for changes

npm run watch

Architecture

The extension consists of:

  • Client (src/extension.ts): VS Code extension activation and client setup
  • Language Server: Provided by ncc lsp (external to this extension)
  • Grammar (syntaxes/nc.tmLanguage.json): TextMate grammar for syntax highlighting
  • Configuration (language-configuration.json): Language-specific editor behavior

The language server is provided by the NC compiler itself via the ncc lsp command, ensuring the language support is always in sync with the compiler