Author Topic: Code completion using LSP and clangd  (Read 193897 times)

Offline blauzahn

  • Almost regular
  • **
  • Posts: 173
Re: Code completion using LSP and clangd
« Reply #435 on: May 14, 2024, 09:26:51 pm »
meaningful workflow during editing/debugging should be the guide to visual appearance.

@ollydbg: What is your take on this? For how long do both markers compete for the spot in your projects? Do either markers last that long that it really matters?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5922
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code completion using LSP and clangd
« Reply #436 on: Yesterday at 12:03:28 am »
meaningful workflow during editing/debugging should be the guide to visual appearance.

@ollydbg: What is your take on this? For how long do both markers compete for the spot in your projects? Do either markers last that long that it really matters?

I prefer Pecan's method "I can change it to a small right pointing arrow that fits inside any other marker".

I use C::B for my daily work, and some of the clangd_client warnings come from third part library's source code, so those warnings will last for a long time.

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2784
Re: Code completion using LSP and clangd
« Reply #437 on: Yesterday at 06:10:46 pm »

I prefer Pecan's method "I can change it to a small right pointing arrow that fits inside any other marker".

Commit HEAD 13521:
Clangd_client warning margin marker changed to a small right pointing arrow.
« Last Edit: Today at 02:31:21 am by Pecan »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5922
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code completion using LSP and clangd
« Reply #438 on: Today at 02:45:26 pm »

I prefer Pecan's method "I can change it to a small right pointing arrow that fits inside any other marker".

Commit HEAD 13521:
Clangd_client warning margin marker changed to a small right pointing arrow.

Hi, thanks.

I just tried this latest revision.

There is still one issue, clangd error and breakpoint happens in the same line. Still they have the same size. One is circle, and the other is a square.

I can't reproduce a clangd warning easily.  :(

see below image shot:

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2784
Re: Code completion using LSP and clangd
« Reply #439 on: Today at 08:27:55 pm »
Hi, thanks.
I just tried this latest revision.

There is still one issue, clangd error and breakpoint happens in the same line. Still they have the same size. One is circle, and the other is a square.

I can't reproduce a clangd warning easily.  :(

see below image shot:

Same with legacy CC . It's always been that way.
I'd have to change legacy CC use of cbEditor to do anything about that.
I'd prefer not changing legacy CC if I can avoid it.

For me, an obvious code  error (red square) should be corrected before debugging occurs. When the error is corrected, the debugger circle appears.

Also you can always use the "Debugging windows" icon (top line main menu, left of info icon) to see your breakpoints listed.

I really do not know how to solves this situation without changing the legacy CC interface (cbeditor) for current users.
Legacy CC is used way more than clangd_client.

Suggestions accepted.
« Last Edit: Today at 08:31:17 pm by Pecan »