This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-27
Channels
- # announcements (4)
- # beginners (41)
- # biff (8)
- # cider (14)
- # clj-kondo (5)
- # clojure (45)
- # clojure-brasil (1)
- # clojure-europe (20)
- # clojure-nl (1)
- # clojure-norway (30)
- # clojure-uk (10)
- # clojurescript (8)
- # cursive (25)
- # datomic (20)
- # emacs (11)
- # events (1)
- # hoplon (9)
- # humbleui (7)
- # hyperfiddle (6)
- # lsp (63)
- # matrix (1)
- # observability (20)
- # off-topic (36)
- # polylith (11)
- # re-frame (2)
- # releases (1)
- # rewrite-clj (6)
- # scittle (42)
- # sql (6)
- # squint (86)
- # tools-deps (9)
has anyone else noticed that linting only gets applied post saving a file? I have this behavior since a day or so
If you copied and pasted the settings that I pasted you the other day, you may have (setq flycheck-check-syntax-automatically '(save mode-enabled))
? I think this makes flymake only actually run the linter when the file is saved?
that was terribly worded ... that's what I get for trying to type on slack during a meeting ... https://clojurians.slack.com/archives/C099W16KZ/p1700920735589559?thread_ts=1700910274.477479&cid=C099W16KZ ... that snippet sets flycheck to only check syntax on save, and I think that's how lsp-mode works? Does that make more sense?
@U0P0TMEFJ Ah so that was what was going on! I already wondered in #CPABC1H61 what got me into this new behavior! thanks!
@U0P0TMEFJ Do you know what linter is used in this lsp server and how to configure it? I assumed it was eslint, but no matter how I configure things it doesn't work
Syntax checkers for buffer index.ts<auth-service/src> in typescript-mode:
First checker to run:
lsp (explicitly selected)
- may enable: yes
- may run: t
Checkers that could run if selected:
javascript-eslint select
- may enable: yes
- executable: Found at /var/home/ed/bin/npx-eslint
- config file: found
typescript-tslint select
- may enable: yes
- executable: Found at /var/home/ed/bin/npx-tslint
- configuration file: Not found
Syntax checkers for buffer core.js in js2-mode:
First checker to run:
lsp (explicitly selected)
- may enable: yes
- may run: t
Checkers that are compatible with this mode, but will not run until properly configured:
javascript-eslint (automatically disabled) reset
- may enable: no
- executable: Not found
- config file: missing or incorrect
javascript-jshint (automatically disabled) reset
- may enable: no
- executable: Not found
- configuration file: Not found
javascript-standard (automatically disabled) reset
- may enable: no
- executable: Not found
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 33snapshot (package: 20230813.620)
Emacs version: 29.1
System: aarch64-apple-darwin21.6.0
Window system: mac
dunno ... but I've heard of deno ... https://deno.com/ ... so something to do with that????
how can I check this @UKFSJSM38 😆
what do you get @U0P0TMEFJ?
hmm I don't remember installing this server and it doesn't appear with lsp-uninstall-server
so it turns out that I have some things in my custom.el
'(flycheck-javascript-eslint-executable "~/bin/npx-eslint")
and
'(flycheck-typescript-tslint-executable "~/bin/npx-tslint")
that point at shell scripts that load the npm env from things like .nvmrc
files and run npx
inside the project - so I don't have to rely on switching node versions for different projects and so onbut I tend to try and avoid installing things globally - I'm a contractor and have to work on lots of different people's code bases - so I spin up containers with podman
for each client which lets me have many different dev envs on the same laptop (I use fedora silverblue which makes the whole thing a bit more straight forward 😉 )
here on this page it says: https://emacs-lsp.github.io/lsp-mode/page/lsp-eslint/ lsp-eslint-enable but I don't get this command...
https://github.com/emacs-lsp/lsp-mode/blob/a23433ae68c457f108de4e592df859ac005e1ecc/clients/lsp-eslint.el#L407 here is the function that checks that
I don't use those server installations via lsp-mode as well (especially because I'm a nix user), but a nice idea would be to follow the nix approach and have a way to declare in your config the servers you want installed and lsp-mode just install/uninstall it automatically or so, then you will have a way to control what you want installed and what not in a declarative way (like nix)
yeah ... I've been looking at this https://www.jetpack.io/devbox/ ... it looks like it does what silverblue's toolbox does, but with nix? ... not got around to trying it yet though 😉
I spin up an container for each contract I'm working on ... but that includes emacs every time - so if I'm working on 2 different things I have 2 emacs servers running (and need to specify a socket for them to communicate on) ... but they share my emacs config dir - so sometimes I've run 2 different emacs versions with the same ~/.emacs.d/
and come across compilation problems where packages work in one but not the other ... it happens rarely but it's a pain when it does happen
I use this to isolate things atm https://docs.fedoraproject.org/en-US/fedora-silverblue/toolbox/ ... the nix approach that the devbox thing uses seems like it could be nicer