Skip to content

feat: add Nim language server support#1186

Open
LikiosSedo wants to merge 2 commits intooraios:mainfrom
LikiosSedo:feat/nim-language-support
Open

feat: add Nim language server support#1186
LikiosSedo wants to merge 2 commits intooraios:mainfrom
LikiosSedo:feat/nim-language-support

Conversation

@LikiosSedo
Copy link

Summary

  • Add Nim language support via nimlangserver (v1.12.0)
  • Automatic binary download for 5 platforms: Linux x64/arm64, macOS x64/arm64, Windows x64
  • Follows the same RuntimeDependencyCollection pattern as Dart and other language servers

Changes

  • src/solidlsp/language_servers/nim_language_server.py — Language server implementation with platform-aware binary management, Nim-specific directory exclusions (nimcache, nimblecache, htmldocs, nimbledeps)
  • src/solidlsp/ls_config.py — Register NIM in Language enum, add .nim/.nims file matchers, add factory method
  • pyproject.toml — Add nim pytest marker
  • test/resources/repos/nim/test_repo/ — Minimal Nim project with cross-module imports (calculator, utils, main, tests)
  • test/solidlsp/nim/test_nim_basic.py — 8 tests covering document symbols, cross-file references, hover, and full symbol tree

Prerequisites

nimlangserver requires the Nim compiler (nim / nimsuggest) to be installed on the system. The language server binary itself is downloaded automatically.

Testing

  • uv run poe format — passes
  • uv run poe type-check — passes (mypy, 0 errors)
  • Tests require Nim to be installed: uv run poe test -m nim

Verification

Archive structure verified — both .tar.gz (Linux) and .zip (macOS/Windows) releases contain the nimlangserver binary at the archive root (no nested directories).

Closes #645

Add support for the Nim programming language via nimlangserver
(https://github.com/nim-lang/langserver).

- Add NimLanguageServer with RuntimeDependencyCollection for automatic
  binary download across 5 platforms (linux-x64/arm64, macos-x64/arm64,
  windows-x64)
- Register NIM in Language enum with .nim/.nims file matchers
- Add test repository with cross-module Nim code (calculator, utils, main)
- Add test suite covering symbol finding, cross-file references, hover,
  and full symbol tree
- Add nim pytest marker

Note: nimlangserver requires the Nim compiler (nim/nimsuggest) to be
installed on the system for full functionality.

Closes oraios#645
The RuntimeDependencyCollection uses shutil.unpack_archive which
expects "gztar" format identifier, not "tar.gz".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Nim language

1 participant