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

Is it possible to switch off reformatting of comment lines? #5

Open
telecasterer opened this issue Jan 19, 2021 · 4 comments
Open

Is it possible to switch off reformatting of comment lines? #5

telecasterer opened this issue Jan 19, 2021 · 4 comments

Comments

@telecasterer
Copy link

I really appreciate the appearance of the Tcl code reformatting in the latest release. I inherit a lot of code from others and being able to now reformat it quicky to a sane readable format is a real plus. However, I need to stop it reformatting comments as they have a special function in the context I'm working in. Is there an option to do that? and if not could it be added please?

Thanks

@maciejmatczak
Copy link

Still looking for it? It's VS Code native functionality. From top of my head:

"[tcl]" {
  "editor.formatOnSave": false
}

@telecasterer
Copy link
Author

Still looking for it? It's VS Code native functionality. From top of my head:

"[tcl]" {
  "editor.formatOnSave": false
}

Erm, thanks but that's got absolutley nothing to do with my question. As I explained I want to be able to stop the formatter formatting comments.

@maciejmatczak
Copy link

Oh man, sorry.

And your request is pretty important, any 3rd party utility utilizing comments would have that problem...

I fast read through it and assumed you had problem with just auto formatting. This plugin currently destroys almost every script I try to format ;)

@bitwisecook
Copy link
Owner

there is no such command to do so, you'd want to add something around here:

https://github.com/bitwisecook/vscode-tcl/blob/master/src/formatProvider.ts#L53
https://github.com/bitwisecook/vscode-tcl/blob/master/src/extension.ts#L29

you'll need to add a configuration to hold what you want to do, like:

https://github.com/bitwisecook/vscode-iRule/blob/master/package.json#L46-L55

and use it like:

https://github.com/bitwisecook/vscode-iRule/blob/master/src/diagnosticsProvider.ts#L193

I'm happy to receive pull requests for such things

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

3 participants