-
Notifications
You must be signed in to change notification settings - Fork 409
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
Expose logs to VSCode frontend or describe in documentation how to reach the logs #774
Comments
Thanks for the suggestion.
Well, you indeed don't need to install sql-formatter in addition to the SQL Formatter VSCode plugin . I'm not sure what to clarify in the docs about this.. I mean, there are lots of other things one doesn't need to do :) Though perhaps you are using some other plugin that does require installing sql-formatter separately. There are many different VSCode plugins that use sql-formatter libary, but most of them are not under my control. Perhaps you could first mention which exact plugin you are using. |
And only one of those many things is a install pattern similar to this one causing confusion; I'm not talking about NOT needing to eat cupcakes here ;). There are two highly relevant common install patterns and this one is different than the others. Docker Plugin? You need to install docker. Maven Plugin? Same. NeoVim Plugin? Same. I could go find 50 plugins that work this way. SQL-Formatter? Well, it's not clear. There is no 'Installation' section to the Readme for the plugin, and the sister page for the executable talks about installing
I agree all the different SQL formatter plugins do make it confusing. I'm only referring to the 'SQL Formatter VScode ' plugin which VSCode points me to the extension page which takes me to this repo: https://github.com/sql-formatter-org/sql-formatter-vscode (and in terms of the above, I'm referring the link in that page that points here: https://github.com/sql-formatter-org/sql-formatter). I'm assuming these are under your remit; if not please let me know. But no need to spend your time trying to fix my issue--I can keep working on it. The feature request isn't for tech support or documentation changes (though a low-cost single line in the documentation would clear up an ambiguity compared to other plugins), it's to expose log outputs to VSCode frontend (or specify a readme section on how to read those logs). See here: https://stackoverflow.com/questions/34085330/how-to-write-to-log-from-vscode-extension I have no other SQL formatting plugins installed. But, independent of my particular issues of the VSCode plugin not working, it would nice to expose the runtime output to the frontend (->Outputs->). This is a common logging pattern enabled by the python, github, vscode-neovim, pytest (I find it VERY useful for this one), I could go on and on (and vscode supports specifying debug level from the output panel). It would be great to have a place to look when I save and nothing formats that some setting is wrong or some other error to help me easily know what to fix. Currently none of this is exposed for debugging and if it doesn't work it's completely silent. |
Thanks for the thorough explanation. Would you perhaps be interested in contributing this log-exposure functionality (which seems like a useful addition)? You seem to know a lot more about this than I do. |
I'll consider it. I think you give me too much credit, but would love to contribute if I can. I'll look over your source and the solutions, and think it through and if it's not too hard or time-consuming for me, Ill submit a PR to you. Thanks! |
The vscode plugin is not working for me in Sagemaker, it does work on my laptop. I could have sworn I DONT need to install the
sql-formatter
binary via npm or yarn if I install the plugin (the docs could be clearer on this--many enter the sql-formatter world via the vscode plugin). So I want to see what might be going wrong when the format command is run against my code (in vscode) but unlike most other plugins there is not output exposed to vscode (via 'output->dropdown') .This will help tons of people find out immediately what's going wrong rather than just a lack of responsiveness from a plugin.
The text was updated successfully, but these errors were encountered: