Code Monkey home page Code Monkey logo

Comments (2)

WhoIsSethDaniel avatar WhoIsSethDaniel commented on July 19, 2024

I can't duplicate this. Do you have somewhere where I can look at your configuration?

Also, what version of nvim are you using?

from toggle-lsp-diagnostics.nvim.

savchenko avatar savchenko commented on July 19, 2024

Sorry, I have replaced this plugin with a small Lua snippet. Likely to be of no use, but just for context:

    { -- Underline error display
        url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
        config = function()

            local lsp_lines = require('lsp_lines')
            local counter = 0

            local ll_toggle = function() -- Flip between diag. types
                if counter == 0 then
                    vim.diagnostic.config({ virtual_text = false, virtual_lines = false })
                    vim.api.nvim_echo({{ "Diagnostic in code turned OFF", "Comment" }}, true, {})
                    counter = counter + 1
                elseif counter == 1 then
                    vim.diagnostic.config({ virtual_text = false, virtual_lines = true })
                    vim.api.nvim_echo({{ "Underline diagnostics", "Comment" }}, true, {})
                    counter = counter + 1
                elseif counter == 2 then
                    vim.diagnostic.config({ virtual_text = { prefix = '' }, virtual_lines = false })
                    vim.api.nvim_echo({{ "Inline diagnostics", "Comment" }}, true, {})
                    counter = 0
                end
            end

            lsp_lines.setup()

            vim.keymap.set("", "<leader>te",
                ll_toggle, { desc = "Toggle LSP diagnostics" }
            )

            ll_toggle() -- Disable by default
        end
    }

from toggle-lsp-diagnostics.nvim.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.