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/MirrorCold3935 on 2025-06-28 13:23:11+00:00.


Hey r/neovim! ๐Ÿ‘‹

Iโ€™m excited to share my first Neovim plugin with the community! This has been a fantastic learning experience, and Iโ€™d love to get your feedback.

What is lastplace.nvim?

A modern, Lua-based plugin that intelligently restores your cursor position when reopening files. Think of it as โ€œwhere was I?โ€ for your code editing sessions.

๐Ÿ”— Repository: https://github.com/nxhung2304/lastplace.nvim

Why another lastplace plugin?

I know there are already several similar plugins like nvim-lastplace , remember.nvim , and the original vim-lastplace (which are all great!), but I wanted to create something as a learning project and ended up with some different design decisions:

๐Ÿ—๏ธ Architecture-focused

  • Modular design - Clean separation of concerns across 5 separate files (init.lua, config.lua, core.lua, commands.lua, utils.lua)
  • Comprehensive API - Full programmatic control for advanced users
  • Extensive configuration - 8+ options for fine-tuning behavior
  • Modern tooling - Complete development setup with Makefile, git hooks, CI/CD

๐Ÿง  Smart behaviors:

  • Only jumps when it makes sense (respects file size, cursor visibility)
  • Automatic fold opening and optional cursor centering
  • Debug mode for troubleshooting
  • Manual commands for full control

Features Iโ€™m proud of:

  • ๐Ÿš€ Zero dependencies - Pure Lua implementation with no external requirements
  • ๐Ÿ“š Comprehensive documentation - Detailed help documentation and examples
  • ๐Ÿ”ง Development-ready - Complete Makefile, git hooks, formatting setup
  • ๐ŸŽฏ User commands - :LastPlaceJump, :LastPlaceToggle, :LastPlaceInfo, :LastPlaceReset
  • ๐Ÿ›ก๏ธ Error handling - Graceful handling of edge cases

What sets it apart:

  • ๐Ÿ—๏ธ Modular architecture - Easy to understand and extend
  • โš™๏ธ Rich configuration - 8 different options vs 3-4 in other plugins
  • ๐Ÿ”ง Manual control - 4 user commands for complete control
  • ๐Ÿ› Debug support - Built-in debugging capabilities
  • ๐Ÿ“– Complete documentation - Full help file with examples and troubleshooting

What I learned building this:

As my first plugin, this taught me:

  • Lua module organization and architecture patterns
  • Neovimโ€™s autocmd system and buffer/window management
  • Plugin development best practices (testing, documentation, CI/CD)
  • The importance of user experience in configuration design
  • How to structure a project for maintainability and contribution

This was purely a learning exercise that turned into something I thought might be useful to others. Iโ€™m not trying to compete with existing solutions - I learned a ton from them!

Looking forward to your feedback and suggestions! ๐Ÿš€

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

The original was posted on /r/neovim by /u/Responsible_Beyond26 on 2025-06-29 02:50:35+00:00.


Miscellaneous Vim functions

53
1
Found a gem (www.youtube.com)
submitted 2 weeks ago by [email protected] to c/[email protected]
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/pteroerectyl on 2025-06-28 12:56:44+00:00.


Found this video in the wild. This was a showcase by one of the Neovim core developer of that time (circa 2019-20). Neovim did not even have an extensive lua api back then. Just marvelous.

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

The original was posted on /r/neovim by /u/Aezriel on 2025-06-28 11:51:23+00:00.


Hey everyone,

I've been chasing what feels like an impossible goal: changing my colorscheme everywhere at once. Here's what I'm trying to synchronize:

  • Multiple Neovim instances
  • tmux (which is running those Neovim sessions)
  • WezTerm
  • (optionally) my macOS wallpaper

Iโ€™ve gone down a lot of rabbit holes but I havenโ€™t found a way to switch themes across all of these environments simultaneously.

This post is basically a last-ditch effort:

Has anyone figured out a way to make this work? Or is there a fundamental reason why this isnโ€™t realistically possible?

Thanks in advance!

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

The original was posted on /r/neovim by /u/thetruetristan on 2025-06-28 14:22:51+00:00.

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

The original was posted on /r/neovim by /u/kustru on 2025-06-28 10:29:59+00:00.


I am currently using LazyVim, but seems like Folke is enjoying life, deservedly! I mean, I hope everything is ok with him! Lazyvim has been throwing some errors and PRs are not being merged and I don't want to do the changes myself and have to constantly lose time dealing with it. I use Nvim for work, I don't want to have to constantly deal with config issues.

I have heard of NVChad and I am considering it. But before I make the change and deal with all the little extra config changes I will have to make:

Does anyone here use it? How stable is it? Is it only 1 dev? Or is there more than 1 person that can accept PRs?

I see that NVChad still uses Telescope, which might signal that they are stability above all and might want to avoid any config changes for their users, which is good IMO.

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

The original was posted on /r/neovim by /u/mplusp on 2025-06-27 22:05:58+00:00.


Just uploaded the next one in the series. Curious what you have to say!

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

The original was posted on /r/neovim by /u/Terrible-Cream-4316 on 2025-06-28 11:45:50+00:00.


Hi guys I need a color scheme to assert dominance and intimidate my coworkers.

Im thinking all green text, black background or just highlighting completely off? If anyone has a better suggestion please lmk

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

The original was posted on /r/neovim by /u/scarysticks0w on 2025-06-28 03:35:49+00:00.

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

The original was posted on /r/neovim by /u/adibfhanna on 2025-06-27 20:53:08+00:00.


Check out the readme for the list of features!

I would love some help testing this plugin and suggestions for ideas to improve our Laravel coding experience!

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

The original was posted on /r/neovim by /u/cracoucax on 2025-06-27 16:46:22+00:00.


Nightly builds of Ghostty now support cursor trails ร  la Neovide through glsl shaders. It's fast and beautiful, way better than Kitty support imo as it seems shaders are the right tech to implement this.

I've switched to Ghostty overnight because of this, and it's been very solid.

This vid gives a recap on how to set them up: https://www.youtube.com/watch?v=enwDjM7pNNE

In short you just need to install the latest nightly build, copy some shaders to your conf dir and point your conf to the shaders.

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

The original was posted on /r/neovim by /u/TheBuggedLife on 2025-06-27 16:04:06+00:00.


Hey everyone,

Iโ€™ve been working on my plugin called super-kanban.nvim - a Kanban board that lives right inside Neovim and feels like it belongs there. If youโ€™ve ever wanted to manage your tasks without leaving your editor, or if you already use Obsidian-style markdown boards, this might be a good fit for you.

What it does:

  • Supports *Markdown* and *Orgmode* formats (with Obsidian Kanban-style compatibility)

  • Built-in support for:

  • Tags, checkmarks, due dates, archiving, and sorting

  • Creating notes for individual cards

  • A date picker to quickly assign or remove due dates

  • Parses files using Treesitter for speed and accuracy

  • Designed with customizability in mind: keymaps, icons, borders, etc.

  • There's also early groundwork for time tracking and Neorg support (both coming soon).

https://i.redd.it/6gmpnrrqsh9f1.gif

GitHub repo:

https://github.com/hasansujon786/super-kanban.nvim

Itโ€™s currently in alpha, so things might break โ€” but feel free to open a GitHub issue if you run into any bugs or have suggestions. Feedback is very welcome!

PS: This is my second post - I accidentally messed something up in the first one.

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

The original was posted on /r/neovim by /u/Capable-Package6835 on 2025-06-27 06:32:32+00:00.


Just for fun, ditching the completion plugin and using the ins-completion. We can do the followings:

  1. LSP-based completion. This is automatic because by default omnifunc is set to vim.lsp.omnifunc() when a client attaches.
  2. Buffer-based completion. This is automatic as well, nothing to do.
  3. Snippets. This requires a little tinkering. But see below for an idea, at least for custom snippets.

Create a snippet file(s)

This file should contain a table of keyword - snippet pairs. For example,

-- ~/.config/nvim/lua/snippets.lua
return {
  forloop = "for ${1:i} = 1, ${2:N} do\n  ${3:-- body}\nend",
  func = "function ${1:name}(${2:args})\n  ${3:-- body}\nend",
  print = "print('${1:Hello, world!}')",
}

Create a user-defined completefunc

For example,

vim.o.completefunc = "v:lua.CompleteSnippets"

function _G.CompleteSnippets(findstart, base)
  local snippets = require("snippets")

  if findstart == 1 then
    local line = vim.fn.getline(".")
    local col = vim.fn.col(".") - 1
    local start = col
    while start > 0 and line:sub(start, start):match("[%w_-]") do
      start = start - 1
    end
    return start
  else
    local items = {}
    for key, body in pairs(snippets) do
      if key:match("^" .. vim.pesc(base)) then
        table.insert(items, {
          word = key,
          user_data = vim.fn.json_encode({ snippet = body }),
        })
      end
    end
    return items
  end
end

Now you can trigger the custom completion with i_CTRL-X_CTRL-U

Replace completed keyword with snippet and expand

When you trigger the completion and accept, it will complete the keyword you select. We want to delete this inserted keyword and replace it with the snippet body and expand it. You can use autocmd for this, for example,

vim.api.nvim_create_autocmd("CompleteDone", {
  callback = function()
    local completed = vim.v.completed_item
    if not completed or not completed.user_data then
      return
    end

    local success, data = pcall(vim.fn.json_decode, completed.user_data)
    if not success or not data.snippet then
      return
    end

    vim.api.nvim_feedkeys(
      vim.api.nvim_replace_termcodes("<C-w>", true, false, true),
      'n',
      false
    )

    vim.defer_fn(function() vim.snippet.expand(data.snippet) end, 20)
  end
})

and that's it!

Result preview

Completion and Snippet Expansion

References

see :h lsp, :h ins-completion, :h omnifunc, and :h completefunc.

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

The original was posted on /r/neovim by /u/Admirable-Love-8809 on 2025-06-27 04:31:34+00:00.


I find myself frustrated with developer lingo occasionally and realized that I could actually do something about it....

https://reddit.com/link/1llkyep/video/elov3jseee9f1/player

Created a dictionary plugin that uses signature help so you can see a quick definition (English). Wish these features would come OOTB in Ubuntu and Windows.

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

The original was posted on /r/neovim by /u/adibfhanna on 2025-06-26 14:45:40+00:00.


๐Ÿš€ Create new files in Neovim like your IDE does.

nvim-newfile:

A Neovim plugin that intelligently creates new files with automatic package/namespace declarations based on directory structure and language context.

Supports Go, PHP (+Laravel), Java, and more out of the box.

https://github.com/adibhanna/nvim-newfile.nvim

https://reddit.com/link/1ll1za7/video/v4ffj7wpaa9f1/player

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

The original was posted on /r/neovim by /u/Le_BuG63 on 2025-06-26 14:46:38+00:00.

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

The original was posted on /r/neovim by /u/Jeams_yo on 2025-06-26 05:15:42+00:00.


https://www.youtube.com/watch?v=1Vwt1EnWiwo

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

The original was posted on /r/neovim by /u/mplusp on 2025-06-25 22:41:13+00:00.


Tell me what you think!

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

The original was posted on /r/neovim by /u/visualbam on 2025-06-25 15:22:11+00:00.

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

The original was posted on /r/neovim by /u/Bitopium on 2025-06-25 19:31:45+00:00.


Hi,

After the initial release, I put quite some maturity work into my statusline Plugin: slimline.nvim.

The line finally supports also being configured per window vim.opt.laststatus != 3.

Also, it computes components event based when it makes sense (Diagnostics and attached LSPs).

The goal was overall to write a visually pleasing line for myself. Since it was so much fun to write, I decided to make it configurable and create a plugin out of it.

Let me know what you think.

Happy Coding

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

The original was posted on /r/neovim by /u/zero9th on 2025-06-25 06:22:09+00:00.


I don't know how many of you share this workflow, but I thought this might be helpful. A significant part of my daily work involves managing GitHub Pull Requests, and I like to keep a journal of my progress. This often means noting down PR links and tracking their evolution. While inline Markdown links are common, I much prefer reference-style links for readability and organization. However, generating these for GitHub PRs was a bit more cumbersome than I liked, and also repetitive, hence automatable!

So, I cooked up a custom function for my Neovim setup to make this process much smoother. If you're tired of fiddling with PR links, especially if you also prefer reference links. It is just a small quality-of-life improvement, but welcome.

Let me know what you think or if you have any neat tricks for handling PRs in your own setup

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

The original was posted on /r/neovim by /u/neoneo451 on 2025-06-24 10:09:34+00:00.


There have been a few plugins that are built to complement obsidian.nvim.

I have reached out to the authors to collab with the new fork of obsidian.nvim, hoping we get something like the community plugins for obsidian app.

Examples

The other day after discovering obtero, which I really could need when writing papers, I started seriosly thinking about integrating with other plugins.

So I made an example plugin, and wrote a simple guide on the topic.

It models after the telescope's way of building extensions.

So it is pretty easy to interact with, if your plugin is related to markdown and notes, and could do something extra if it is aware of the obsidian vault, you can make an integration.

Or if you just have an external tool you like to interact with when you are in a markdown file, like zotero, markmap, or anki, you can use this to register a sub command under Obsidian and write a simple wrapper around the functionality.

So if you have a good idea, or have an community plugin you want to use in neovim, please consider making one, or just propose one, so that folks can be inspired :)

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

The original was posted on /r/neovim by /u/SoggyVisualMuffin on 2025-06-24 02:36:10+00:00.

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

The original was posted on /r/neovim by /u/crybaby0987 on 2025-06-23 12:57:36+00:00.


This is more of an Obsidian related question, but I am posting this here to understand how other Neovim users dealing with this.

So when I write content in Neovim it looks pretty (I use a code formatter for markdown - Prettier) but it looks horrible in Obsidian (the idents are missing + I am not able to visualize how things will actually look inside Obsidian when I write my notes using Neovim).

https://preview.redd.it/3g8zkbpqbo8f1.png?width=1178&format=png&auto=webp&s=4222c8c126515f72ad45ee44c26ade40a54434b7

The same note open with Obsidian (note the ident in the bullet point & task)...

https://preview.redd.it/a1qw9j8aco8f1.png?width=1352&format=png&auto=webp&s=24c379f1e9d77da1b08931af5241c0d7189d2520

I can't ditch Obsidian because it lets me preview images, youtube videos, has plugins to query my notes for tasks, etc.

But I love typing inside neovim & prettier to format the the content using prettier quickly.

Should I stop taking notes using neovim? Because I can't predict how a markdown viewer is actually going to render the contents?

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

The original was posted on /r/neovim by /u/Advanced_Error957 on 2025-06-23 21:16:27+00:00.

view more: โ€น prev next โ€บ