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

Add better support for NimScript files #50

Open
PMunch opened this issue May 28, 2020 · 0 comments
Open

Add better support for NimScript files #50

PMunch opened this issue May 28, 2020 · 0 comments

Comments

@PMunch
Copy link
Owner

PMunch commented May 28, 2020

Currently NimScript files are parsed as-is by NimLSP. This is a problem with e.g. nimble files that are Nim, but has some extra imports and such added before they are executed. My idea to solve this is to introduce a folder of scripts on the form nimble.nimlsp where the filename would match the file extension to apply to and the nimlsp extension to differentiate them from other Nim/-Script files. When a file with an extension found in this folder is opened NimLSP will run a callback from that file to modify the content before each operation, and it would run another callback to modify the row/column information before handing the information back to the user. This way users of Nim could easily create these editor files for whatever NimScript format they create, without the need to hard-code anything into NimLSP.

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

No branches or pull requests

1 participant