ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.01k stars 56 forks source link

Disable for specific filetype #277

Closed crisidev closed 1 year ago

crisidev commented 1 year ago

Hello, amazing plugin you have here! Thanks a lot.

I have lsp_signature enabled via lazy.nvim on lunarvim like this:

{
    "ray-x/lsp_signature.nvim",
    config = function()
        require("user.lsp.signature").config()
    end,
    ft = { "typescript", "javascript", "lua", "c", "cpp", "go", "python", "java", "rust" },
    event = { "BufRead", "BufNew" },
}

If I open a Kotlin file, I see the plugin is still enabled for this filetype and it starts spamming on my :messages a very long json struct starting with this error: https://github.com/ray-x/lsp_signature.nvim/blob/17ff7a405fea8376b015b8ea7910d2e59958bf68/lua/lsp_signature/init.lua#L289

I am wondering if there is a way to completely disable lsp_signature for a specific filetype, it seems just doing it with lazy.nvim does not work. If this is not possible, would you be open to remove the print above and just log the error so it does not pollute :messages?

ray-x commented 1 year ago

Will event = { "BufRead", "BufNew" }, enable the plugin on BufRead?

crisidev commented 1 year ago

Hum.. you are probably right, the event supersedes the filetype. I'll test this ASAP and report back. Thanks for the help and sorry if the issue does not really apply to your plugin.

crisidev commented 1 year ago

I confirm the issue was in mixing up event and filetype. Sorry for the confusion.