lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

How to define a hotkey to show/hide Saga / LSP output?

Open matejsarlija opened this issue 2 years ago • 2 comments

Hi, I'm a total newb, trying to set up an neovim IDE for myself for a Ruby project, is there a setting to "hide" diagnostics output from rubocup/solargraph?

As I understand it from your sample config from here and from the very helpful https://anchietajunior.hashnode.dev/neovim-lsp-commands-lsp-saga-configuration-and-functionalities there is "show line diagnostics" and "show cursor diagnostics", and they all work just dandy, but how do I hide the output unless I want it shown?

Best Matej

matejsarlija avatar Jan 19 '22 19:01 matejsarlija

I have this in my configuration, not sure how you would go about to toggle these, maybe a function that refer to a variable, anyway,

cmd("DiagnosticEnable", "lua vim.diagnostic.enable(0)")
cmd("DiagnosticDisable", "lua vim.diagnostic.disable(0)")
command! DiagnosticEnable lua vim.diagnostic.enable(0)
command! DiagnosticDisable lua vim.diagnostic.disable(0)

feel free to dig deeper.

kkharji avatar Jan 19 '22 19:01 kkharji

Thanks, I'll give it a look.

matejsarlija avatar Jan 20 '22 11:01 matejsarlija