Merge pull request #1234 from valyntyler/ts.format

languages/ts: fix formatting for javascript files
This commit is contained in:
raf 2025-11-19 23:21:51 +03:00 committed by GitHub
commit 913dd0dd41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -596,4 +596,5 @@
[emmet-ls]: https://github.com/aca/emmet-ls
- Enable `languages.ts.format` for `.js` files
- Add [emmet-ls] to `html.lsp.servers`

View file

@ -300,9 +300,12 @@ in {
vim.formatter.conform-nvim = {
enable = true;
setupOpts = {
formatters_by_ft.typescript = cfg.format.type;
# .tsx files
formatters_by_ft.typescriptreact = cfg.format.type;
formatters_by_ft = {
typescript = cfg.format.type;
javascript = cfg.format.type;
# .tsx/.jsx files
typescriptreact = cfg.format.type;
};
setupOpts.formatters =
mapListToAttrs (name: {
inherit name;