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

request for integration with vscode's built-in formatting functionality #4

Open
mccarthyp-snet opened this issue Aug 15, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@mccarthyp-snet
Copy link

I know it's not a quick change, but supporting the built-in formatting functionality would be a nice addition.

Links for reference, to clarify what I'm requesting:
https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_code-formatting
https://code.visualstudio.com/api/language-extensions/programmatic-language-features#format-source-code-in-an-editor
https://code.visualstudio.com/api/language-extensions/language-server-extension-guide

@arcsector
Copy link
Owner

Interesting... Can you elaborate a bit on what you would like regarding formatting? As in would you want there to be a "style guide" of sorts, or would you want stuff like warnings on redundant commands? Some use cases might be helpful in fleshing this out.

@arcsector arcsector added the enhancement New feature or request label Sep 3, 2020
@arcsector arcsector self-assigned this Sep 3, 2020
@mccarthyp-snet
Copy link
Author

If I remember correctly, the Format SPL command you already have works fine for the actual formatting of the SPL. This request was just to bake it into vscode's built-in formatting functionality, which lets you format the document by using global keyboard shortcuts or by right-clicking in the Editor and choosing Format Document, instead of needing to trigger an Extension-specific Command. This Python extension is a good example: https://code.visualstudio.com/docs/python/editing#_formatting I'm sure there are other benefits/features, but this was the one that made me think to submit this request.

@arcsector
Copy link
Owner

Got it, I'll take a look.

@arcsector
Copy link
Owner

I took a look at this and it looks like it requires more than just a simple function hook, it requires actually porting all the code to the VSCode Formatter API, so this will be on hold for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants