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.77k stars 109 forks source link

ui laggy with lazyvim #483

Closed peter-lejon-v closed 1 year ago

peter-lejon-v commented 1 year ago

I don't know if this is a lazyvim issue or conjure issue, but the editing experience is really laggy when using conjure with lazyvim

Olical commented 1 year ago

Going to need more information to help out here, sorry. Which Neovim version and OS are you on? And what kind of hardware do you have (CPU model etc if possible)?

I don't experience any kind of latency while editing, personally. Are you using Tree Sitter or not? If you're not using Tree Sitter, I'd recommend looking into setting it up since it allows Conjure to be far more efficient.

Have you managed to isolate the issue by disabling or uninstalling Conjure and editing the same file?

peter-lejon-v commented 1 year ago

NVIM v0.9.0 Build type: Release LuaJIT 2.1.0-beta3

Linux zephyrus 6.2.11-1-MANJARO (G14 first gen)

48 GB ram

it's with clojure and tree-sitter

lazy config return {

-- { "Olical/aniseed" },

{ "Olical/conjure" },

{ "nvim-treesitter/nvim-treesitter", opts = function(_, opts) vim.list_extend(opts.ensure_installed, { "clojure", }) end, },

{ "neovim/nvim-lspconfig", ---@class PluginLspOpts opts = { ---@type lspconfig.options servers = { -- ["clj-kondo"] = {}, clojure_lsp = {}, }, }, }, }

Olical commented 1 year ago

Hm, I doubt it's hardware / raw CPU related then because Conjure runs just fine on my XPS 13 from 2015 as well as my 13600K in my main machine. This sounds to me like some plugin interfering with Conjure in some way or maybe the terminal you're using?

I've never used lazy.nvim but I don't see how the plugin manager could affect this...

peter-lejon-v commented 1 year ago

:thinking: I get the same issues with kitty and alacritty (with or without tmux)

If I don't use conjure, it's not laggy. Other plugins i use for lisps are

return { { "guns/vim-sexp", requires = { "tpope/vim-repeat", }, } }

peter-lejon-v commented 1 year ago

Could it be https://github.com/echasnovski/mini.animate that is the culprit somehow

Olical commented 1 year ago

Haven't heard of it before, but quite possibly! The concept sounds like something that could easily slow nvim to a crawl, especially with Conjure flying about modifying the log buffer in the background as you evaluate things.

When you say the UI is laggy? Do you mean very specific actions lock up nvim for a short time or everything is slow? Are we talking 50-100ms (something you can feel but isn't huge) or a few seconds of complete lock up? And is it only on eval or even moving the cursor?

peter-lejon-v commented 1 year ago

stuff like j k h l C-u C-d etc are laggy (get stuck). Loading the buffer is also slow

peter-lejon-v commented 1 year ago

I have these bindings to (scroll lock fan)

--vim vim.cmd([[nnoremap j jzz]]) vim.cmd([[nnoremap k kzz]]) vim.cmd([[nnoremap n nzz]]) vim.cmd([[nnoremap N Nzz]]) vim.cmd([[nnoremap { {zz]]) vim.cmd([[nnoremap } }zz]]) vim.cmd([[nnoremap zz]]) vim.cmd([[nnoremap zz]])

But these are normally not a problem (only with the specific combination of conjure and lazyvim)

peter-lejon-v commented 1 year ago

There was an update to lazy and now I don't have this lag any more :)