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

respect fmt option in deno.json for auto imports #856

Closed
Tracked by #879
scarf005 opened this issue May 26, 2023 · 7 comments · Fixed by denoland/deno#20184
Closed
Tracked by #879

respect fmt option in deno.json for auto imports #856

scarf005 opened this issue May 26, 2023 · 7 comments · Fixed by denoland/deno#20184
Assignees
Labels

Comments

@scarf005
Copy link

Is your feature request related to a problem? Please describe.

i use following deno.jsonc:

// deno.jsonc
{ "fmt": { "semiColons": false } }

however auto import feature will not respect "semiColons": false option and add semicolons at the end.

Describe the solution you'd like

while the problem can be easily solved with format on save, respecting fmt options would be appreciated.

@scarf005
Copy link
Author

I'm (also) willing to open a PR, @bartlomieju could you provide me some pointers on where to look at?

@bartlomieju
Copy link
Member

@scarf005 I'll get back to you soon. I'm not entirely sure how to fix it yet.

@bartlomieju bartlomieju mentioned this issue Jul 11, 2023
17 tasks
@dsherret
Copy link
Member

@scarf005 we are currently not providing formatting settings to function calls like getCompletionsAtPosition and getCompletionEntryDetails

https://github.com/denoland/deno/blob/80331d1fe5b85b829ac009fdc201c128b3427e11/cli/tsc/99_main_compiler.js#L1037
https://github.com/denoland/deno/blob/80331d1fe5b85b829ac009fdc201c128b3427e11/cli/tsc/dts/typescript.d.ts#L6179

Probably providing the format settings there would fix this. We'd need to pass them into typescript via https://github.com/denoland/deno/blob/main/cli/lsp/tsc.rs

@dsherret
Copy link
Member

@scarf005 are you interested in looking at this one? Otherwise I can look into it sometime in the next few weeks.

@scarf005
Copy link
Author

scarf005 commented Jul 19, 2023

I'll have a look this weekend

@scarf005
Copy link
Author

indeed this was a lot more complex than i could handle. sorry i couldn't help more.

@bartlomieju
Copy link
Member

Thanks for the info @scarf005. We'll look into it then.

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

Successfully merging a pull request may close this issue.

3 participants