Skip to content

LSP error with VSCode and config.nims file #89

@JuanCarlosllh

Description

@JuanCarlosllh

Hello! I’m testing this package, and it works wonderfully, but there's an issue with the Nim LSP and VSCode that I can’t resolve.

I believe this might be a configuration issue in my editor, but since the example in this repo is configured for VSCode, I expect it to work correctly with the official Nim extension.

The LSP doesn’t work due to the following error:

syncio.nim(767)          open
Error: unhandled exception: cannot open: /Users/juancarlosllh/Projects/Playdate/hello_world_nim/playdate/bindings/malloc.nim [IOError]

This error causes the LSP to restart, and features like autocomplete, go to definition, etc., stop working.

The issue seems to be caused by the config.nims file. If I comment out the line include playdate/build/config in this file, the LSP works correctly.

A workaround is to comment out this line when the editor starts. After that, if I uncomment it, everything works as expected.

I'm using VSCode 1.95.3 with the official nim-lang.org extension, Nim 2.20.0 and Nimble 0.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions