SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
940 stars 13 forks source link

[C++] CppCheck conflicts with clangd #288

Closed ghost closed 4 months ago

ghost commented 4 months ago

I opened a C++ source file. The report is from CppCheck, but mouse hovering gets the result from clangd.

ghost commented 4 months ago

I realized that it's not that CppCheck is conflicting with clangd. But I don't want to have the editor run the linter automatically when I open the C++ source file. How can I customize it?

SpartanJ commented 4 months ago

Disable the linter for that particular language, you need to go to the Plugins Manager -> select the Linter plugin, "Preferences" and add "cpp" to "disable_languages", this is my config for example (I also disable cppcheck because it's stupid slow for my projects):

{
  "config": {
    "delay_time": "500ms",
    "disable_languages": [
      "cpp"
    ],
    "disable_lsp_languages": [
      "lua"
    ],
    "enable_error_lens": true,
    "enable_lsp_diagnostics": true,
    "goto_ignore_warnings": true
  },
  "keybindings": {
    "linter-go-to-next-error": "mod+shift+n",
    "linter-go-to-previous-error": "mod+shift+alt+n"
  },
  "linters": []
}
ghost commented 4 months ago

This will disable the linter completely. I want to be able to run the linter, but not automatically when I open the C++ source file. Please give me more control.

SpartanJ commented 4 months ago

Is there any editor allowing to do that? I would like to see how they solve the UI/UX. I find it very bad UX given that text buffer can be modified anytime.