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

[fix] Allow nimlsp to understand pre-existing variables defined by nimble in .nimble files #163

Open
heysokam opened this issue Aug 22, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@heysokam
Copy link

image
Simple as the title.
Basically, allow nimlsp to understand that some variables are pre-defined by nimble, and they should not be hinted as errors in the code.

@PMunch
Copy link
Owner

PMunch commented Aug 22, 2023

I designed this feature but never got around to implement it. Basically my idea was that you could define a preamble for certain file extensions. When nimlsp opens a file it would have a look at the installed preambles and see that it has a .nimble preamble. Then for each .nimble file it would append the preamble before processing the file. This would require some trickery to get line numbers correct, but apart from that it shouldn't be too hard to implement if someone wants to give it a whirl. Bonus points of course if there is some way a Nimble file can define their own templates so that if a program uses NimScript as a configuration language NimLSP would just automatically discover the template amongst your installed packages and provide support for that format.

@PMunch PMunch added enhancement New feature or request help wanted Extra attention is needed labels Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants