lsp icon indicating copy to clipboard operation
lsp copied to clipboard

Code action seems to be dependent on diagnostic errors warnings

Open jclsn opened this issue 3 months ago • 1 comments

I realized that code actions are not always offered. clangd for example should offer the code action Declare implicit copy/move member here. With the following snippet it doesn't do that. It only works if you insert an error by e.g. removing a parenthesis.

#pragma once

class test
{
    public:
        test();
        virtual ~test ();
    private:
        /* private data */

};
Image

jclsn avatar Sep 04 '25 07:09 jclsn

I just realized that it works when I hover over the class declaration

Image

In e.g. coc.nvim this works anywhere in the class block. I wonder why lsp behaves differently here. Shouldn't these things be defined by clangd?

jclsn avatar Sep 04 '25 07:09 jclsn