Skip to content

Cannot disable formatting capabilities #81

@TisnKu

Description

@TisnKu

Tsserver format conflicts with prettier, so I need to disable it. However previous way to disable it does not work. I can only modify the capabilities.lua file in this repo to make it work.

My configuration:

  use({
    "pmizio/typescript-tools.nvim",
    requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
    config = function()
      require("typescript-tools").setup {
        on_attach = function(client)
          client.server_capabilities.documentFormattingProvider = false
          client.server_capabilities.documentRangeFormattingProvider = false
        end,
        settings = {
          tsserver_max_memory = 8092,
          separate_diagnostic_server = false,
        }
      }
    end,
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions