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

feat(formatting): added formatting for terragrunt files #165

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

Gaurang033
Copy link
Contributor

No description provided.

@Gaurang033 Gaurang033 force-pushed the feature/terragurnt_formatter branch from 71e2164 to 3a4aa5d Compare July 23, 2024 17:42
@Gaurang033 Gaurang033 force-pushed the feature/terragurnt_formatter branch from 3a4aa5d to 42f4bac Compare July 23, 2024 18:07
@Gaurang033
Copy link
Contributor Author

hclfmt is a public archive now. and terragurnt provides the command line utility to format the hcl files. this pull request will allow to use the command line similar to terraform to reformat the files.
https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTINS.md#hclfmt

@mochaaP mochaaP merged commit 3f917e6 into nvimtools:main Jul 24, 2024
4 checks passed
@Gaurang033
Copy link
Contributor Author

@mochaaP Thanks for merging the pull request. I created this pull request as terragrunt formatting is similar to terraform formatting. However, not sure if i missed something or i need to add something. but formatting is not working.

however, seems like the command is getting timed out. is there a way to fix this ?

[TRACE Wed 24 Jul 11:10:41 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:106: received LSP request for method textDocument/formatting
[TRACE Wed 24 Jul 11:10:41 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_FORMATTING
[DEBUG Wed 24 Jul 11:10:41 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:329: spawning command "terragrunt" at /Users/xxx/Documents/git/terraform-google-cloudfunctions with args { "hclfmt", "-" }
[TRACE Wed 24 Jul 11:12:51 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:207: error output: nil
[TRACE Wed 24 Jul 11:12:51 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:208: output: nil
[DEBUG Wed 24 Jul 11:12:51 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/loop.lua:170: command terragrunt timed out after 5000 ms
[TRACE Wed 24 Jul 11:12:58 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:106: received LSP request for method textDocument/formatting
[TRACE Wed 24 Jul 11:12:58 2024] /Users/xxx/.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_FORMATTING

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

Successfully merging this pull request may close these issues.

2 participants