This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-13
Channels
- # adventofcode (77)
- # beginners (132)
- # boot (11)
- # cider (40)
- # clara (10)
- # cljsjs (1)
- # cljsrn (4)
- # clojure (148)
- # clojure-android (1)
- # clojure-greece (5)
- # clojure-italy (5)
- # clojure-nl (7)
- # clojure-spec (57)
- # clojure-uk (9)
- # clojurescript (115)
- # core-matrix (1)
- # cursive (3)
- # data-science (1)
- # datomic (1)
- # duct (7)
- # emacs (20)
- # fulcro (29)
- # funcool (4)
- # graphql (31)
- # instaparse (15)
- # java (1)
- # jobs (6)
- # jobs-discuss (95)
- # leiningen (2)
- # off-topic (30)
- # om (4)
- # onyx (7)
- # pedestal (6)
- # quil (4)
- # re-frame (52)
- # reagent (59)
- # rum (1)
- # spacemacs (3)
- # specter (61)
- # test-check (3)
Is there any ggtags
package for clojure? if not, where should I contribute it? I have noticed that clojure tags are generating correctly with the right .globalrc
, but not queried correctly using ggtags-mode
in particular for things like namespace/symbol
, I need to specify a file on top of the global
command
@arrdem Is there currently any way from emacs to pull in all of grimoire and refer to it as static files, rather than making one-off HTTP requests? I'm super excited to use cider-grimoire (it scratches an itch I've had for a couple months) but I'd rather update the docs once every six months rather than insert a 1 to 2 second network delay into my lookup workflow.
It seems feasible to change cider-grimoire such that it caches the retrieved data, and uses a configurable time-to-live to decide when to go get the remote URL again.
Toy example of that strategy: https://github.com/gonewest818/adafruit-wisdom.el/blob/master/adafruit-wisdom.el#L43-L56
The obvious downside would be, if you visited a particular topic in grimoire less often than the configured TTL, then basically the caching wouldn’t help.
@bozhidar does cider
include any jump-to-symbol
functionality? If not, where does that live? I am trying to use ggtags-mode
in Clojure
a further question on top of this is whether there should be a separate gtags
hook for static info rather then dynamically fetching stuff from the REPL, I was actually able to generate tags with global -u
and universal-ctags
.
@richiardiandrea See cider-find-var
in cider-client.el
thanks! however I don't use cider
, so I wonder whether this functionality should go instead in clojure-mode
?
@daveliepmann So Grimoire the website is a thin wrapper around lib-grimoire which provides a consistent API between making requests to Grimoire the service and to the filesystem store that Grimoire the service uses under the hood. I’ve thought in the past about how to distribute a zipfile or some other archive containing a snapshot of Grimoire (early versions of Grimoire which were all static HTML were available this way) but right now there’s no blessed local or cached client. I just never got around to building one.
I extremely don't have time to do this work right now, but a standalone grimoire-mode based on such an archive would be awesome. I might be able to hack on it after the holidays, though. That would require moving forward with some kind of static files. What do you think the best format would be for distribution? My naive assumption would be that the easiest would be git clone
but I wonder what other options you see.
Yeah there’s been some ideas back and forth on stuff like this before. Grimoire actually has a script in the main repo that clones down the data repos, builds the data directory structure and sets everything up for lib-grimoire. It shouldn’t be that hard to adapt the same toolset to maintaining a local copy in ~/.grim or wherever. Maybe once I get some headway on the current improving doc writing projects.
It’s definitely doable, just a couple separate git repos you could keep cloned into ~/.grim or somewhere.
@richiardiandrea It’s not possible. This relies on var metadata. It can easily be added to inf-clojure
, though.
(meta #'map)
{:arglists ([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]), :doc "Returns a lazy sequence consisting of the result of applying f to\n the set of first items of each coll, followed by applying f to the\n set of second items in each coll, until any one of the colls is\n exhausted. Any remaining items in other colls are ignored. Function\n f should accept number-of-colls arguments. Returns a transducer when\n no collection is provided.", :added "1.0", :static true, :line 2618, :column 1, :file "clojure/core.clj", :name map, :ns #namespace[clojure.core]}
@gonewest818 I like the idea of caching for grimoire. If that’s combined with the ability to fetch all entries for a certain namespace I think it’d would solve much of the aforementioned problem. It would also be nice if this was moved to a middleware and started using lib-grimoire
as that would simplify the code and make it accessible to other editors - e.g. @dominicm’s beloved vim. 🙂
I have been thinking about moving grimoire into the nrepl, I've been working on an improved doc. I wanted runnable examples and stuff.
It’s doable. I test Grimoire using lib-grimoire loaded into a REPL. Been sketching at more structured examples / REPL sessions notation recently. http://github.com/arrdem/stacks
Part of the problem is that as-is markdown-clj doesn’t give you a data based intermediate representation and I just haven’t gone and fixed that yet.
@bozhidar shouldn't that go to clojure-mode
? Also, meta
is a runtime thing
tags are built statically
Ok let me ask this, would you be open to a patch to clojure-mode
that hooks up ggtags
?
Building tags is a step most people dislike having to deal with, that’s why I’m not particularly interested in trying to do something about this in clojure-mode
- you always need to build some command to run this, you need to install something.
I am using projectile
and everything works pretty well, but I see the point and felt the pain when installing all these tagging tools
If you come up with something I might consider it, but overall, I think getting this info at runtime is a pretty decent approach.
@bozhidar ok I will put in a separate package for now..
cljr-rename-symbol
fails to rename anagrams-for
in https://github.com/developer2019/example/blob/master/src/anagram.clj
I just position cursor at anagrams-for
and press M-x cljr-rename-symbol
RET.
It tells that project needs to be evaluated, I type y RET
, and then if fails with Wrong type argument: char-or-string-p, nil
.
Is this a bug?
lein test
compiles this code and runs successfully.
clj-refactor.el version: 2.3.1
It's never worked consistently for me. There are some clojure mode refactoring I need to learn more
It seems that nobody needs Clojure refactoring. Otherwise somebody would have done it already.