folke / neodev.nvim

💻 Neovim setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API.
Apache License 2.0
2.02k stars 57 forks source link

Don't show "diagnosing..." status #7

Closed p00f closed 3 years ago

p00f commented 3 years ago

Hello, thanks for this plugin, very helpful. There's a minor inconvenience - without this plugin, I only get loading status

image

with this plugin, I get "Diagnosing \<file>" status too:

image

This spams my statusline every time I make an edit, how do I disable this? (Setting settings.Lua.window.progressBar in lspconfig to false disables loading status too, although I've done this for now)

I use https://github.com/tjdevries/express_line.nvim with https://github.com/nvim-lua/lsp-status.nvim

p00f commented 3 years ago

My lsp setup is

local function on_init(client)
    client.config.flags = {}
    if ("flags")[client.config] then
        client.config.flags["allow_incremental_sync"] = true
        return nil
    end
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
local on_attach = require("lsp-status").on_attach
local diag_handler = {
    ["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
        severity_sort = true,
        underline = true,
        update_in_insert = false,
        virtual_text = { prefix =  " 🞶" },
    }),
}
local luadev = require("lua-dev").setup({
    lspconfig = {
        capabilities = capabilities,
        cmd = {
            vim.fn.expand("/home/p00f/bin/lua-language-server/bin/Linux/lua-language-server"),
            "-E",
            vim.fn.expand("/home/p00f/bin/lua-language-server/main.lua"),
        },
        handlers = diag_handler,
        on_attach = on_attach,
        on_init = on_init,
        settings = {
            Lua = {
                completion = { keywordSnippet = true },
                diagnostics = { globals = { "vim", "wezterm" } },
                telemetry = { enable = true },
                workspace = { preloadFileSize = 170 },
            },
        },
    },
})
lspconfig.sumneko_lua.setup(luadev)
folke commented 3 years ago

I don't do anything special here. Not sure what you are experiencing differently. You probably had the diagnosing messages before, but there might be more now, because of the added plugins to your workspace?

But again, I didn't change any settings

p00f commented 3 years ago

In the second screenshot it says diagnosing for the current file while there's nothing in the first one

But again, I didn't change any settings

:neutral_face: fair