• Sign In



  • Categories

    Extension Details



    Readme

    Pascal

    Proprietary Pascal and Object Pascal support for Nova, published by Swipht Group.

    The extension highlights Free Pascal and Delphi source, lists units, types, and routines in the symbol list, offers keyword, runtime, and in-file completions, formats with ptop, and compiles with Free Pascal.

    Requirements

    • Nova 11 or later
    • Optional: Free Pascal (fpc) on your PATH, or a compiler path set in preferences
    • Optional: a Pascal language server executable, if you want diagnostics and completion beyond this extension’s built-in syntax features

    Usage

    Open a .pas, .pp, .inc, .dpr, .lpr, or .dpk file. Nova selects the Pascal syntax automatically.

    While a Pascal file is open, a Free Pascal task is available for Build, Run, and Clean. You do not need to add it in Project Settings. Run builds first. A program that reads keyboard input should use that task’s Run action, which uses Nova’s task report.

    Build, Run, and Clean use a program file when the focused file is a unit or include. A .lpr, .dpr, or .dpk file is a build root, as is a .pas or .pp file whose first token is program, library, or package. Otherwise the extension looks for a program in the same folder, then in parent folders inside the workspace. When no project is open, it still checks the same folder, then a few parent folders, and uses a parent program only when that program’s uses clause names the focused unit. A .lpr, .dpr, or .dpk file counts, as does a .pas or .pp file whose first token is program, library, or package. If several programs are found, it prefers the one whose uses clause names the focused unit, then the first path in alphabetical order. When no program is found, it compiles the focused file. If the program is in another directory, the focused file’s directory is added to the unit search path.

    The Editor menu also has Compile, Run, Format, Insert Program, and Insert Unit. Compile and Run use the same compiler script and the same program choice as the task. They ask you to save the file first when it has unsaved changes. Format runs ptop from the Free Pascal installation and keeps the existing keyword case. When the editor uses spaces, the formatted indent uses spaces. A failed compile shows the first error. Those commands do not open the task report.

    The Extensions menu has New Program and New Unit. Each opens an untitled Pascal document with the same skeleton as the insert commands.

    Saving a Pascal file runs fpc on that file and marks errors, warnings, notes, and hints in the editor. This check stays on the saved file even when Build uses a nearby program. It is skipped when Diagnostics on Save is off, or when a language server is running.

    Completions include names declared in the open file: routines, types, constants, and variables. They are not offered inside a comment or a string.

    Clips cover programs, units, routines, classes, branches, loops, exception blocks, records, properties, and constructors.

    Comment and uncomment use // for a single line and { } for a selection.

    A Free Pascal task can still be added in Project → Project Settings… when a project wants its own compiler settings.

    Configuration

    Open Extensions → Extension Library…, select Pascal, and open Preferences.

    • Free Pascal Compiler is the fpc executable. Leave it blank to use fpc on PATH.
    • Language Mode is passed as -Mobjfpc or -Mdelphi.
    • Extra Arguments are passed to fpc after the language mode. Quote paths that contain spaces.
    • Unit Search Paths are directories passed with -Fu. Separate paths with colons or newlines. A relative path is resolved from the project folder.
    • Output Directory receives the executable, .o, and .ppu files. A relative path is resolved from the project folder. Leave it blank to write them beside the source file.
    • Run Arguments are passed to the program when you run it. Quote values that contain spaces. They are not passed to the compiler.
    • Diagnostics on Save runs the compiler check when a file is saved.
    • Language Server is an optional executable path. The extension does not download or bundle a server. When the path is empty, syntax features still work. When the server is running, the save-time compiler check is skipped.

    The same keys can be set per project in Project → Project Settings…. A blank project value inherits the global setting. Diagnostics on Save can inherit, or be turned on or off for the project.

    Support

    If this extension is useful to you, consider supporting its development:

    License

    The extension itself is proprietary. See LICENSE. The vendored Tree-sitter grammar is MIT-licensed. See THIRD-PARTY-NOTICES.md.

    Release Notes

    Version 1.3.1

    • Added donation links (Liberapay, Ko-fi, IssueHunt) to the README

    Version 1.3

    • Requires Nova 11
    • Libraries, packages, and .dpk files build as project roots
    • Outside a workspace, a parent program is used only when its uses clause names the focused unit
    • Relative unit search paths and the output directory resolve from the project folder
    • Compiler issues, including hints, point at the unit that reported them
    • Compile and Run ask you to save unsaved changes first
    • Format uses spaces when the editor uses spaces
    • Diagnostics on save stay off while a language server is running
    • New Program and New Unit work when no Pascal file is open
    • The Free Pascal task finds Homebrew fpc and removes linker leftovers on clean
    • Folding, symbols, and highlighting for packages, helpers, enums, operator names, and more statements

    Version 1.2

    • Build, run, and clean a nearby program when the focused file is a unit
    • Run arguments passed only to the executable
    • Completions for routines, types, constants, and variables in the open file
    • Format command using ptop, without changing keyword case
    • New Program and New Unit commands

    Version 1.1

    • Automatic Free Pascal build, run, and clean when a Pascal file is open
    • Compiler issues in the editor after save
    • Preferences for extra arguments, unit search paths, output directory, and diagnostics
    • Editor commands to compile, run, and insert a program or unit
    • More clips, keywords, types, and runtime completions

    Version 1.0

    Initial release.

    • Tree-sitter syntax for Free Pascal and Delphi
    • Symbols, folds, keyword and runtime completions, and clips
    • Free Pascal build and run tasks with compiler issue matching
    • Optional external language server

    License

    Copyright (c) 2026 Swipht Group. All rights reserved.

    This extension is proprietary and confidential. No license is granted to use,
    copy, modify, merge, publish, distribute, sublicense, or sell the Swipht Group
    Pascal extension except to the copyright holder.

    The Tree-sitter Pascal parser distributed in binary and source form with this
    extension remains under the MIT License. See THIRD-PARTY-NOTICES.md.