This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-02
Channels
- # aleph (3)
- # announcements (2)
- # babashka (4)
- # beginners (74)
- # calva (21)
- # clj-kondo (30)
- # cljs-dev (7)
- # cljsrn (42)
- # clojure (121)
- # clojure-dev (13)
- # clojure-europe (23)
- # clojure-losangeles (2)
- # clojure-nl (2)
- # clojure-norway (7)
- # clojure-spec (140)
- # clojure-uk (58)
- # clojuredesign-podcast (9)
- # clojurescript (49)
- # clojutre (2)
- # cursive (32)
- # datascript (2)
- # datomic (59)
- # duct (7)
- # figwheel-main (6)
- # fulcro (18)
- # graphql (5)
- # jackdaw (1)
- # joker (6)
- # juxt (7)
- # leiningen (9)
- # off-topic (1)
- # pedestal (14)
- # quil (2)
- # re-frame (3)
- # reitit (8)
- # shadow-cljs (78)
- # sql (8)
- # timbre (3)
- # vim (69)
is https://gist.github.com/xzj/1518834 the "Right Way" to add ctags support for Clojure? i'm asking here, since my end goal is to be able to use fzf.vim's BTags
(or similar) for jumping to symbols in the current Clojure buffer. so the solution doesn't need to use ctags.
it seems like that ~/.ctags
works, but is limited: it doesn't support e.g. defprotocol
and defrecord
. while it's easy enough to add those statements, it makes me think that there should probably be a better solution/setup out there.
i think some of that clojure config may be part of universal ctags i do have some configuration similar to the link you've posted: https://github.com/daveyarwood/dotfiles/blob/master/ctags/clojure.ctags a lot of my config (maybe all of it?) is a hold-over from when i was using exuberant ctags before, so i'm not sure how much of that is still necessary
i too would be interested to know if there is a "canonical" way to do ctags with clojure
I think there is still good support for both in the vim ecosystem. One of the benefits of universal ctags is that more languages (including clojure) are supported out of the box
latest universal ctags does not need any extra config for basic clojure iiuc. does anyone know differently?
> Universal-ctags doesn't load /.ctags and ./.ctags at starting up time. Instead, it loads /.ctags.d/.ctags and ./.ctags.d/.ctags. See the above web site and man pages (man/ctags.1.rst.in and man/ctags-incompatibilities.7.in in the source tree).
via: https://github.com/universal-ctags/ctags#user-content-differences
would you mind posting some related links? i never had luck with exuberant ctags out-of-the-box (ended up mucking around with .ctags) -- i only found universal ctags to have clojure support built-in.
Hi, if I recall, I didn't do much. I simplly installed ctags, then installed the vim plugin
If I open up a clojure file in vim, then a ctags file is created for me in the project root
fwiw, extra/ctags is universal ctags: https://www.archlinux.org/packages/extra/x86_64/ctags/
% yay -Qi ctags
Name : ctags
Version : 1:r20190522+g3fdf28bc-1
Description : Generates an index file of language objects found in source files
Architecture : x86_64
URL :
Licenses : GPL
Groups : None
Provides : universal-ctags
Depends On : libxml2 jansson libyaml libseccomp
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 1065.00 KiB
Packager : Levente Polyak <[email protected]>
Build Date : Wed 22 May 2019 22:51:22 BST
Install Date : Thu 06 Jun 2019 11:25:26 BST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
its last official release is even older! > Version 5.8 [09 July 2009] -- http://ctags.sourceforge.net/
@snoe trying to debug my coc-clojure not showing doc on hover, still the case. I've got trace on and I can see coc sending the uri along with position and line number, then following into the clojure-lsp code, I can see where the information is attempting to be gathered, but the result is like this:
[Trace - 20:47:46] Sending request 'textDocument/hover - (3)'.
Params: {
"textDocument": {
"uri": "file:///home/foo/ojure/scratch/src/scratch/foobar.clj"
},
"position": {
"line": 4,
"character": 2
}
}
[Trace - 20:47:46] Received response 'textDocument/hover - (3)' in 4ms.
Result: {
"contents": {
"kind": "markdown",
"value": "
\nclojure.core/juxt\n\n\n----\nlsp: :norename"
},
"range": {
"start": {
"line": 4,
"character": 2
},
"end": {
"line": 4,
"character": 6
}
}
}
Hrm, are you building from the repo? the homebrew formula is out of date. You can also try deleting the project's .lsp folder
Probably better to start a thread. I'll have to look into the release then. Can you try to clone the repo and launch it from lein like https://github.com/snoe/dotfiles/blob/master/home/.vim/coc-settings.json ?
So I would expect to see an error about parsing clojure/core.clj in the /tmp/lsp.out startup
% rm /tmp/lsp.out && tail -F /tmp/lsp.out
tail: cannot open '/tmp/lsp.out' for reading: No such file or directory
tail: '/tmp/lsp.out' has appeared; following new file
INFO clojure-lsp.main: Server started
INFO clojure-lsp.main: ====== LSP nrepl server started on port 43811
WARN clojure-lsp.main: Initialize
INFO clojure-lsp.main: :initialize 183 ()
WARN clojure-lsp.main: Initialized #object[org.eclipse.lsp4j.InitializedParams 0x5f41a282 InitializedParams [
]]
WARN clojure-lsp.main: DidCloseTextDocumentParams
WARN clojure-lsp.main: DidCloseTextDocumentParams
Can you delete the .lsp dir and get the startup? The classpath and other things are cached
https://github.com/snoe/clojure-lsp/blob/master/src/clojure_lsp/crawler.clj#L209 It should be easy tho, just add a deps.edn
project-file and the clj command to get classpath
Can it be brought back into your radar? 🙂 I think deps is increasing in popularity
totally, if you want to try it locally try adding
{:project-path "deps.edn"
:classpath-cmd ["clj" "-Spath"]}
to that vectorbut if you have the code checked out and are launching it from lein, the fastest test might be to modify that crawler.clj code
Sounds good, if not I'll try make time to fix it this weekend cause you're right deps.edn is getting way more popular
@clojurians-slack100 is this not something that's usable? https://packages.debian.org/search?keywords=universal-ctags