Editor & IDE Support

Objeck has syntax highlighting, build integration, LSP support, and DAP debugging across multiple editors.


Full IDE experience with syntax highlighting, LSP autocomplete, and DAP debugging. Tested on Windows, Linux, and macOS.

1. Install the Extension

Download objeck-lsp_<version>.zip from the Objeck releases and unzip it; it contains objeck-lsp.vsix along with the other editor clients. Then (same command on all three platforms):

code --install-extension objeck-lsp.vsix

Or in VS Code: Extensions (Ctrl+Shift+X on Windows/Linux, Cmd+Shift+X on macOS) > ... menu > Install from VSIX...

2. Configure Install Path

Open VS Code Settings (Ctrl+, / Cmd+,) and set the install directory that matches your platform:

PlatformSettingExample
Windowsobjk.win.install.dirC:\Program Files\Objeck
Linuxobjk.posix.install.dir/usr/local/objeck-lang
macOSobjk.posix.install.dir/usr/local/objeck-lang or /opt/homebrew/Cellar/objeck/<version>

3. Debugging with DAP

Compile with debug symbols:

obc -src myprogram.obs -debug

Create .vscode/launch.json in your workspace:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "objeck",
      "request": "launch",
      "name": "Debug Objeck Program",
      "program": "${workspaceFolder}/myprogram.obe",
      "sourceDir": "${workspaceFolder}"
    }
  ]
}

Press F5 to start debugging. Features:

4. LSP Features

The language server implements the following, and every editor below gets all of them — the list is not VS Code specific:

Navigation

Reading

Editing


Sublime Text

Tested on Windows, Linux, and macOS with Sublime Text 4.

Download the Objeck release and run the install script for your platform:

:: Windows (Command Prompt)
scripts\install.cmd "C:\Program Files\Objeck" sublime
# Linux
./scripts/install.sh /usr/local/objeck sublime

# macOS (Intel or Apple Silicon)
./scripts/install.sh /usr/local/objeck sublime

This installs the LSP server, syntax highlighting, the DAP adapter plugin, and configures Sublime automatically. Requires the LSP package (installed automatically on Linux/macOS if git is available).

After install: Tools > LSP > Enable Language Server Globally > select "objeck".

Debugging with DAP

The install script drops objeck_dap_adapter.py and a .python-version file (containing 3.8) into Packages/Objeck/, and writes Packages/User/Objeck.sublime-settings with the path to obd. The .python-version is required: the Sublime Debugger package targets Python 3.8 and Sublime Text 4 defaults to Python 3.3 for plugins, so without it the adapter fails to load. See API Environments.

To enable debugging:

  1. Install the Debugger package via Package Control.
  2. Restart Sublime so the adapter is registered with Debugger's adapter registry.
  3. Compile your source with debug symbols: obc -src myprog.obs -debug.
  4. Add a debugger_configurations block to your .sublime-project:
{
    "folders": [{ "path": "." }],
    "debugger_configurations": [{
        "name": "Debug current Objeck file",
        "type": "objeck",
        "request": "launch",
        "program": "${folder}/${file_base_name}.obe",
        "sourceDir": "${folder}"
    }]
}
  1. Open the project, then Debugger > Start (or via the command palette: "Debugger: Start"). Set breakpoints by clicking the gutter; step with the Debugger panel buttons; inspect locals in the Variables view.

The adapter spawns obd --dap over stdio with OBJECK_LIB_PATH set per Objeck.sublime-settings. The full example lives at clients/sublime/dap/objeck.sublime-project.example in the Objeck release.

Manual Setup

Copy syntax files from docs/syntax/sublime/ to your Sublime packages directory:

PlatformPath
Windows%APPDATA%\Sublime Text\Packages\Objeck\
macOS~/Library/Application Support/Sublime Text/Packages/Objeck/
Linux~/.config/sublime-text/Packages/Objeck/

Files:

For LSP, add to Preferences > Package Settings > LSP > Settings:

{
  "clients": {
    "objeck": {
      "enabled": true,
      "command": ["~/.objeck-lsp/bin/obr", "~/.objeck-lsp/objeck_lsp.obe", "~/.objeck-lsp/objk_apis.json", "stdio"],
      "env": {
        "OBJECK_LIB_PATH": "~/.objeck-lsp/lib",
        "OBJECK_STDIO": "binary"
      },
      "selector": "source.objeck-obs"
    }
  }
}

Vim / GVim (9.0+)

Full IDE setup with syntax highlighting, LSP (autocomplete / go-to-def / hover / diagnostics) via yegappan/lsp, and DAP debugging via vimspector. Requires Vim 9.0+ with +python3 (the gvim "Huge" build on Windows, vim-gtk3 / vim-gnome on Linux, brew install macvim on macOS).

Tested on Windows (gvim "Huge" build), Linux, and macOS (MacVim).

Download the Objeck release and run the installer for your platform:

:: Windows (Command Prompt)
scripts\install.cmd "C:\Program Files\Objeck" vim
# Linux
./scripts/install.sh /usr/local/objeck vim

# macOS
./scripts/install.sh /usr/local/objeck vim

The script:

After install, open any .obs file in gvim / vim / MacVim — the LSP server starts automatically and these keybindings are active in Objeck buffers:

KeyAction
gdGo to definition
grShow references
KHover documentation
<leader>rnRename symbol

Debugging with DAP

  1. Compile with debug symbols:
obc -src myprog.obs -debug
  1. Drop a .vimspector.json next to your sources. Vimspector walks up from the file being debugged looking for .vimspector.json — place it at your project root (not ~/). It must contain both an adapters block (pointing at obd) and a configurations block:

Windows — note the doubled backslashes in JSON:

{
    "adapters": {
        "objeck": {
            "name": "objeck",
            "command": [
                "C:\\Program Files\\Objeck\\bin\\obd.exe",
                "--dap"
            ],
            "env": {
                "OBJECK_LIB_PATH": "C:\\Program Files\\Objeck\\lib"
            }
        }
    },
    "configurations": {
        "Debug current Objeck file": {
            "adapter": "objeck",
            "configuration": {
                "request": "launch",
                "type": "objeck",
                "program": "${workspaceRoot}/${fileBasenameNoExtension}.obe",
                "sourceDir": "${workspaceRoot}"
            }
        }
    }
}

Linux / macOS:

{
    "adapters": {
        "objeck": {
            "name": "objeck",
            "command": [
                "/usr/local/objeck/bin/obd",
                "--dap"
            ],
            "env": {
                "OBJECK_LIB_PATH": "/usr/local/objeck/lib"
            }
        }
    },
    "configurations": {
        "Debug current Objeck file": {
            "adapter": "objeck",
            "configuration": {
                "request": "launch",
                "type": "objeck",
                "program": "${workspaceRoot}/${fileBasenameNoExtension}.obe",
                "sourceDir": "${workspaceRoot}"
            }
        }
    }
}

Adjust command and OBJECK_LIB_PATH to match your install prefix. On Homebrew macOS, that's typically /opt/homebrew/Cellar/objeck/<version>/bin/obd and /opt/homebrew/Cellar/objeck/<version>/lib.

  1. Open the .obs file in gvim, press <F9> on a line to set a breakpoint, then <F5>. Vimspector opens its tab layout (code / variables / watches / stack / output / console) and starts execution.

Vimspector "HUMAN" key bindings:

KeyAction
<F5>Continue / start
<F9>Toggle breakpoint
<F10>Step over
<F11>Step into
<F12>Step out
<S-F5>Stop debugging
<leader>diInspect variable under cursor (hover)

In the Variables window, press <CR> on Scope: Locals, Scope: Instance, or Scope: Class to expand. Hovering a local object with <leader>di shows ClassName { field=val, ... } (one-level field expansion).

Program output (PrintLine, Print, stderr) appears in the vimspector output window — obd --dap redirects the running program's stdout/stderr through capture pipes so the protocol stream stays clean.

Troubleshooting — if <F5> reports "The specified adapter 'objeck' is not available. Did you forget to run 'Vimspector Install'?", your .vimspector.json is missing the adapters block shown above. Vimspector only reads adapter definitions from project-local .vimspector.json files (or g:vimspector_adapters); a ~/.vimspector.json in your home directory will be ignored unless the file being debugged lives directly under ~/ with no closer project file.

Manual Setup (syntax only, no LSP/DAP)

Copy from docs/syntax/vim/:

# Linux / macOS
mkdir -p ~/.vim/syntax ~/.vim/ftdetect
cp docs/syntax/vim/objeck.vim ~/.vim/syntax/
cp docs/syntax/vim/ftdetect/objeck.vim ~/.vim/ftdetect/
:: Windows (gvim)
mkdir "%USERPROFILE%\vimfiles\syntax" "%USERPROFILE%\vimfiles\ftdetect"
copy docs\syntax\vim\objeck.vim "%USERPROFILE%\vimfiles\syntax\"
copy docs\syntax\vim\ftdetect\objeck.vim "%USERPROFILE%\vimfiles\ftdetect\"

For build-from-vim without LSP, add to .vimrc / _vimrc:

autocmd FileType objeck setlocal makeprg=obc\ -src\ %\ -dest\ %:r.obe
autocmd FileType objeck setlocal errorformat=%f:(%l\\,%c):\ %m

Use :make to compile and :copen to see errors. obc must be on your PATH.


Neovim (0.11+)

Download the Objeck release and run:

# Linux / macOS
./scripts/install.sh /usr/local/objeck neovim

This installs syntax highlighting, ftdetect, and the LSP client config to your Neovim config directory automatically.

Manual Setup

Copy from the objeck-lang repo's clients/neovim/:

cp clients/neovim/objeck.lua ~/.config/nvim/lsp/
cp clients/neovim/objeck.vim ~/.config/nvim/ftdetect/

Or for syntax-only (no LSP), use the standalone files from docs/syntax/vim/:

mkdir -p ~/.config/nvim/syntax ~/.config/nvim/ftdetect
cp docs/syntax/vim/objeck.vim ~/.config/nvim/syntax/
cp docs/syntax/vim/ftdetect/objeck.vim ~/.config/nvim/ftdetect/

Emacs (29+)

Download the Objeck release and run:

./scripts/install.sh /usr/local/objeck emacs

This installs objeck-mode.el (with LSP integration via eglot) to your Emacs load-path.

Manual Setup (syntax only)

Copy from docs/syntax/emacs/:

cp docs/syntax/emacs/objeck-mode.el ~/.emacs.d/

Add to ~/.emacs or ~/.emacs.d/init.el:

(load "~/.emacs.d/objeck-mode.el")

Provides: syntax highlighting, auto-indentation (2-space), comment support, .obs file auto-detection.

Compile from Emacs

M-x compile RET obc -src myprogram.obs RET

Errors are parsed and navigable with M-x next-error.


Kate

Copy docs/syntax/kate/objeck.xml to:

PlatformPath
Linux~/.local/share/katepart5/syntax/
macOS~/Library/Application Support/katepart5/syntax/

LSP support available via Kate's built-in LSP client — see objeck-lang for configuration.


Other Editors

EditorFilesLocation
Geanydocs/syntax/geany/filetypes.Objeck.confCopy to Geany config directory
Notepad++docs/syntax/notepadxx/objeck.xmlImport via Language > User Defined Language
JEditdocs/syntax/jedit/objeck.xmlCopy to ~/.jedit/modes/
Lite-XLdocs/syntax/lite-xl/language_objeck.luaCopy to Lite-XL plugins
TextAdeptdocs/syntax/textadept/objeck.luaCopy to TextAdept lexers

Command-Line Debugger

For terminal-based debugging without an IDE, see the Debugger Guide or core/debugger/README.md.

obc -src myapp.obs -debug       # compile with debug symbols
obd -bin myapp.obe -src_dir .   # start debugger