feat: add Nim language server support#1186
Open
LikiosSedo wants to merge 2 commits intooraios:mainfrom
Open
Conversation
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RuntimeDependencyCollectionpattern as Dart and other language serversChanges
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— RegisterNIMin Language enum, add.nim/.nimsfile matchers, add factory methodpyproject.toml— Addnimpytest markertest/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 treePrerequisites
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— passesuv run poe type-check— passes (mypy, 0 errors)uv run poe test -m nimVerification
Archive structure verified — both
.tar.gz(Linux) and.zip(macOS/Windows) releases contain thenimlangserverbinary at the archive root (no nested directories).Closes #645