Autoformat using first option (disable formatting on tsserver)

Hi friends i recently updated to neovim 0.7 and latest verison of lspconfig

i use efm (eslint+prettier) and tsserver

When i format a file i want to use efm, however im always presented with both options. Is there a way i can get it to always format using efm rather than tsserver?

image

I had this in my config to disable formatting on tsserver but it does not seem to work anymore with the new versions

require'lspconfig'.tsserver.setup{
  on_attach = function(client)
    client.resolved_capabilities.document_formatting = false
  end,
}

Since this comes up often there is :

just switched to nightly and got the same problem.

I changed to this:

client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false

Found in this doc: Specification

1 Like