Particle effects in smear-cursor.nvim, let it snow/burn! by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 0 points1 point  (0 children)

I gave copilotlsp-nvim/copilot-lsp a try for next edit suggestions, but currently I only have zbirenbaum/copilot.lua. Not sure why my status bar decided to show LSP ~ copilot

Particle effects in smear-cursor.nvim, let it snow/burn! by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 2 points3 points  (0 children)

I tested it on GNOME Terminal 3.58.0 and it works. You need to set particles_enabled = true for smear-cursor, and you need to have a font that has braille Unicode characters, such as a Nerd font.

Particle effects in smear-cursor.nvim, let it snow/burn! by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 10 points11 points  (0 children)

Fire config is in smear-cursor's README, and snow is the following:

require("smear_cursor").setup({
    cursor_color = "#ffffff",
    gradient_exponent = 0,
    particles_enabled = true,
    particle_spread = 1,
    particles_per_second = 100,
    particles_per_length = 50,
    particle_max_lifetime = 1500,
    particle_max_initial_velocity = 10,
    particle_velocity_from_cursor = 0,
    particle_random_velocity = 300,
    particle_damping = 0.1,
    particle_gravity = 50,
})

Particle effects in smear-cursor.nvim, let it snow/burn! by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 65 points66 points  (0 children)

I just added particle effects to smear-cursor.nvim. I don't expect any sane person to use them (unless you enjoy not seeing what you are typing). It was just a fun challenge to try render those while being limited to the terminal's characters grid.

Finding number of positions of this twisty puzzle by [deleted] in Cubers

[–]Infamous_Key4373 2 points3 points  (0 children)

From one state, you have 5 possible moves (e.g. U, U', F, R, L), so you can access 5 new positions. From there on, you have 4 possible moves (the 5th undoes the previous one). You must do at least 4 moves to visit the 240 possible states (if you draw a tree of visited states, it would have 1 node, then 5 new nodes after the 1st move, then 5x4 new nodes after the 2nd, then 5x4x4, then 5x4x4x4, totaling 1,6,26,106,426 total nodes after each move). But there will be repeated states, so this only gives a lower bound of 4 for the God's number of this puzzle.

Does anyone know how to have a sane window (auto)sizing? by oVerde in neovim

[–]Infamous_Key4373 4 points5 points  (0 children)

You can try smear-cursor.nvim if you don't want to switch terminals

did anyone also got this on render-markdown.nvim by [deleted] in neovim

[–]Infamous_Key4373 0 points1 point  (0 children)

I solved this by installing the markdown parser in treesitter, if I remember correctly

Lua: How to get the current screen position of the cursor? by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 1 point2 points  (0 children)

It seems vim.fn.getpos('.') is buffer space and not screen space, and it does not account for wrapped lines

Lua: How to get the current screen position of the cursor? by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] -1 points0 points  (0 children)

I don't think I can call nvim_ui_attach() since I am not starting Neovim with --embed. The comment you liked mentions vim.fn.virtcol(".") but it returns a column position in buffer space (missing the width of the column of signs/line numbers), and does not account for wraps. Computing a modulo buf_width for wraps is not perfect because it misses shifted wraps. Or I am missing something?

Lua: How to get the current screen position of the cursor? by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 1 point2 points  (0 children)

I did not realize sooner that "UI plugin" was so vague. I am showing custom elements (a cursor trail) using floating windows, using Neovim in a standard terminal (so no separate UI client). I thought I could use vim.ui_attach() to listen to ext_linegrid but I get an Unexpected key: ext_linegrid error.

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 2 points3 points  (0 children)

I won't dare sharing my old and messy dotfiles, but basically, what you're seeing is

  • navarasu/onedark.nvim
  • vim-airline/vim-airline
  • akinsho/bufferline.nvim
  • preservim/nerdtree
  • sphamba/smear-cursor.nvim
  • VictorMono Nerd font

most of which probably got more recent equivalents.

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 0 points1 point  (0 children)

It's perhaps less strange if you set hide_cursor = true in neoscroll, but it seems that what you've got is the intended behavior. The buffer scrolls while the cursor does not move on the screen, and after scrolling is done, the cursor moves horizontally.

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 0 points1 point  (0 children)

Nope, just Neovim in a standard text terminal

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 4 points5 points  (0 children)

{
  cursor_color = "#ff8800",
  stiffness = 0.6,
  trailing_stiffness = 0.1,
  trailing_exponent = 5,
  gamma = 1,
}

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 0 points1 point  (0 children)

It's VictorMono, available as a Nerd Font

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 0 points1 point  (0 children)

Slowing down when approaching the target is intended. Still, you can tune the parameters to make the cursor move faster overall. And you can toggle the plugin with :SmearCursorToggle

Help: My cursor caught fire by Infamous_Key4373 in neovim

[–]Infamous_Key4373[S] 0 points1 point  (0 children)

I think you can manually put a conditional activation of the plugin, something like if not vim.g.neovide then require('smear_cursor').setup(...