Comments (3)
Thanks a lot for implementing this!
FYI: I was testing with the latest release and the fix did not quite work the way I expected for our particular use case. After experimenting with this briefly, I think the feature works as expected when you require the corresponding namespace which contains the var when you want to refer to it with a symbol. For example, here in the test.
Our use case looks more like (pseudo-code, might not compile):
(ns some-ns.with-vars
(:require [... a bunch of stuff ...])
(defn some-function []
"I do something")
;; elsewhere..
(ns some-ns.program
;; No require for `some-ns.with-vars` here!
(:gen-class))
(def operations {"foo" 'some-ns.with-vars/some-function})
(defn main- [& args]
(when-let [s (get operations (first args))]
((requiring-resolve s)))
from clojure-lsp.
Hum, indeed we will only consider if the symbol was required, I'll take a look but I think it's not trivial to support that
from clojure-lsp.
Thanks! And don’t worry about it, this is most likely a niche use case anyways :)
from clojure-lsp.
Related Issues (20)
- False positive: Unused public var 'clojure-sample.component-example/CircuitBreaker'
- Exception on workspace/didChangeConfiguration messages HOT 3
- Add keyword definitions (reg-...) to :clojure/workspace/projectTree/nodes HOT 7
- Adding require command fails for requires without alias HOT 1
- Rename namespace alias with API / CLI HOT 3
- Alias code action "Add require ... x 1" instead of real count HOT 1
- Renaming of function, when done twice, loses track of change HOT 8
- Creating a new `.clj` file in eglot takes a long time HOT 1
- rename ns picks wrong source-path
- Add "Replace full qualified ns with alias" feature HOT 1
- Allow reusing of another functions `:doc` and `:arglists` HOT 5
- Display fully-qualified function name on textDocument/signatureHelp
- Creating a new Clojure file with æ/ø/å in the filename breaks `workspace/willRenameFiles` HOT 3
- Allow disabling external keyword exclusions HOT 1
- Allow a null `rootUri` during initialization instead of crashing HOT 3
- Clojure LSP incorrectly marks `[\!\@]` as an error `<form> expected, got '\!\@'` HOT 2
- LSP Organize imports code action not working with a `#_` comment
- Add inline-function to commands HOT 3
- Publish checksums for nightly builds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clojure-lsp.