This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-23
Channels
- # announcements (16)
- # asami (4)
- # babashka (49)
- # beginners (70)
- # calva (25)
- # clojars (3)
- # clojure (40)
- # clojure-europe (82)
- # clojure-france (15)
- # clojure-gamedev (16)
- # clojure-nl (2)
- # clojured (7)
- # clojurescript (13)
- # conjure (11)
- # cursive (4)
- # data-science (12)
- # datalevin (2)
- # figwheel-main (5)
- # gratitude (5)
- # honeysql (5)
- # hyperfiddle (4)
- # jobs (4)
- # joyride (3)
- # lsp (10)
- # malli (2)
- # missionary (14)
- # nbb (2)
- # off-topic (3)
- # pathom (16)
- # rdf (5)
- # releases (4)
- # sci (35)
- # shadow-cljs (16)
- # tools-deps (22)
- # xtdb (7)
I saw you found your way to #joyride. 😃 I didn't even know you could disable line numbers targeting just one editor, but this does the trick:
(set! (.-lineNumbers vscode/window.activeTextEditor.options) 0)
yep ty, i've subscribed to a document open event and disabled line numbers for the repl
Github Copilot is cool and works with both Clojure and ClojureScript. However, doesn't play well with Calva yet. Issue here: https://github.com/BetterThanTomorrow/calva/issues/1781
I am having quite a strange issue with Calva/Clojure-lsp as far as I can tell. While looking up the definition of a function, it does not respect the source paths defined in .lsp/config.edn It does respect the source paths when looking up usages. So to take it to the extreme case, I removed all source paths, and below are the results. If anyone could shed some light on how to go about debugging this, it would be greatly appreciated. (I have been sifting through the Clojure Language Client output to gleam anything of use, but no success yet.)
Just to expand on the above, I am new to calva, so could be missing a simple answer, and I am using VS Code's remote development via ssh setup.
Could you try latest release from yesterday or make sure calva is using it? We fixed a issue about target folder
Okay, so with
"server-version": "2022.06.22-14.09.50",
The issue still seems to occur.
That being said, having tried locally, I cannot reproduce the issue.
(It correctly identifies that it cannot find any definitions)
Here is the output from the clojure language client in each case:
Remote:
[Trace - 14:58:05] Sending request 'textDocument/definition - (67)'.
Params: {
"textDocument": {
"uri": "file:///data/home/robert/storage/web-server/src/api/printer/directprint.clj"
},
"position": {
"line": 10,
"character": 17
}
}
[Trace - 14:58:05] Received response 'textDocument/definition - (67)' in 2ms.
Result: {
"uri": "file:///data/home/robert/storage/web-server/src/api/printer/directprint.clj",
"range": {
"start": {
"line": 10,
"character": 6
},
"end": {
"line": 10,
"character": 17
}
}
}
[Trace - 14:58:05] Sending request 'textDocument/references - (68)'.
Params: {
"textDocument": {
"uri": "file:///data/home/robert/storage/web-server/src/api/printer/directprint.clj"
},
"position": {
"line": 10,
"character": 17
},
"context": {
"includeDeclaration": true
}
}
[Trace - 14:58:05] Received response 'textDocument/references - (68)' in 49ms.
Result: [
{
"uri": "file:///data/home/robert/storage/web-server/src/api/printer/directprint.clj",
"range": {
"start": {
"line": 10,
"character": 6
},
"end": {
"line": 10,
"character": 17
}
}
},
{
"uri": "file:///data/home/robert/storage/web-server/target/classes/api/printer/directprint.clj",
"range": {
"start": {
"line": 10,
"character": 6
},
"end": {
"line": 10,
"character": 17
}
}
}
]
[Trace - 14:58:05] Sending request 'textDocument/references - (69)'.
Params: {
"textDocument": {
"uri": "file:///data/home/robert/storage/web-server/src/api/printer/directprint.clj"
},
"position": {
"line": 10,
"character": 17
},
"context": {
"includeDeclaration": false
}
}
[Trace - 14:58:05] Received response 'textDocument/references - (69)' in 52ms.
Result: []
Local:
[Trace - 3:10:01 PM] Sending request 'textDocument/definition - (98)'.
Params: {
"textDocument": {
"uri": "file:///home/rob/storage/web-server/src/api/printer/directprint.clj"
},
"position": {
"line": 10,
"character": 6
}
}
[Trace - 3:10:01 PM] Received response 'textDocument/definition - (98)' in 1ms.
Result: {
"uri": "file:///home/rob/storage/web-server/src/api/printer/directprint.clj",
"range": {
"start": {
"line": 10,
"character": 6
},
"end": {
"line": 10,
"character": 17
}
}
}
[Trace - 3:10:01 PM] Sending request 'textDocument/references - (99)'.
Params: {
"textDocument": {
"uri": "file:///home/rob/storage/web-server/src/api/printer/directprint.clj"
},
"position": {
"line": 10,
"character": 6
},
"context": {
"includeDeclaration": true
}
}
[Trace - 3:10:01 PM] Received response 'textDocument/references - (99)' in 8ms.
Result: [
{
"uri": "file:///home/rob/storage/web-server/src/api/printer/directprint.clj",
"range": {
"start": {
"line": 10,
"character": 6
},
"end": {
"line": 10,
"character": 17
}
}
}
]
Interesting to see that the remote version has three calls vs the two calls from the local version. This is being invoked with the following actions:
{
"key": "ctrl+b",
"command": "editor.action.revealDeclaration"
},
{
"key": "ctrl+b",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
is there a repro project so I can try? Could you try restarting vscode? I suspect you have the target file open so clojure-lsp thinks you wanna edit that file and include it on the find definition
Hmm, it is persistent over a restart, but the file within the target is still in the recently opened list. Is it possible to clear all the caches in vs code/calva/clojure-lsp?
Also I will get to work replicating it in a public repo. Will only be able to do that later today though.
• Portal -- I rely very heavily on this during dev/test. • Joyride -- for customizing Calva/VS Code. Then on the process side I have: • GitHub Pull Requests and Issues (I wish it would display GH pages inline in VS Code but otherwise it's pretty good), • New Relic CodeStream (still early days with this and I'm not using it a lot yet) • Jira and BitBucket (because work... and I live and die in these extensions all day, for better or for worse!) And some other random stuff: • Remote -- for SSH and for WSL2 (both my dev envs are Windows machines running Ubuntu in WSL2) • vscode-pdf -- because sometimes I need to read a PDF and don't want to switch out of my editor • YAML -- mostly for CI files (GH workflows, BitBucket Pipelines)
Outside of Calva + basic extensions for the other languages/file types/tools I interact with, I keep mine pretty minimal. The only addition to the above is TLDraw, to make quick visuals to explain myself while pairing.
Markdown All in One for keeping table of contents in readmes updated automatically as the content changes (for work projects.) Prettier for TS formatting. Docker for editing docker files.
https://github.com/maxrothman/config/blob/master/VSCode/extensions.md, https://marketplace.visualstudio.com/items?itemName=ow.vscode-subword-navigationhttps://marketplace.visualstudio.com/items?itemName=ow.vscode-subword-navigationand https://marketplace.visualstudio.com/items?itemName=stkb.rewraphttps://marketplace.visualstudio.com/items?itemName=stkb.rewrapare two I can't live without
@mshemayev nice list! Trying out bookmark
@U06GMV0B0 oops, other @U01EB0V3H39 should get the credit here 🙂
Edamagit was the extension that finally made it possible for me to let go of Emacs: https://marketplace.visualstudio.com/items?itemName=kahole.magit It is a really powerful to for git that favors keyboard shortcuts.
@mshemayev nice list! Trying out bookmark