Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Libs (BASS) are highlighted bg-red although it compiles error-free #48

Open
Smarcy opened this issue Sep 20, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Smarcy
Copy link

Smarcy commented Sep 20, 2021

I am using NVIM for Nim development and have some highlighting issues when using nimble packages.

For some reason NVIM does highlight the BASS and illwill functions with a red error-y background, as you can see here

I am using the alaviss/nim.nvim and asynccomplete.vim plugins alongside treesitter.

How do I get NVIM to actually recognize external functions?

The shown code does compile without issues, so those are not actual errors.

@alaviss
Copy link
Owner

alaviss commented Sep 23, 2021

Have you tried restarting the editor?

If that works, then it's likely that you've installed additional packages while nimsuggest is running, and currently nimsuggest cannot detect changes to the NimblePath, thus the only way to solve this is to restart the editor or nimsuggest via :call nim#suggest#ProjectStop() | call nim#suggest#ProjectStart(). This is unfortunately a nimsuggest limitation and there is not much that I can do here.
As for nimterop-based wrappers, Nim has banned external code execution within nimsuggest via staticExec which mean nimterop won't work very well in this environment.

If restarting doesn't work, then can you provide additional details on how your Nim is setup? If you use localdeps mode of nimble, then unfortunately nimsuggest is not aware of this by default.

@alaviss alaviss added the bug Something isn't working label Sep 23, 2021
@Smarcy
Copy link
Author

Smarcy commented Sep 23, 2021

I restarted the editor and restartet nimsuggest as well, but unfortunately neither helped.
I'm not quite sure what you mean by Nim setup. How do I get the information you are looking for?

@alaviss
Copy link
Owner

alaviss commented Sep 23, 2021

How did you install Nim and what version are you running? Are you using local deps mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants