As far as I can tell the term for that feature is inline diagnostics. I don't see any obvious source (like neovim help) for an answer to how to disable it but I found these two possible solutions:
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
virtual_text = false
Source: How to disable inline buffer error messages?
lua << EOF
local nvim_lsp = require'nvim_lsp'
-- Disable Diagnostcs globally
vim.lsp.handlers["textDocument/publishDiagnostics"] = function() end
Source: [Neovim LSP] How to disable diagnostics?
Note: I modified the second answer slightly as the original used a deprecated variable name.
Update: Feedback from OP as follows...
The first solution removes the inline diagnostics. You can get diagnostics in a floating window with command
The GitHub page for LSP client configuration shows this mapping for that command:
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
Finally, apparently the first solution above can also be found here: