Neovim

19 readers
1 users here now

Neovim is an hyperextensible Vim-based text editor. Learn more at neovim.io.

founded 2 years ago
MODERATORS
51
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/biserstoilov on 2025-06-07 07:24:09+00:00.


Hey r/neovim! πŸ‘‹

I've been working on a plugin called LVIM Space that brings advanced project and workspace management to Neovim. After months of development, I'm excited to share it with the community!

πŸš€ What is LVIM Space?

LVIM Space is a comprehensive workspace management plugin that organizes your development workflow into Projects β†’ Workspaces β†’ Tabs β†’ Files with full session persistence and a beautiful visual UI.

✨ Key Features

  • πŸ—οΈ Projects: Manage multiple projects independently
  • 🌐 Workspaces: Each project can have multiple contexts/workspaces
  • πŸ“‘ Tabs: Each workspace supports multiple tabs with their own layouts
  • πŸ“ Files: Tabs remember files, window layouts, and cursor positions
  • πŸ’Ύ Session Persistence: Auto/manual save and restore everything
  • 🎨 Visual UI: Beautiful floating panels with NerdFont icons
  • πŸ”Œ API Integration: Public API for status line integration
  • βš™οΈ Highly Configurable: Customize everything to your needs

🎬 Demo

https://github.com/user-attachments/assets/6c20d82b-abb5-445a-a630-2aca3adb76ae

πŸ”§ Quick Setup

-- Install with your favorite plugin manager
require("lvim-space").setup({
    autosave = true,
    ui = {
        icons = {
            project = " ",
            workspace = " ", 
            tab = " ",
            file = " ",
        }
    },
    keymappings = {
        main = "<C-Space>",
        global = {
            projects = "p",
            workspaces = "w", 
            tabs = "t",
            files = "f",
        }
    }
})

Press <C-Space> to open the main panel and start organizing!

πŸ”— Integration Example

Works great with status line plugins like tabby.nvim:

local pub = require("lvim-space.pub")
local tabs = pub.get_tab_info()
-- Returns: { {id=1, name="main", active=true}, {id=2, name="feature", active=false} }

🎯 Why I Built This

I used vim-ctrlspace for a long time but encountered several issues that led me to create this plugin. LVIM Space offers a unified approach with significant improvements:

  • SQLite Database: All data stored in a fast SQLite database instead of files
  • Reliability: No risk of corrupted session files or lost configurations
  • Performance: Fast loading and saving of state
  • Hierarchical Organization (Project β†’ Workspace β†’ Tab β†’ File)
  • Visual Management instead of just commands
  • Seamless Integration with existing workflows

πŸ“¦ Installation

Lazy.nvim:

{
    "lvim-tech/lvim-space",
    dependencies = {
        "kkharji/sqlite.lua",
    },
    config = function()
        require("lvim-space").setup({})
    end
}

Packer:

use {
    "lvim-tech/lvim-space",
    requires = {
        "kkharji/sqlite.lua",
    },
    config = function()
        require("lvim-space").setup({})
    end
}

πŸ”— Links

🀝 Feedback Welcome!

I'd love to hear your thoughts! Whether it's:

  • Feature requests
  • Bug reports
  • Integration ideas
  • General feedback

Feel free to try it out and let me know what you think. I'm actively developing and responding to issues.

Thanks for checking it out! πŸ™


Built with ❀️ for the Neovim community

52
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/santhosh-tekuri on 2025-06-06 14:29:14+00:00.


vim.api.nvim_create_autocmd('FocusLost', {
    desc = "Copy to clipboard on FocusLost",
    callback = function()
        vim.fn.setreg("+", vim.fn.getreg("0"))
    end,
})

if you are using tmux you should enable focus-events:

set -g focus-events on

earlier I used to use <leader>y to copy to clipboard. but the above trick seems cleaner

53
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/ryancsaxe on 2025-06-06 15:30:48+00:00.


I've spent the last few weeks trying to set up my perfect environment for code review in Neovim. I've explored so many different plugins: gh-dash, neogit, octo, gitsigns, mini.diff, lazygit, and diffview. None of them seem to really solve my use case out of the box, but I feel like what I want should be configurable with a mix of them or writing some small plugin myself to fill the gaps. Hopefully somebody here can help!

My desired workflow is described below, and I have marked the parts I have already solved accordingly.

  1. (solved) Have a picker that grabs all open PRs, and checks out the corresponding branch AND fetches the base branch on select.
  2. (solved) Have a picker that shows all hunks in the current branch with respect to the correct base branch.
  3. When I am in a given file, have two toggles: one that shows the diff inline, and one that shows the diff in a split. This is because, while reviewing, I really want to be able to jump around via gd and look at diagnostics as if I was writing code without things being so cluttered and overwhelming (this is my issue with diffview -- it breaks me out of my normal workflow and navigation).
  4. When I am in any given hunk or file, I want to be able to add a comment on the hunk or file, and have it show up in the PR. MAYBE I care about the ability to approve the entire PR too, but it's definitely a lower priority.

For #3, Both Gitsigns and Mini.diff seem to have the ability to do this, but I can't seem to get them to work the way I want. For Gitsigns, I can set the base branch, but the inline hunks only seem to be previewed, and don't stay if I move my cursor. For Mini.diff, I can't seem to get it to easily track the base branch, especially when I'm constantly changing branches, which shifts the reference. The docs for mini.diff suggest this is possible, but didn't provide a clear example.

For #4, All the tools seem to be so bloated. I don't want the huge UIs from gh-dash or octo. I simply want a simple keybind to add a comment to the hunk/file without breaking out of being in the literal file.

Any help is greatly appreciated! Also, for anybody with their own customized workflows that do things like this, I'd love to read your configs!

54
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/mplusp on 2025-06-07 00:23:17+00:00.


Trying out a new shorter format of short Vim Tips. Let me know what you think.

55
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/franco-ruggeri on 2025-06-06 23:00:01+00:00.


Hi all,

I just published a plugin called pdf-preview.nvim.

Problem: When writing LaTeX on a remote server or inside a dev container, most existing plugins like VimTex fall short. They assume your PDF viewer runs on the same machine where you're editing. When you're working remotely, that is not the case.

Solution: pdf-preview.nvim serves the compiled PDF over HTTP with live autoreload. That means:

  1. Connect to a server or container and write LaTeX.

  2. Forward a port.

  3. Open the preview in your local browser.

  4. Watch the PDF update while editing.

Why LaTeX remotely: Dev containers are really convenient. I recently migrated my entire workflow to dev containers, and writing LaTeX there felt like a missing piece.

I'd love to hear your thoughts and suggestions. Feedback is super welcome!

Here's a demo:

https://i.redd.it/3w0ph4dl0e5f1.gif

56
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/shmerl on 2025-06-05 22:50:17+00:00.


According to this article, you can place LSP configs as individual files in $HOME/.config/nvim/lsp, let's say

clangd.lua return { cmd = { 'clangd', '--background-index' }, root_markers = { 'compile_commands.json', 'compile_flags.txt' }, filetypes = { 'c', 'cpp' } }

and it would be equivalent to setting them like this somewhere:

vim.lsp.config.clangd = { cmd = { 'clangd', '--background-index' }, root_markers = { 'compile_commands.json', 'compile_flags.txt' }, filetypes = { 'c', 'cpp' } }

I tried doing that first method, but nvim isn't picking up anything from $HOME/.nvim/lsp for me, while it works with the second method. Am I missing something to use the first way?

More specifically, I'm checking if vim.lsp.config._configs is populated or not. It's not populated with the first method and is populated with the second.

UPDATE:

I think I get what's going on:

https://github.com/neovim/neovim/blob/master/runtime/lua/vim/lsp.lua#L424

Neovim sets __index function in the metatable, so actual lua files are loaded from that special location only on first reference of vim.lsp.config["name"] somewhere in the code. If you never reference it, it won't load it at all. Also, vim.lsp.config._configs isn't populated even when those files are loaded as I can see.

So first method is not equivalent to the second in that sense that it's more implicltly lazy loading stuff.

UPDATE 2:

See a working idea in this thread if anyone needs.

57
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/Hamandcircus on 2025-06-06 17:16:59+00:00.


Just wanted to let users of grug-far.nvim know that there are now options to display a more compact version of the UI. For example, with showCompactInputs = true:

https://preview.redd.it/rsa2gm5bbc5f1.png?width=2164&format=png&auto=webp&s=ad461faef866e9c6dfc8819a55454bd308d1c400

And if you want to fully minimal:

require('grug-far').setup({
  helpLine = {
    enabled = false,
  },
  showCompactInputs = true,
  showInputsTopPadding = false,
  showInputsBottomPadding = false,
}

https://preview.redd.it/65pmnxuhbc5f1.png?width=1592&format=png&auto=webp&s=7d4fba0ee6f4201d0e0f1272d6c31ddce6f9f9dc

58
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/lukas-reineke on 2025-06-06 06:53:41+00:00.


I hope most know that we have a getting started wiki.

https://www.reddit.com/mod/neovim/wiki/index/getting-started

We do not allow getting started posts, and link to the wiki instead, so that all the relevant information is in one place, and so we don't have to answer the same thing over and over again.

But things evolve, it's been a while since the last update. I'd like to hear from the community.

Is there anything new that should make it into the wiki?

Anything that is outdated?

Is the wiki easy to understand? Should we reword something, provide more information?

Any new blog-posts, videos, tutorial, etc. to add?

59
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/nibyniba on 2025-06-05 15:39:25+00:00.


Hey everyone,

I've been using Neovim for two years, and ever since making the switch, I've been missing a session plugin that supports more than just window layouts, buffers, or oldfiles. In my everyday work, I often need to switch contexts multiple times between different bugs and features. I started noticing a problem with Neovim: many things are shared globally like the jumplist, marks, and search history. I tested several session plugins and couldn't find one that supports the Shada mechanism (which is how Neovim remembers your jumplist, marks, etc.).

That's why I decided to write my first plugin!

Continue.nvim is a session manager plugin for Neovim. I mentioned above why it's different from other session plugins, but I'll paste this small summary from the README:

  • Leverages Shada for Project-Specific Data: Instead of generic session files, this plugin utilizes the power of Shada to store data tailored to each project. This means more than just open buffers and window layouts. It can remember project-specific settings like jumplist, marks, registers, searches and command history.
  • Full Git Integration Including Worktress: Designed with modern Git workflows in mind, the plugin offers comprehensive support for Git repositories. This includes seamless handling of Git worktrees, ensuring your sessions are accurately managed even across complex branching and experimental setups. It uses Git remotes as a session name key, which helps ensure consistent session loading and saving, even if the project directory is moved or accessed from a different path on your system.
  • Extensible by Design: Recognizing that different workflows require different data, this plugin is built to be extensible. You can easily write your own custom extensions to save and restore additional data alongside the default session information. For example, this code contains two extensions examples:
    • Store quickfix list contents
    • Store CodeCompanion chat history

I have been testing this for a few months, so I hope everything works smoothly. I would appreciate any feedback and critique.

60
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/joetifa2003 on 2025-06-05 22:03:10+00:00.

61
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/Emotional-Zebra5359 on 2025-06-05 21:55:06+00:00.


I mean look at the state of the node based LSPs they take so much ram, I work on a very big codebase and if I'm working on frontend+ backend at the same time + got the website running locally as well as some other PR which is also open---> it's a full on ram eating fest.. Our website is more like a CAD software for web so it's heavy, but the LSPs itself take way too much ram. .. and instead we get all these billion dollars funding in cursor and for what, so they can introduce more LLM bloat? I mean it would be nice if someone created better LSP alternatives then what we currently have...

because let's face it, it doesn't matter what code editor you are using, whether neovim, vscode, zed or intlj, at the end of the day, node is gonna hog the most memory, instead we need better LSPs written in C/zig/rust/golang or literally anything other than js/ts.

Obviously we can buy more ram or get a better pc, personally I'm on a m4 mbpro, so it's not slow, but my point is it's definitely should be more optimised, it's like gaming companies refusing to optimize games because better hardware exists in the market

62
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/developedbyed on 2025-06-05 15:08:28+00:00.

63
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/dolfoz on 2025-06-05 03:34:03+00:00.

64
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/JonkeroTV on 2025-06-04 15:57:51+00:00.


A little video about some of neovims best color schemes.

65
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/Kaikacy on 2025-06-04 13:54:10+00:00.

66
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/chickichanga on 2025-06-04 20:02:22+00:00.

67
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/Numerous_Claim_7191 on 2025-06-03 10:05:10+00:00.


Hi, my name is Marian and I’m a second-year high school student and software developer. About a year ago I got into Linux and Neovim, and today I finally made my first plugin for it!

The problem

I noticed that I often reuse small snippets or boilerplate code, and I wanted a simple way to save and recall them β€” without using a full snippet engine.

So I made zsnip (the β€œz” is for my nickname, Zlatovlas) β€” a minimal Neovim plugin that lets you: β€’ πŸ“Œ Visually select code and save it as a snippet via a keybind β€’ πŸ” Browse and insert saved snippets with Telescope β€’ πŸ—‘οΈ Delete old ones when you no longer need them

Snippets are stored globally in a JSON file and can be reused across all projects.

As I mentioned, this is my very first plugin, so I’d really appreciate any feedback, suggestions, or critique. πŸ™

If you’d like to try it out, you can find it in the link above (and if you like it, I’m secretly trying to collect the 16-star β€œstarstruck” badge πŸ˜„)

68
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/unHappygamer10 on 2025-06-04 03:15:15+00:00.


I know Mason 2.0 had some issues with Lazy.nvim, so I stuck with v1.11.0. Just wondering β€” is it safe to update now, or are the problems still there?

69
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/a_9_8 on 2025-06-03 17:52:40+00:00.


Hey folks,

Just wanted to share a small winβ€”my Neovim package just hit 30 stars on GitHub! I originally built it for myself and later decided to open-source it.

It’s been really helpful during interviews. Even though I’ve got a few backlogs, the project helped me show that I actually know what I’m doing, and it impressed quite a few interviewers (except for a couple who were only interested in the pillars of OOP πŸ˜…).

Here’s the repo if you want to check it out: link

P.S. Still looking for a Senior Flutter Developer roleβ€”let me know if you come across anything!

70
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/t1gu1 on 2025-06-03 16:40:34+00:00.

71
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/KOALHACK on 2025-06-03 06:10:10+00:00.

72
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/JonkeroTV on 2025-06-03 00:56:58+00:00.


Small video about debugging in neovim.

I will link below for those with link issues.

https://youtu.be/pGbrIuHwXBY

73
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/Bulbasaur2015 on 2025-06-02 23:05:11+00:00.


Need recent names from this year

74
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/ynotvim on 2025-06-02 16:31:37+00:00.

75
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/frodo_swaggins233 on 2025-06-01 20:58:58+00:00.


I wrote a blog post about file navigation with the argument list. I think this is a really underrated Vim feature, and if you value using native Vim as much as you can it's a great option. Let me know what you think.

view more: β€Ή prev next β€Ί