Lsp disable autostart message

I have a LSP for AngualrLS configured for my project. Recently I updated things I now I see a message printed when angualrls can’t start

Autostart for angularls failed: matching root directory not detected.
Autostart for angularls failed: matching root directory not detected.
Press ENTER or type command to continue

Is there a way to silence this?

That’s just the warning message (from lspconfig) saying we couldn’t autostart angularls because we can’t detect the requisite project structure. How would you prefer we display the message? Is it just the enter prompt that is bothersome?

The “enter” prompt is for sure a pain, but would rather not see the message at all. If it can’t detect the workspace root, my thought would be that it just quietly skip the lsp all together, vs notifying me.

IMO it should only print something if there is an actual error.

Yeah, but on the flip side historically we have had users complain that lspconfig silently failed to start their language servers

Maybe a good middle ground would be to have an option to toggle the logging?

local lspconfig = require "lspconfig"
lspconfig.util.default_config = vim.tbl_extend( "force", lspconfig.util.default_config, { logging = false })

What’s the situation in which you would have angular configured in your config but would not want a warning that it can’t start on the current project?

I have angular configured for the typescript, but also tsserver configured. So I typically want tsserver always, and angular-ls only if I’m in an angular project. If i’m not in an angular project, just skip the server