-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Auto update for omnisharp.json (VSCode extension) #623
Auto update for omnisharp.json (VSCode extension) #623
Conversation
Hi, thanks for this contribution. It looks nice. |
@AdrianWilczynski I'm getting error when trying to pack an extension (
Could you help me out? |
I think you have to run |
Thanks! |
I have one thing to improve. After installing an extension the omnisharp.json content is not formatted, it is on one line. Is it possible to run some formatter before saving the file? |
It should be formatted already because of |
So I think It might be because Though it still looks formatted on my machine when I open omnisharp.json with Notepad, Notepad++ or VSCode so I'm not sure if that's what's going on. |
You're right, EOL is LF. I'm on Windows 7 and Notepad cannot handle LF as EOL. I think we can leave it as it is for now. |
Thanks for the contribution! |
Hey, I took a stab at adding an auto-update for the omnisharp.json file to eliminate the need to set it up manually.
Let me know if it's something you're interested in and if I can fix/improve upon submitted code.
Fair warning, it's my first attempt at contributing to open source 😅
I've also realized now that this PR might be kinda off-putting because of its size but most of it is just standard extension boilerplate. The actual functionality is mostly contained in extension.ts file.
All it really does is checking (at startup) if omnisharp.json exists & contains appropriate settings and creating/updating it if needed.
PR also defines configuration setting (in VSCode) to disable this functionality (just in case).
There are two test cases (in extension.test.ts):
(should fix: #615)