Olical / conjure

Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
https://conjure.oli.me.uk
The Unlicense
1.8k stars 112 forks source link

noice and conjure doesn't integrate well: input area blinks when evaluating the form. #450

Open glyh opened 1 year ago

glyh commented 1 year ago

Here's a record asciicast

glyh commented 1 year ago

I don't know if it's a bug on either side, maybe I should post on their side.

Olical commented 1 year ago

Recording got deleted because it wasn't associated with an account 😞

glyh commented 1 year ago

Will reproduce...

thecontinium commented 1 year ago

I predominantly use conjure for clojure and don't see any flashing with Noice. With a python client I do see the message ui flash on and off after every evaluation.

thecontinium commented 1 year ago

The flashing in noice that I am seeing is when a command is given via a key mapping. Every time the key mapping is used the command mapped flashes up in Noice. I would like to stop this.

I currently set my keymaps in Lua like this:

vim.g["conjure#mapping#prefix"] = ","
vim.g["conjure#mapping#log_split"] = "lv"
vim.g["conjure#mapping#log_toggle"] = "ls"
vim.g["conjure#mapping#log_vsplit"] = "lg"

Please see here for disabling cmd line popup for keymaps in noice @Olical is there a way in conjure to make key mapping more explicit so that they can be mapped as silent or with cmd as suggested ?

Olical commented 1 year ago

Just tried swapping : prefixes to <cmd> on develop and it still seems to work fine for me. What do you think? Sorry it's taken a while, I had a weeks holiday and then a weeks sickness and still don't feel great 😓 hopefully this helps. All mappings are already marked as silent, it's just that they map to Lua callbacks that then invoke :normal! :...<cr> which seems to cause your issue.

They now map to :normal! <cmd>...<cr> as documented in that link, thanks, that's a new one to me!

glyh commented 1 year ago

No worries, you're good. I hope you will feel better soon!

I just tried the develop branch. I can evaluate (+ 1 2 3) with <leader>er, but using visual mode and evaluate yields this:

E5108: Error executing lua: Vim:Error executing Lua callback: ...m/site/pack/packer/start/conjure/lua/conjure/extract.lua:92: Vim(normal):E20: Mark not set
stack traceback:
    [C]: in function 'normal'
    ...m/site/pack/packer/start/conjure/lua/conjure/extract.lua:92: in function 'selection'
    ...nvim/site/pack/packer/start/conjure/lua/conjure/eval.lua:318: in function <...nvim/site/pack/packer/start/conjure/lua/conjure/eval.lua:317>
    [C]: at 0x55f244597360
stack traceback:
    [C]: at 0x55f244597360

There's no such bug in master branch, tho.

Olical commented 1 year ago

Ah crap, good catch! I'll look at that tomorrow. If <cmd> fixes this clash with this other plugin and makes it fully silent I'll find a way to work that into the visual mode one too.

Olical commented 1 year ago

Only using <cmd> for normal mode mappings now.

thecontinium commented 1 year ago

Thanks @Olical - hope you’re feeling better. I’ll give it a test run too.

thecontinium commented 1 year ago

Evaluate: buffer, form, mark and motion - no flashing.

Evaluate: selection still flashes up the cmd line popup.

Olical commented 1 year ago

Okay thanks for checking! Will have to find something like <cmd> but for visual mode mappings...

On Wed, 5 Apr 2023 at 12:12, the continium @.***> wrote:

Evaluate: buffer, form, mark and motion - no flashing.

Evaluate: selection still flashes up the cmd line popup.

— Reply to this email directly, view it on GitHub https://github.com/Olical/conjure/issues/450#issuecomment-1497314063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACM6XPDSMWI6E2D4CCGD2TW7VHTBANCNFSM6AAAAAATHFS5UQ . You are receiving this because you were mentioned.Message ID: @.***>