lsp
lsp copied to clipboard
Code action seems to be dependent on diagnostic errors warnings
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 */
};
I just realized that it works when I hover over the class declaration
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?