-
Notifications
You must be signed in to change notification settings - Fork 200
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
Flymake bug with two backends (Was: Cannot get deno lsp working: missing field 'enable' error) #660
Comments
enable
deno lsp
working: missing field 'enable' error
deno lsp
working: missing field 'enable' errordeno lsp
working: missing field 'enable'
error
deno lsp
working: missing field 'enable'
error
Take a look at denoland/deno#9988 Judging from deno the manual you need to pass the See https://github.com/joaotavora/eglot/blob/master/README.md#handling-quirky-servers |
Got it to somehow work by following your suggestion: (add-to-list 'eglot-server-programs '((js-mode typescript-mode) . (eglot-deno "deno" "lsp")))
(defclass eglot-deno (eglot-lsp-server) ()
:documentation "A custom class for deno lsp.")
(cl-defmethod eglot-initialization-options ((server eglot-deno))
"Passes through required deno initialization options"
(list :enable t
:lint t)) However got an error:
|
Are you using the very latest Eglot? Can I get a backtrace? Thanks |
If I disable eglot-ensure it no longer complains :| |
Yes, but can you get it to complain and generate a backtrace using |
I installed it
is there a command for that or a buffer? |
I see I'm too slow to respond and you actually responded before I could reply, I'll try that |
I'm updating all my packages and it's taking a while, in the meantime this is the stacktrace I got:
I'll report back after I'm done updating |
Seems you are using "updating all your packages" is likely not to bring in the latest Eglot version, which is what we wanted. But if you don't know how to update a single package from Melpa, doing the brute-force Doom dance is all we got. Maybe it'll pick up a new package. Anyway, good luck. |
(and I don't anymore in the very latest Eglot version) |
why not?
I'm using straight in case that matters, I think doom also uses straight? |
Got a similar error after updating:
|
I've heard recently that Doom uses "version pinning" (in unrelated #596). |
I'm using last commit from 3 days ago f930a09 |
I'm not using Doom btw in case it wasn't clear |
ok seems like the deno issue got resolved and it has turned into a new one? |
I saw |
Seems so, yes. But let's continue here. I'm afraid my last commit (which you are indeed using), has broken something. Can you post a failing configuration that:
Thanks |
This is my flymake-eslint + eglot configuration (use-package flymake-eslint
:straight t
:config
(add-hook 'typescript-mode-hook (lambda () (flymake-eslint-enable)))
(add-hook 'js-mode-hook (lambda () (flymake-eslint-enable))))
(use-package eglot
:straight t
:hook ((js-mode typescript-mode) . 'eglot-ensure)
:config
(add-to-list 'eglot-server-programs '((js-mode typescript-mode) . (eglot-deno "deno" "lsp")))
(defclass eglot-deno (eglot-lsp-server) ()
:documentation "A custom class for deno lsp.")
(cl-defmethod eglot-initialization-options ((server eglot-deno))
"Passes through required deno initialization options"
(list :enable t
:lint t)))
do you mean create an empty init.el with only above? More: I'm using typescript-mode alone for coloring: (use-package typescript-mode
:straight t
:mode "\\.tsx\\'") |
Yes, but maybe it's not necessary. I briefly reproduced your situation, but now I can't anymore. Are you sure everything works OK without the |
@danielpza I can't reproduce this. My guess it that you need to ensure you don't have stale .elc files. I tried your sandbox, removed the Another note. Are you sure your sandbox/setup is doing what you want? Without adding On yet another note, there is no I recommend adding (use-package eglot
:straight t
:hook ((js-mode typescript-mode) . 'eglot-ensure)
:config
(add-hook 'js-mode-hook
(lambda ()
(setq-local eglot-stay-out-of '(flymake))
(add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t)))
(defclass eglot-deno (eglot-lsp-server) ()
:documentation "A custom class for deno lsp.")
(cl-defmethod eglot-initialization-options ((server eglot-deno))
"Passes through required deno initialization options"
(list :enable t
:lint t))) |
Any news on this @danielpza ? I've been using eslint and |
I've been busy with work lately, I'll take some time to reproduce the issue in an isolated environment, we can keep it closed until then. Thanks for the work |
I'm trying to configure eglot with deno lsp. I didn't find any issues related to the error message so I guess it has to do with my eglot configuration.
.dirs-locals.el:
(eglot-events-buffer):
The text was updated successfully, but these errors were encountered: