This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-10
Channels
- # announcements (6)
- # architecture (2)
- # babashka (30)
- # beginners (90)
- # calva (21)
- # cider (22)
- # clj-kondo (27)
- # cljs-dev (7)
- # clojure (132)
- # clojure-europe (51)
- # clojure-nl (12)
- # clojure-norway (3)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (69)
- # cloverage (9)
- # conjure (5)
- # core-async (54)
- # cursive (14)
- # datomic (34)
- # emacs (7)
- # fulcro (10)
- # graalvm (40)
- # graalvm-mobile (2)
- # gratitude (2)
- # improve-getting-started (1)
- # introduce-yourself (1)
- # jobs-discuss (61)
- # leiningen (5)
- # malli (6)
- # off-topic (59)
- # pathom (11)
- # polylith (38)
- # reagent (3)
- # reitit (3)
- # rewrite-clj (3)
- # shadow-cljs (53)
- # tools-build (35)
- # transit (8)
- # vim (62)
- # web-security (26)
- # xtdb (4)
I was kind’o hoping that it would resolve itself automatically, but I seem to have a regression that Calva/ClojureLSP does not automatically put a namespace form in new files anymore. This was broken end of last year and then fixed but now it seems to be broken again?
I’ll try @UKFSJSM38. It’s a polylith repo by the way.
This is the clojure-lsp trace when I make a file (and the ns is not inserted):
[Trace - 9:19:11 AM] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///Users/redacted/development/src/dev/foo.clj",
"languageId": "clojure",
"version": 1,
"text": ""
}
}
[Trace - 9:19:11 AM] Sending request 'textDocument/documentSymbol - (135)'.
Params: {
"textDocument": {
"uri": "file:///Users/redacted/development/src/dev/foo.clj"
}
}
[Trace - 9:19:11 AM] Sending request 'textDocument/semanticTokens/full - (136)'.
Params: {
"textDocument": {
"uri": "file:///Users/redacted/development/src/dev/foo.clj"
}
}
[Trace - 9:19:11 AM] Received response 'textDocument/documentSymbol - (135)' in 11ms.
Result: [
{
"name": "/Users/redacted/development/src/dev/foo.clj",
"kind": 21,
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 999999,
"character": 999999
}
},
"selectionRange": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 999999,
"character": 999999
}
},
"children": []
}
]
[Trace - 9:19:11 AM] Received response 'textDocument/semanticTokens/full - (136)' in 12ms.
Result: {
"data": []
}
[Trace - 9:19:11 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///Users/redacted/development/src/dev/foo.clj",
"diagnostics": []
}
[Trace - 9:19:11 AM] Sending request 'textDocument/codeLens - (137)'.
Params: {
"textDocument": {
"uri": "file:///Users/redacted/development/src/dev/foo.clj"
}
}
[Trace - 9:19:11 AM] Sending request 'textDocument/codeLens - (138)'.
Params: {
"textDocument": {
"uri": "file:///Users/redacted/development/src/dev/foo.clj"
}
}
[Trace - 9:19:11 AM] Received response 'textDocument/codeLens - (137)' in 12ms.
Result: []
[Trace - 9:19:11 AM] Received response 'textDocument/codeLens - (138)' in 11ms.
Result: []
[Trace - 9:19:11 AM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {
"changes": [
{
"uri": "file:///Users/redacted/development/src/dev/foo.clj",
"type": 1
}
]
}
Yeah! I think we stumbled upon the issue. We’re using a polylith repo, and I had the dev project configured incorrectly: I had included all components as :local/root
deps in :extra-deps
. I changed it to use the :extra-paths
prescribed method instead, and now the automatic namespaces are working again. 🎉
Maybe that helps you somehow as well @U0773UB6D?
The good news are, probably this will not be a issue next clojure-lsp release as we will use the classpath to find source-paths
Has anyone else on a mac noticed a second vscode icon showing up in their dock and cmd+tab menu? I think it’s the LSP, but it’s hard to tell. I assume that’s not intentional?
Calva launches a clojure-lsp process indeed but I don't think it's clojure-lsp since it has no visual ui, quite odd indeed
Going down the rabbit hole identified the Spell Right extension as the culprit. Sorry for the false alarm!
I had this same problem, same extension. I wonder what the problem with it is
looks like it’s tracked, but the maintainers have not responded: https://github.com/bartosz-antosik/vscode-spellright/issues/465