Comments (10)
Sorry, I didn't quite understand what's wrong here. How would I reproduce this?
from emacs.d.
Sorry, I didn't quite understand what's wrong here. How would I reproduce this?
I added the configuration in init-local.el.
(add-hook 'c-mode-common-hook 'eglot-ensure)
Then close all the c files, restart emacs, open C file will pop up this error.
from emacs.d.
Sorry, I didn't quite understand what's wrong here. How would I reproduce this?
Is my configuration incorrect?
But even if I don't use eglot. If I don't comment out the above lines (flymake-flycheck).
Opening the c project *Flymake diagnostic gives an error similar to the following:
The test project is xv6-riscv
1 9 error ( 'kernel/types.h' file not found [c/c++-clang]
from emacs.d.
Sorry, I didn't quite understand what's wrong here. How would I reproduce this?
I found that the value of flymake-diagnostic-functions
is different
flymake-check
does not open:
Its value is (eglot-flymake-backend)
When flymake-check
is on:
Its value is
(eglot-flymake-backend #f(compiled-function
(report-fn &rest _)
#<bytecode 0x5319205130afeb4>))
from emacs.d.
Yeah, I guess it's possible that if some flycheck backends are enabled, then they will be used via flymake-flycheck
alongside eglot
. I'll have a think about how to tackle this. In the meantime you can probably add unwanted flycheck backends to flycheck-disabled-checkers
.
from emacs.d.
Yeah, I guess it's possible that if some flycheck backends are enabled, then they will be used via
flymake-flycheck
alongsideeglot
. I'll have a think about how to tackle this. In the meantime you can probably add unwanted flycheck backends toflycheck-disabled-checkers
.
It's very effective. Thank you for your help.
(setq-default flycheck-disabled-checkers
(append (default-value 'flycheck-disabled-checkers)
'(c/c++-clang c/c++-gcc c/c++-cppcheck)))
from emacs.d.
Thanks for confirming that this helped you!
from emacs.d.
I also want to disable c/c++-clang
and enable eglot-flymake-backend
. I tried to put in init-local.el
(with-eval-after-load 'flycheck (add-to-list 'flycheck-disabled-checkers 'c/c++-clang))
as suggested in the link.
However, it does not work unless I delete (add-hook 'flymake-mode-hook 'flymake-flycheck-auto)
in init-flymake.el
and add it after (add-to-list 'flycheck-disabled-checkers 'c/c++-clang)
in init-local.el
.
I wonder if there is any way to reconcile without modifying anything in init-flymake.el
. I want to keep things synchronized with you and avoid corruption from my changes.
Another things is that after I disable c/c++-clang
in a dirty way, the backend eglot-flymake-backend
cannot be enabled automatically.Executing M-x flymake-running-backends
gives me nothing. I have to execute M-X eglot
in the buffer manually and eglot checker got invoked. Is there suggestions to overcome this step and make things consistent with flymake-flycheck
?
Many thanks!
Edited: It is not necessary to invoke
(add-hook 'flymake-diagnostics-functions 'eglot-flymake-backend nil t)
instead, I have to do
(add-hook 'c++-ts-mode-hook 'eglot-ensure)
(add-hook 'c++-mode-hook 'eglot-ensure)
from emacs.d.
@yszhang95 Thanks for the info. What do you mean by "the backend eglot-flymake-backend cannot be enabled automatically"? Do you mean when eglot is active in a project, and you open a new buffer, for example? I'm interested in how to reproduce this issue step-by-step specifically, because I'd like to fix it.
from emacs.d.
Thank you for the quick reply @purcell !
When I tried to prepare for a minimal example to reproduce, I found I have to include
(add-hook 'c++-ts-mode-hook 'eglot-ensure)
(add-hook 'c++-mode-hook 'eglot-ensure)
Sorry for the misleading question. I will update my last comment to avoid misleading others.
The remaining question is the first one, how to avoid corrupting your setup.
Best regards!
from emacs.d.
Related Issues (20)
- Got error message, about function of sanityinc/make-read-only, pp-display-expression in .el file in emacs 29.0.60 HOT 3
- Won't load after init-local.el is created and/or removed HOT 2
- Using wdired to change file name, got error message. HOT 6
- projectile configuration make projectile's candidate display error in emacs 29 HOT 3
- support for copilot HOT 2
- keybinding issues with paredit HOT 4
- Disable Parenthese and quote autocompletion when the cursor is just before a word or characters HOT 8
- Multiple Python flymake checkers HOT 4
- treesit config not load on startup HOT 1
- treesit-extra-load-path error when start emacs HOT 14
- Emacs says Symbol's function definition is void: setopt after updated to the latest version HOT 3
- Warning (treesit): Cannot activate tree-sitter, because language grammar for nix is unavailable (not-found) HOT 1
- Question on combining `eglot` + `nix` + `poetry` HOT 5
- symbol flymake-ruff-program is not bound
- M-X sly hits Error running timer: (void-function set-up-sly-hippie-expand) HOT 1
- Tidying up code HOT 1
- emacs Got Assertion failed: (derived-mode-p 'ibuffer-mode) HOT 5
- About the major-mode-remap-alist variable HOT 1
- org-mode cannot swap lists HOT 7
- Relocate init-preload-local HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs.d.