• 2 Posts
  • 17 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle













  • For the sake of sharing… I took your idea and found this worked just fine:

    TroubleMode = "workspace_diagnostics"
    
    local function cycle_trouble_mode()
    	local trouble = require("trouble")
    
    	local modes = {
    		"document_diagnostics",
    		"workspace_diagnostics",
    		"lsp_references",
    		"lsp_definitions",
    		"lsp_type_definitions",
    		"quickfix",
    		"loclist",
    	}
    
    	if trouble.is_open() then
    		local function get_next_mode(mode)
    			local next_index = 1
    			for i = 1, #modes do
    				if modes[i] == mode then
    					next_index = i == #modes and 1 or i + 1
    				end
    			end
    			return modes[next_index]
    		end
    
    		TroubleMode = get_next_mode(TroubleMode)
    		trouble.toggle(TroubleMode)
    	end
    end
    





  • I had an issue running Arch on a Surface Pro 3 a while back where Wifi would drop after some hours - I couldn’t ping or SSH in but the device itself could reach the internet.

    I found a post mentioning Wifi power saving mode and disabled it, and it fixed the issue for me. I’ll look and see if I can’t find it, and update here if it looks relevant to you.

    Also, I would definitely try with your laptop wired instead of wireless if you can.