-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add defcustom for syntax checker to use. #29
base: main
Are you sure you want to change the base?
Conversation
e46ae55
to
c8ab4c7
Compare
Defaults to existing flymake but can be overridden with flycheck. For example using use-package or regular customize. (use-package ocaml-eglot :custom (setq ocaml-eglot-syntax-checker 'flycheck))
c8ab4c7
to
4f48cfd
Compare
@@ -33,6 +33,7 @@ | |||
;;; Code: | |||
|
|||
(require 'flymake) | |||
(require 'flycheck) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea to require flycheck here, as it's not installed by default. If someone's using flycheck it will likely be already loaded by the time ocaml-eglot
gets loaded, so you can just declare whatever functions from it are going to be used here to silence the byte-compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not (yet!) really familiar with scope presence and require.
What's the best way to avoid relying on flycheck
by default? Is it possible, at the ocaml-eglot
level to behave differently if flycheck
is installed and ideally to rely on additional behavior in case of flycheck-eglot
?
I'm guessing if someone's using Flycheck with Eglot it's a good idea to mention https://github.com/flycheck/flycheck-eglot, so it replaces Flymake everywhere. |
Makefile
Outdated
@@ -1,6 +1,6 @@ | |||
# Space-separated list of the dependencies of your project (include | |||
# package-lint and/or buttercup if you want makel to use these tools): | |||
ELPA_DEPENDENCIES=package-lint | |||
ELPA_DEPENDENCIES=package-lint,flycheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple items should be separated by spaces, not commas. (that's why the CI is failing)
That being said - I don't think it's a good idea to add flycheck here.
Also it's the maintainers might want to check out some Emacs-specific build tool like Eldev that can simplify things like linting, running tests, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Makel
because @DamienCassou very kindly answered my naive questions about Emacs :) However, I am open to any alternative (or complementary proposal)!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emacs-specific build tool like Eldev that can simplify things like linting, running tests, etc.
@bbatsov: makel is definitely Emacs-specific and can simplify things like linting and running tests. I'm not saying it's the only or best option though. It's just mine and I use it in all my projects. makel's README suggests alternative options if you don't like it.
@bbatsov thanks for the comments. I basically did the minimal thing here, but it would be cleaner to conditionally depend on |
Defaults to existing flymake but can be overridden with flycheck. For example using use-package or regular M-x customize. As suggested in #28
This will override syntax checking so it doesn't try using flymake.