This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-24
Channels
- # announcements (22)
- # babashka (33)
- # babashka-sci-dev (161)
- # beginners (25)
- # calva (57)
- # cider (6)
- # clara (6)
- # clerk (14)
- # clj-kondo (24)
- # clojars (10)
- # clojure (65)
- # clojure-austin (1)
- # clojure-conj (2)
- # clojure-europe (23)
- # clojure-miami (3)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-uk (3)
- # clojurescript (28)
- # cursive (24)
- # datomic (136)
- # emacs (38)
- # graalvm (29)
- # graphql (3)
- # introduce-yourself (8)
- # jackdaw (4)
- # jobs-discuss (9)
- # malli (5)
- # nbb (36)
- # off-topic (11)
- # pathom (58)
- # polylith (2)
- # practicalli (1)
- # re-frame (5)
- # reagent (11)
- # releases (1)
- # remote-jobs (8)
- # sci (15)
- # shadow-cljs (31)
- # slack-help (2)
- # spacemacs (11)
- # sql (7)
- # tools-build (9)
I reinstalled emacs, and something is off. The static linting I get seems to be ignoring my project’s .clj-kondo/config.edn file. I have been tracking down a way to pass it into clojure-lsp but I don’t think there’s a way to do that. Maybe it’s flycheck-clj-kondo? What can I use to track this down? I’ve read a bunch of docs, but no leads.
Clojure-lsp uses kondo under the hood which will check your local kondo config file as well
That sounds more like a wrong project-root so you can lsp-clojure-server-info and confirm project root is correct
Hmm, still getting :project-root-uri "file:///Users/me/dv"
. When I select the project with projectile, then select a clojure file, I see that those dirs are recreated in dv.
LSP :: Connected to [clojure-lsp:82189/starting].
LSP :: clojure-lsp:82189 initialized successfully in folders: (/Users/bcm/dv)
as for flycheck-clj-kondo or flycheck-lsp. How do I check?
I can say that lsp-ui-flycheck-list
shows me the errors (that should be correct).
I removed all .clj-kondo dirs from , /a, /a/b, /a/b/c. (project is in ~/a/b/c/project). no luck.
tried symlinking in my .lsp/.clj-kondo dirs, and editing lsp-clojure-server-command. but not luck.
Here’s the log:
2023-01-24T03:07:19.640Z INFO [clojure-lsp.server:601] - [SERVER] Starting server...
2023-01-24T03:07:19.641Z DEBUG [clojure-lsp.nrepl:21] - nrepl not found, skipping nrepl server start...
2023-01-24T03:07:19.642Z INFO [clojure-lsp.server:486] - Initializing...
2023-01-24T03:07:19.643Z INFO [clojure-lsp.startup:122] - Folder /Users/bcm/dv/.clj-kondo not found, creating for necessary clj-kondo analysis...
2023-01-24T03:07:19.643Z ERROR [clojure-lsp.db:73] - [DB] No cache DB file found
2023-01-24T03:07:19.643Z INFO [clojure-lsp.db:66] - [DB] Reading transit analysis cache from /Users/bcm/dv/.lsp/.cache/db.transit.json db took 0ms
2023-01-24T03:07:19.649Z INFO [clojure-lsp.classpath:103] - Finding classpath via `/opt/homebrew/bin/clojure -A:test:dev -Spath`
2023-01-24T03:07:23.974Z DEBUG [clojure-lsp.classpath:115] - Classpath found, paths: ["test" "src" "/Users/bcm/.m2/repository/com/github/askonomm/clarktown/2.0.0/clarktown-2.0.0.jar" "/Users/bcm/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar" "/Users/bcm/.m2/repository/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar" "/Users/bcm/.m2/repository/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar"]
2023-01-24T03:07:23.975Z INFO [clojure-lsp.source-paths:85] - [Startup] Using source-paths from classpath: ["/Users/bcm/dv/src" "/Users/bcm/dv/test"]
2023-01-24T03:07:23.975Z INFO [clojure-lsp.startup:114] - Copying kondo configs from classpath to project if any...
2023-01-24T03:07:23.989Z WARN [clojure-lsp.kondo:305] - Non-fatal error from clj-kondo: No configs copied.
2023-01-24T03:07:23.989Z INFO [clojure-lsp.startup:116] - Copied kondo configs, took 14ms secs.
2023-01-24T03:07:23.989Z INFO [clojure-lsp.startup:86] - Analyzing classpath for project root #object[sun.nio.fs.UnixPath 0x5ef1b182 "/Users/bcm/dv"]
2023-01-24T03:07:23.990Z INFO [clojure-lsp.kondo:332] - Analyzing 4 paths with clj-kondo
2023-01-24T03:07:24.482Z WARN [clojure-lsp.kondo:305] - Non-fatal error from clj-kondo: No configs copied.
try touch ~/dv/b/c/project/.projectile
and deleting all the lsp and kondo caches higher up the tree
I’ve had issues with projectile and lsp in monorepos where it would focus on the .git root instead of the inner project. I’ve found the empty .projectile
as a duct tape solution to telling it where the root is. Note: you need to make sure all other caches will be gone else you may not see the expected result in testing
LSP project root is different than projectile one.
try lsp-workspace-folders-remove
to remove the wrong one, then lsp
and choose the correct root when lsp-mode prompts
lsp-workspace-folders-remove
fixed it! Thanks @UKFSJSM38 and thanks for helping, @U05476190.
getting it for this usage, which seems wrong
(ns enterprise.routes.status
(:require [health-check]
[enterprise.system :as-alias system]
[next.jdbc :as jdbc]))
(set! *warn-on-reflection* true)
(defn health-checker
[{::system/keys [db]}]
(health-check/health-checker
{:db (fn []
(jdbc/execute! db ["SELECT 1;"])
{:healthy true})}))
(defn routes
[system]
[""
(health-check/reitit-route (health-checker system))])