Skip to content

Fix project mapping schema & build issues#127

Open
elijahr wants to merge 3 commits intosaem:mainfrom
elijahr:fix-project-mapping-schema
Open

Fix project mapping schema & build issues#127
elijahr wants to merge 3 commits intosaem:mainfrom
elijahr:fix-project-mapping-schema

Conversation

@elijahr
Copy link
Contributor

@elijahr elijahr commented Jul 17, 2023

I was seeing errors like this in the Nim Language Server output:

DBG Failed to parse the configuration.

Symbol lookup wasn’t working well with the lsp backend.

It's not documented but according to this stack overflow, configuration entries with type array must nest the properties under items.

Additionally, when running nimble vsix I was getting this error:

vscode-nim/src/tools/elrpc.nim(6, 18) Error: cannot open file: nimsuggest/sexp

This is because nimsuggest is not in the nim installation’s lib directory.

These changes explicitly add the nim installation’s root directory to the search path so that nimsuggest can be found when compiling.

On my system, nim dump in the vscode-nim directory gives these paths:

/Users/user/Development/vscode-nim/src
/Users/user/.asdf/installs/nim/1.6.12/lib/pure
/Users/user/.asdf/installs/nim/1.6.12/lib/core
/Users/user/.asdf/installs/nim/1.6.12/lib/arch
/Users/user/.asdf/installs/nim/1.6.12/lib/pure/unidecode
/Users/user/.asdf/installs/nim/1.6.12/lib/js
/Users/user/.asdf/installs/nim/1.6.12/lib/posix
/Users/user/.asdf/installs/nim/1.6.12/lib/windows
/Users/user/.asdf/installs/nim/1.6.12/lib/wrappers/linenoise
/Users/user/.asdf/installs/nim/1.6.12/lib/wrappers
/Users/user/.asdf/installs/nim/1.6.12/lib/impure
/Users/user/.asdf/installs/nim/1.6.12/lib/pure/concurrency
/Users/user/.asdf/installs/nim/1.6.12/lib/pure/collections
/Users/user/.asdf/installs/nim/1.6.12/lib/deprecated/pure
/Users/user/.asdf/installs/nim/1.6.12/lib/deprecated/core
/Users/user/.asdf/installs/nim/1.6.12/lib
/Users/user/.asdf/installs/nim/1.6.12/lib
/Users/user/.asdf/installs/nim/1.6.12/lib

But nimsuggest is located at /Users/user/.asdf/installs/nim/1.6.12/nimsuggest.

elijahr added 3 commits June 2, 2023 11:36
When running `nimble vsix` I was getting this error:

> vscode-nim/src/tools/elrpc.nim(6, 18) Error: cannot open file: nimsuggest/sexp

This is because nimsuggest is not in the nim installation’s lib directory.

These changes explicitly add the nim installation’s root directory to the search path so that nimsuggest can be found when compiling.
I was seeing errors like this in the Nim Language Server output:

> DBG Failed to parse the configuration.

And symbol lookup wasn’t working well. This seems to have fixed it.
Copy link
Owner

@saem saem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the PR.

I can see how this might be an issue for some systems, but I don't want any config.nims. I'm hoping there are alternative ways to resolve this.

elijahr pushed a commit to elijahr/vscode-nim that referenced this pull request Nov 29, 2025
* Adds syntax highlighting and lsp support to nimble files

* Binds different APIs in preparation to implement custom macro expansion

* More bindings
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.

2 participants

Comments