This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-20
Channels
- # announcements (16)
- # babashka (104)
- # beginners (77)
- # bristol-clojurians (1)
- # calva (3)
- # chlorine-clover (50)
- # cider (19)
- # clojure (73)
- # clojure-australia (1)
- # clojure-europe (37)
- # clojure-france (3)
- # clojure-nl (3)
- # clojure-norway (13)
- # clojure-spec (21)
- # clojure-uk (79)
- # clojurescript (225)
- # conjure (102)
- # cursive (11)
- # datascript (1)
- # datomic (1)
- # defnpodcast (1)
- # events (3)
- # figwheel-main (2)
- # fulcro (49)
- # ghostwheel (10)
- # helix (1)
- # kaocha (17)
- # leiningen (10)
- # meander (1)
- # off-topic (26)
- # other-lisps (3)
- # pathom (5)
- # re-frame (40)
- # reagent (6)
- # reitit (33)
- # shadow-cljs (107)
- # testing (3)
- # tools-deps (68)
- # xtdb (16)
- # yada (3)
I swear I did like 10 times but it looks like ConjureSchool is working now!
However I'm getting a connection error when the repl starts now...
It seems like its trying to connect on 50783 everytime, maybe I have some old configuration...
Yep, @U0AHJUHJN should be right. There's probably a .nrepl-port file sitting around from an old server. Glad to hear the school is working though! Let me know if you have any issues or questions!
Conjure now looks for a file called .nrepl-port in the working directory. Maybe you have a stale .nrepl-port file laying around? Usually, the nREPL server deletes that file when the process exits, but there are probably edge cases where it doesn't get a chance to do that
has anyone tried https://github.com/weavejester/hashpashp with conjure ? output is very awkward
; --------------------------------------------------------------------------------
; eval (current-form): (str #p "hashp test")
; (out) [31m#p[0m[32m[emtec-data-transfer.routes/eval30643:18][0m [1;35m"hashp test"[0m
"hashp test"
@U11EL3P9U is right, this is ANSI terminal colour codes, so in a terminal they would highlight your text. Vim has no way to render these, there are plugins that attempt to turn them into highlighting such as https://www.vim.org/scripts/script.php?script_id=302 I think there's a Lua based Neovim one that @U0AHJUHJN found too? But I think your best bet is composing the Conjure log buffer with one of these. I may add some tools to strip the codes out if you don't need them, but I haven't decided yet. I'm trying to alter your output as little as possible.
probably the lua based is https://github.com/norcalli/nvim-terminal.lua
Yeah, that's the problem, it'll remove the Clojure part. The other one I linked might work better :thinking_face:
; eval (current-form): (str #p "test")
; (out) #p[emtec-data-transfer.routes/eval30722:17] "test"
"test"
E519: Option not supported: hl=8:Ignore,~:EndOfBuffer,z:TermCursor,Z:TermCursorNC,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,
s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:Spel
lBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine,0:Whitespace
,I:NormalN
I have a todo item to somehow support term codes, but one option would be for me to give you an option to strip them out for now.
I was hoping there would be a plugin out there that people can install if they really want this sort of thing.
There's also this one https://github.com/chrisbra/Colorizer
Although this is the one @U0AHJUHJN tried with mixed success, he's raised a couple of issues on it.
I would love to find a 3rd party plugin that does this, it's a hard thing to get right and I'm worried if I do it myself I'll lose loads of time to just this feature 😅 so I think maybe an option to strip them out while recommending a good plugin to use is the best route.
I'm afraid you'll have to put up with the noise for a little bit if there's no working plugins out there. I'll add an option soon that will strip them out for you then I'll have to write my own plugin for it I guess 😅 ]
Maybe we could find a way to enable it in the HUD when I have custom Conjure autocommands implmented.
So you could hook into "HUDWindowOpen" or whatever and then enable the highlighting in there.
@olical maybe the Conjure custom commands will fix the problems. Focosing on another buffer disables colors
That's the main issue I ran into with Colorizer. The highlighting isn't consistent. It will highlight sometimes and then the highlighting goes away when you move from split to split, etc.
By default, the colorings will be deleted if you switch to a different buffer
in the same window by using a BufLeave autocommand. However that might
unintentionally uncolor the current window, so if you experience a problem
with that, try setting the variable g:colorizer_disable_bufleave like this:
¦ let g:colorizer_disable_bufleave = 1
but i will problably write i vimscipt function to detect the conjure log and apply the pluggin
It boggles my mind that the author thought people wouldn't want that behavior by default!
I'm on mobile right now so I can't link to the line numbers, but search this file for "Colorizer" and you'll find my hacks: https://github.com/daveyarwood/dotfiles/blob/master/vim/custom/500-plugins-config.vim
when updating the buffer from another buffer there seems to be no way to show the colors unless you enter the log buffer
@olical @U0AHJUHJN the plugin https://github.com/powerman/vim-plugin-AnsiEsc seems to work.
i'm not totally giving up on the idea that one could tame Colorizer to work the way we want it to
there has to be something we can hook into with an autocmd to colorize the log buffer whenever it appears
I think the best UX would be "conjure just does the right thing", so I kinda wanna write my own into conjure at some point
@U0AHJUHJN I tried to debug colorizer further
I dont write vimscript but i managed to learn enought to test it with the following function
function! Cc()
let buffers = map(copy(getbufinfo()), 'v:val.bufnr')
for bf in buffers
let l:cnlog = bufname(bf)
let matchs = matchstr(l:cnlog, ".*njure-log.*")
if matchs == ''
else
let l:bufnr = bufnr('')
execute 'noautocmd keepalt buffer' bf
execute 'ColorHighlight'
execute 'noautocmd keepalt buffer' l:bufnr
endif
endfor
endfunction
This detects the conjure-log buffer, runs the ColorHighlight command on it and returns to the current buffer. The spaces update but the colors dont !
i was just testing let g:colorizer_disable_bufleave
and it seems to work about the same as my autocmd hackery. i think i'll use this instead because not decolorizing when you leave a buffer is what i really want 🙂
i'll mention this on the issue i filed. i think what we really want is for colorizer to colorize automatically when a floating window appears
i also frequently notice weirdisms like this, where it seems to be preserving the colors on just certain lines/columns