Neovim

1726 readers
1 users here now

Neovim is a modal text editor forked off of Vim in 2014. Being modal means that you do not simply type text on screen, but the behavior and functionality of the editor changes entirely depending on the mode.

The most common and most used mode, the "normal mode" for Neovim is to essentially turn your keyboard in to hotkeys with which you can navigate and manipulate text. Several modes exist, but two other most common ones are "insert mode" where you type in text directly as if it was a traditional text editor, and "visual mode" where you select text.

Neovim seeks to enable further community participation in its development and to make drastic changes without turning it in to something that is "not Vim". Neovim also seeks to enable embedding the editor within GUI applications.

The Neovim logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 3 years ago
MODERATORS
1
 
 
2
 
 

cross-posted from: https://lemm.ee/post/44036825

I was recently watching a tsoding stream when he was singing huge praises for the compilation mode in emacs, so I created a plug in to do essentially the same thing in neovim. Feel free to test it and share feedback.

error-jump

3
 
 
4
 
 

This is parrot.nvim, the ultimate stochastic parrot to support your text editing inside Neovim.

Frank Röder started this repository because a perplexity subscription provides $5 of API credits every month for free. Instead of letting them go to waste, he modified his favorite GPT plugin, gp.nvim, to meet his needs - a new Neovim plugin was born! 🔥

Unlike gp.nvim, parrot.nvim prioritizes a seamless out-of-the-box experience by simplifying functionality and focusing solely on text generation, excluding the integration of DALLE and Whisper.

Features

  • Persistent conversations as markdown files stored within the Neovim standard path or a user-defined location
  • Custom hooks for inline text editing with predefined prompts
  • Support for multiple providers:
  • Custom agent definitions to determine specific prompt and API parameter combinations, similar to GPTs
  • Flexible support for providing API credentials from various sources, such as environment variables, bash commands, and your favorite password manager CLI
5
 
 

Bram is one of my heroes. That’s literal and recursive: when I say it, internally I check before making a frivolous claim, which is a feature of this particular role-model; “What would Bram do?” is a fixture in me which informs my choices.

Those who studied vim_dev and the Vim source and docs, accumulated treasure from a stream of copious messages and spare impressions. But also from what he omitted: he never appealed to sensationalism or personal judgements.

Even when treated rudely, Bram usually responded only to advance his understanding of a problem to solve. Bram was one of those humans quietly providing deep value to the universe, but there was no parade and little celebrity.

Bram was anchored to reality, directly interested in results and adjusting what produced them. The “Problem/Solution” mantra in his commit messages is simple yet profoundly effective. He used that approach to help people in Uganda, managing resources directly instead of abstractly.

Bram’s principles (as I observed them) extended beyond mere technical craftsmanship. The ability to adopt a position of modesty is a mind-trick that channels an endeavor through a “narrow waist”, a voluntary constraint. That lens can create a more composable and powerful result. Plugins like unimpaired riff on the theme. And this touches on a central point: the main utility—not ideology, but utility—of “lifestyle software” like Emacs and Vim, is that the ecosystem is alive, and has escape velocity, so its momentum is self-perpetuated.

Neovim has always been intentionally positioned as a derivative of Vim, which means simultaneously it both continues and diverges from Vim. I’m convinced that forks create energy rather than destroy it. So although we can’t deliver Vim without Bram, we can continue some essential parts:

Maintenance: Experimentation is good, and the world needs creative destruction and playful failures. But Neovim does not represent lust for the new (“neomania”). Documentation: the habits of Vim documentation are obvious, this is one of the biggest gains that Nvim acquired by building on vim. Extensibility: Bram’s own Agide project aspired to a similar sort of extensibility as Neovim: Agide is not a monolitic application. Separate tools can be plugged in. Thus you are not forced to use one editor. … Each tool implements part of the plugin interface.

Embedding: Vim’s :help design-not for most of its life proclaimed this tenet of Neovim: Vim is not a shell or an Operating System. … This should work the other way around: Use Vim as a component from a shell or in an IDE.

And another thing: Bram didn’t take himself too seriously. He had his own sense of humor.

Neovim is a monument to Vim and Bram. We should be pragmatic, not dogmatic; we should remember what the goal is, and compare our actions to the results.

— Justin M. Keyes

6
 
 

Hi I've been looking at nyoom.nvim and it alters the UI of telescope (see screenshot) I was just wondering how this is possible? I looked d through the codebase but couldn't find anything other than the setting of colours?

Here is the repo: https://github.com/nyoom-engineering/nyoom.nvim

7
 
 

Is there a Lazy UI for managing Plugins not directly in a Text File, but something more akin to VSCode's Extensions view?

8
9
 
 

hello :))

I hope this post is okay. I just wanted to share, that I've created a new community on lemmy for talking about the modal text-editor Kakoune (inspired by vim).

It is located at !kakoune@discuss.tchncs.de and you're welcome to join whether you're using kakoune already or just want to learn about it :))

10
2
It's LSP portable? (lemmy.world)
submitted 1 year ago* (last edited 1 year ago) by dafunkkk@lemmy.world to c/neovim@sopuli.xyz
 
 

It's possible to install lsp for a language and then export all .local and .config neovim folder to use it as portable install in another closed env?

11
 
 

I decided I was ready to move on from distributions like LunarVim and based my config on kickstart.nvim. I've fixed it up a lot with additional stuff for me and I'm mostly pretty happy with it. The default keymappings aren't my favorite though. No shade on the kickstart team, they just don't fit the way I think.

I'm trying to decide what a good organization strategy might be. What keymappings strategies are out there to get some organization or intuitive groupings?

12
 
 

I'm planning to remove my roles as a moderator and am looking for (hopefully) more than just one moderator to take care of this community. If you're willing to help foster this community then reply in this thread.

It should also be noted that !neovim@programming.dev already has an established mod team and it would probably be a good idea focus efforts there, but nevertheless in the spirit of decentralization it would be good to make this place more actively moderated.

13
 
 

The example below is not working (error is given when neovim is opened not recognising $env_var) how can I let him recognise the env_var?

g = {

name = "+grep",

a = { "Telescope grep_string", "Grep on all dirs" },

s = { "Telescope grep_string search_dirs={"$env_var/dir1/dir2/dir3/"} cr>", "Grep on dir" },

},

Thanks

14
15
 
 

Hi! My plugin modicator.nvim now has support for lualine.nvim out of the box.

Modicator is a plugin that changes the color of the cursor's line number based on the Vim mode, just like statusline plugins like lualine do.

The lualine integration only gets loaded if the plugin gets detected, so it should have no effect on your startup time.

modicator.nvim's lualine integration

16
17
18
 
 

Hello Everyone,

i'd like to ask for your opinion on the following issue:

i've created my own knowledge base based on asciidoc, with some custom shell scripts and a go application for creating backlinks, tags etc. I've chosen this way, as most solitions are based on markdown, which is not standarized and very limited compared to asciidoc, especially from a dev pov.

All my editing, searching etc. is done via neovim, which is very comfortable.

However, i'd like to improve the user experience with the setup, as i'd also like to see the rendered version, especially when adding mermaid diagrams and other things.

I've tried some plugins for the browser, which render the view and update automatically, however they are not in sync with my nvim, so i have to scroll on every save, if i want to see the rendered version. That's not ideal.

Any ideas?

Ideally I'd like some kind of application template, where i can embed a terminal / neovim and a webbrowser, ideally linked via lua scripting, so it integrates nicely. It can also be a completely separate application like anytype, however i've not seen anything that has a proper vim-like module editing support & allows for asciidoc rendering instead of markdown.

19
 
 

Sometimes when I am using goto definition I get errors like this one

E5108: Error executing lua: ...t_nvimeitLsr/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1964: Invalid window id: 1000
stack traceback:
	[C]: in function 'nvim_win_get_buf'
	...t_nvimeitLsr/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1964: in function 'make_position_params'
	...nvim/lazy/telescope.nvim/lua/telescope/builtin/__lsp.lua:147: in function 'v'
	...nvim/lazy/telescope.nvim/lua/telescope/builtin/__lsp.lua:391: in function 'v'
	.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:541: in function 'lsp_definitions'
	/home/user/.config/nvim/lua/user/plugins/ide/lspconfig.lua:80: in function 

What could be the cause of an error like this? Whenever this happens I have to restart nvim.

the config in lspconfig.lua:79 looks like this:

        opts.desc = "LSP: Jump to definition of symbol"
        keymap.set("n", "gd", function()
          telescope.lsp_definitions(ivy)
        end, opts)

Any ideas?

20
 
 

Most of you might know already but I just found out about this today because I needed it. I had thought there's just no way to use escape in norm commands. So I had this file with list of items which were mostly separated by newlines but some of them were separated by spaces so I had to clean it up. It looked something like this:

begin A
begin B begin C
begin D
begin E begin F begin G
begin H

and I needed it to be like this:

begin A
begin B
begin C
begin D
begin E
begin F
begin G
begin H

The beginning of every item was the same string of characters which was helpful. So I had an idea but it required the use of escape in a norm command. I was about to think of some other way that doesn't require escape but then decided to google it and find out if there was a way to use escape. To my surprise it was possible! Why I haven't thought of this before? So this is what I came up with:

:g/.*begin/norm /begin^[hr^M

So the ^[ is an escape and you get it with C-v Esc. Simple as that. The command to organize my list isn't perfect though as it has to be run few times to go through every item but it was enough for my purposes.

TL;DR: Press C-v Esc in command line mode to get escape.

21
 
 

Floating LSP windows now use Treesitter highlighting, VimConf 2023, better template strings, inline LSP references, Kitty integration, and Neovim config for Python development

22
 
 

I am new lemmy user and I wanted to whether there are different nvim communities or same ones like,

  1. https://lemmy.world/c/neovim@sopuli.xyz
  2. https://programming.dev/c/neovim
23
 
 

cross-posted from: https://discuss.tchncs.de/post/3664526

The native Inlay Hints feature is enabled in the nightly version of Neovim. The feature will be part of the v0.10 release once it is available.

24
25
 
 

Neovim v0.9.2 is now available

This is the first Neovim release since Bram Moolenaar passed away and the archival/deprecation of both null-ls.nvim and packer.nvim.

Is anyone running into any issues with this release (particularly if you use null-ls or packer)? How are the Neovim distros (eg - NvChad, AstroNvim, LazyVim, LunarVim, etc.) performing after the update?

https://github.com/neovim/neovim/releases/tag/v0.9.2

#nvim #Neovim #NvChad #AstroVim #LazyVim #LunarVim

@neovim

view more: next ›