diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index 8843cc46..2530d352 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -23,8 +23,11 @@ package = pkgs.typescript-language-server; lspConfig = '' lspconfig.ts_ls.setup { - capabilities = capabilities; - on_attach = attach_keymaps, + capabilities = capabilities, + on_attach = function(client, bufnr) + attach_keymaps(client, bufnr); + client.server_capabilities.documentFormattingProvider = false; + end, cmd = ${ if isList cfg.lsp.package then expToLua cfg.lsp.package @@ -79,6 +82,7 @@ ls_sources, null_ls.builtins.formatting.prettier.with({ command = "${cfg.format.package}/bin/prettier", + filetypes = { "typescript" }, }) ) '';