Compare commits

..

3 commits

Author SHA1 Message Date
raf
9e95859151
Merge pull request #789 from horriblename/tsx-lint-conform
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
language/ts: add conform and lint rules for tsx
2025-04-05 19:00:24 +00:00
Ching Pei Yang
cb1d127d2f docs: update release notes 2025-04-05 15:55:14 +02:00
Ching Pei Yang
b7c08147e0 language/ts: add conform and lint rules for tsx 2025-04-05 15:55:14 +02:00
2 changed files with 9 additions and 3 deletions

View file

@ -106,6 +106,7 @@
- Add [blink.cmp] support. - Add [blink.cmp] support.
- Add `LazyFile` user event. - Add `LazyFile` user event.
- Migrate language modules from none-ls to conform/nvim-lint - Migrate language modules from none-ls to conform/nvim-lint
- Add tsx support in conform and lint
[diniamo](https://github.com/diniamo): [diniamo](https://github.com/diniamo):

View file

@ -204,9 +204,13 @@ in {
(mkIf cfg.format.enable { (mkIf cfg.format.enable {
vim.formatter.conform-nvim = { vim.formatter.conform-nvim = {
enable = true; enable = true;
setupOpts.formatters_by_ft.typescript = [cfg.format.type]; setupOpts = {
setupOpts.formatters.${cfg.format.type} = { formatters_by_ft.typescript = [cfg.format.type];
command = getExe cfg.format.package; # .tsx files
formatters_by_ft.typescriptreact = [cfg.format.type];
formatters.${cfg.format.type} = {
command = getExe cfg.format.package;
};
}; };
}; };
}) })
@ -215,6 +219,7 @@ in {
vim.diagnostics.nvim-lint = { vim.diagnostics.nvim-lint = {
enable = true; enable = true;
linters_by_ft.typescript = cfg.extraDiagnostics.types; linters_by_ft.typescript = cfg.extraDiagnostics.types;
linters_by_ft.typescriptreact = cfg.extraDiagnostics.types;
linters = mkMerge (map (name: { linters = mkMerge (map (name: {
${name}.cmd = getExe diagnosticsProviders.${name}.package; ${name}.cmd = getExe diagnosticsProviders.${name}.package;