Neovim

1703 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
 
 

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
2
3
 
 

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

4
 
 

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?

5
 
 

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.

6
 
 

I'm trying to use LazyVim https://www.lazyvim.org/ to create and edit ansible playbooks and roles, but for the live of my I don't understand how to enable ansible-language-server.

The installation of lazyvim went flawless and after starting nvim I used the command :Mason to install:

  • ansible-language-server
  • ansible-lint
  • yaml-language-server
  • yamllint

but still, when opening a task or playbook file in nvim, i don't get any of that cool features like snippets and automatic syntax checking like I hoped.

Can anyone give me a hint how to enable those? Mason says the plugins are installed, is it only a problem of nvim not recognizing the filetype as ansible? Do I need to enable some plugins via .config/nvim/lua/plugins? I'm out of my element here, help would be much appreciated.

7
 
 

out of curiousity, since I feel like most of the time I touch any vi derivative it’s because I need a text editor on a command line, not because I really really wanna use it

8
 
 

Just wondering: how would you characterize the general feel of the different nvim flavours: LazyVim, Chad, Astro, etc.? I'm not thinking functionality, which plugins are included, etc., but the way they feel when one uses them.

I tried out a whole bunch of them, as per Elijah Manor's excellent video about config switching (https://www.youtube.com/watch?v=LkHjJlSgKZY)

I figured out LazyVim is trying its best not to look and feel like vim, with modal windows and fancy graphics and all. I didn't like that. I can't remember why I left Astro behind, but I finally settled on Chad, which at first I disliked because of the name, but eventually I figured out that that was the flavour for me: so many things just worked as expected, and there were so many times when I looked up something, and went: "Hm! That was quite smart, actually!"

So that's where I'm at – and purely for "feel" reasons. So: convince me: what am I missing when I don't use bundle B or config C?

9
 
 

The r***it neovim community is fab and taking part in the go-dark outage protest. I think open source communities are better served by open not for profit, decentralized community-apps like this. The corporaate ones always go bad in the end. Reddit and Github both allowed their data to feed the big tech power grab that is LLMs.