Questions tagged [neovim]

A project that seeks to refactor Vim. Use this tag for questions specifically regarding Neovim-only features (i.e. features not found in Vim and other Vi-like editors).

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

Use tilde ~ in substitution inside neovim?

In vim 8.1 (tiny), I can use ~ in a substitution, but it won't work when using neovim 0.6.0. For example, if I have a file with the text: one two three And I enter vim with "vim -u NONE -N",...
1
vote
1answer
13 views

How to open an existing file in a floating window

For a plugin, I want to open an existing file situated in lua/myPlugin/ in a floating window, so whatever the actual pwd is, this file is always the one to be opened. It sounded easy, but I'm ...
0
votes
0answers
8 views

How to include local as highlight group?

I thought thats super duper easy to customize. But it seems it aint. Or at least i dont find the correct file, command or what so ever to archieve this. To put it simply i just want to have the ...
0
votes
0answers
24 views

How do I paste with newlines on a terminal tab?

I can open a terminal by typing :terminal, however it doesn't paste newlines, so it concantenates everything as a single string. Why does this happen? I am using neovim on windows 10, could this be an ...
0
votes
1answer
35 views

How to configure options in :terminal (NeoVim)

I've read the help section for term, terminal, termopen, buftype, and I've read several stack questions, but I haven't been able to find a solution for settings options in terminal mode. I know about ...
0
votes
1answer
19 views

Temporarily enclose visual mode selection in parenthesis before executing command

I'm using neovim for working with Elixir, with the neoterm plugin which gives me REPL functionality. A well known challenge is that the fact that the terminal evaluates and executes code line by line, ...
0
votes
1answer
12 views

Automatic removal of indent in markdown (fenced) codeblock comments starting with #

When writing indented fenced codeblocks (the only ones I use) like ```sh some shell code ``` in markdown the indentation of comments is automatically removed when I type the comment ...
0
votes
0answers
4 views

Finding a way to remove right brackets of the lsp completion

Is there any way to remove the > in .h>? As the gif above, it duplicates the one in the #include <> snippet. Both completion seems to be provided by the lsp. environment Neovim v0.6.1 ddc....
1
vote
0answers
19 views

NerdTree displays odd horizontal lines

I feel like this must be in my .rc somewhere, but I'm using a very similar setup to what I used on my previous laptop. I can share my .rc files if needed. In the first image there are no lines ...
0
votes
1answer
30 views

How to use cmdline to send key `<ESC>`?

As title. I need to use this in a script to close the current floating window.
0
votes
0answers
14 views

Easiest way to highlight/underline specific words (by location) in a file based on the output of an external program?

I have a program that I run on a file and the output of the program is a line number. If I save this line number in a temporary file, can I get vim to automatically highlight or underline this word/...
0
votes
1answer
24 views

Can't fully remove color scheme's background in nvim

I want to keep my acrylic powershell background while using neovim, which requires blocking my colorscheme's background (currently trying sainnhe/everforest). I've put hi Normal guibg=NONE ctermbg=...
0
votes
0answers
22 views

Formatting markdown text: Respect code blocks and tables

I set setlocal formatoptions+=tl textwidth=80 setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n setlocal formatlistpat+=\\\|^\\s*[-*+]\\s\\+ in my ftplugin/...
0
votes
0answers
12 views

Lua syntax errors when using `Packer` plugin manger with `config=require()` in Neovim

I'm using neovim 0.6.0 and my config is written in Lua. My init.lua file requires files such as mappings and plugins. I use packer to manage plugins, and when calling the packer use command I can pass ...
0
votes
1answer
25 views

Compile C++ in vim

I want to make a shortcut for compiling C++ file. I use :map <F5> :!g++ % -o app && ./app <CR>. How can I edit it to set output file's name, C++ file's name without .cpp instead of ...
0
votes
0answers
19 views

Why does Neovim load from both .config/nvim/ and .local/share/nvim/?

Neovim will load configuration from ~/.config/nvim/, and it also loads configuration found in ~/.local/share/nvim/site/ . In contrast, Vim loads configuration from ~/.vimrc and ~/.vim/ , it doesn't ...
1
vote
1answer
39 views

How do I install a package in Neovim without a package manager?

I would like to install a package in Neovim (nvim), but I don't want to use a package manager like vim-plug. I want to keep my configuration as minimal as possible, which is why I want to avoid a ...
0
votes
1answer
25 views

Where are neovim's cached, file-specific settings?

Vim has a ~/.vim/view/ directory for storing file-specific settings, such as saved cursor position and any command manually ran while viewing a file. Sometime, when I would update and source my vimrc, ...
1
vote
1answer
54 views

nvim popup vs vim popup

I'm planning to write a simple pop-up for myself and I found a nice beginning point for this in this question, but I want to make the code compatible with nvim as well. I can't seem to find a similar &...
1
vote
0answers
30 views

Reformatting with neovim LSP and clangd adds double carriage return (^M) on line breaks

I am using neovim (0.6) and its built-in LSP with clangd-12 for C++. When reformatting a file that uses DOS-style line endings, it for some reason uses a double carriage return, resulting in one ^M ...
0
votes
1answer
16 views

How to fetch latest neovim appimage from terminal?

I would like write a script that automatically fetches the latest Neovim Appimage from the releases page, I was trying to see if I can use wget to access the latest appimage, but that would require me ...
1
vote
0answers
17 views

How to customize how neovims "shell command buffer" is shown?

I am wondering about the behavior of the buffer that appears in the bottom of the terminal when running a shell command in neovim. How can I make it appear the right side instead? How can I make the ...
0
votes
1answer
20 views

How do I change my language in my init.lua? - neovim

I've got the problem that the neovim language is set to German for some reason even though I only use a German keyboard layout (see this question). Unfortunately I am using lua for configuring neovim (...
0
votes
2answers
24 views

How to execute arbitrary key sequence {count} times

The problem I wish to solve, first of all, is when you want do do the same editing on multiple lines, but they are not aligned so you can't use Ctrl + V, maybe the lines are not even adjacent. In ...
0
votes
1answer
35 views

Splits on different monitors

I'd like to edit the same file at two different locations, let's say at the beginning and at the end of the file. Splits (:sp) are a natural way to do this. I have two monitors available and it sure ...
2
votes
1answer
54 views

Emoji does not render correctly when yanked from Neovim and pasted into a macOS GUI app like TextEdit

My issue I am new to Neovim/Vim, and I am using the Neovim from Scratch config as a starting point. It works well for me for the most part. I have a peculiar encoding issue affecting emoji that ...
0
votes
1answer
20 views

NeoVim: How to move the cursor to a window by its window number?

As title. After doing windo it seems like Vim forgot where it started.
0
votes
1answer
23 views

neovim receives unwanted characters (mac/iterm2)

I am trying to set up neovim on my mac. Using iterm2 and having installed nvim through homebrew. When I launch nvim from my fish shell, it immediately shows 112 q112 q on the last line. This does ...
0
votes
0answers
43 views

Moving the visual selection up by 1 line using Lua (NeoVim)

So I am trying to create a Lua function to move the visual selection elsewhere. For question simplicity, lets assume 1 line above the current visual selection position. This question is not about ...
0
votes
1answer
135 views

Neovim 0.5+ setup as Rust IDE

So I am trying to set up neovim 0.5+ as a rust IDE. I am following this guide. Except, as shown in the guide, there is not completion even after doing <c-x><c-o>. I have kept the config in ...
1
vote
1answer
21 views

How to center the current line to 80% height of the current window, in NeoVim?

As title. Since no one wants to become a turtle, I want to setup a behavior like M but instead pin the current line to 80% height (0% start from bottom) of the current window, not to center.
0
votes
2answers
40 views

Use command to move cursor like `^` and `$`, in NeoVim?

As title. How to move the cursor with vim command :...? I want to make a toggle that achieves this behavior but I didn't find anywhere this is explained :(
2
votes
0answers
48 views

:Telescope commands throw error

My environment: OS: OSX 11.6 BigSur nvim: 0.6 I had never used vim telescope before, so this is my first encounter with it. I followed the instructions of installing telescope.nvim and plenary.nvim....
1
vote
0answers
32 views

neovim: breakindent results in slow insert mode

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater ...
1
vote
0answers
40 views

What's the difference between coc-emmet and emmet.vim?

I'm working in HTML and want to choose emmet support for neo(vim) but don't know where to start. Which is better coc-emmet or emmet.vim? Why? How to start to learn basic emmet command? Thanks a lot.
0
votes
0answers
29 views

Can I go to the implementation in the c project with lsp?

I'm separating the functions from main.c to func1.c func2.c, then I'm using util.h to store the prototype (all name of all functions). PROBLEM when I try to go to implementation, lsp leading me into ...
0
votes
0answers
16 views

Problems running neovim in powershell (Empty terminal screen)

i installed neovim from Chocolatey. When executing it in Windows Terminal, PowerShell or Fluent Terminal, the screen remains empty as seen in the first image. But when I do the command :q to exit, if ...
1
vote
0answers
33 views

How to add a new buffer to opening nvim-qt instead of opening a new instance on Windows?

I have set up nvim-qt version 0.6 on my Windows 10 to use it instead of Notepad++. And when I double-click on a file, a new nvim-qt instance will open. But now, what I want is if I double-click on a ...
1
vote
1answer
62 views

JSX highlighting with Neovim and nvim-treesitter

I'm using Neovim 0.6.0 with nvim-treesitter installed and I mostly work with JavaScript, Flow, TypeScript based React projects. This means, I also need syntax highlighting for JSX and TSX. Syntax ...
0
votes
1answer
45 views

Any ergonomic way to shift block of code to left and right in vim and neovim? [duplicate]

I have some key mappings for the block of code up and down vnoremap J :m '>+1<CR>gv=gv vnoremap K :m '<-2<CR>gv=gv So I tried to do the same with H and L vnoremap H <V vnoremap L ...
0
votes
1answer
34 views

Turn off concealed text not working properly

So basically, I'm testing out writing a Latex document in neovim. I want to make this as similar as an IDE as possible, but with some added Vim functionality. That includes having text that I'm ...
0
votes
0answers
15 views

The Indentation of NeoVim is broken on C++20 file?

As title. Now it indents on every other line and it won't add indent after { and press Enter. If you want to see the video I recorded, here: https://www.reddit.com/r/neovim/comments/rlh58n/...
0
votes
0answers
16 views

YouCompleteMe is giving this error when I installed it for neovim. How to fix it?

It is showing me this error. Anyone Please tell me how to fix this.
1
vote
1answer
27 views

Dump output using execute() in neovim

Currently, I am using nnoremap <leader>d :vnew +pu=execute('')<left><left> to dump output in both vim and neovim. I tried it with verbose imap <tab> but it didn't work nnoremap ...
1
vote
0answers
26 views

Inconsistent highlight colors of swap detection line between vim and neovim

I have a question about the highlight group of the warning message Swap file xxx already exists. The following is my .vimrc/init.vim file: colorscheme nord set termguicolors Now I try to open a file ...
0
votes
1answer
18 views

Set all highlight groups starting with a certain name?

Basically I have a long list of highlight groups that start with DevIcon (DevIconPng, DevIconJs etc.), they all come with their own ctermfg and guifg and I would like to change them to a single color. ...
0
votes
1answer
34 views

Mapping a key to escape moves to the next line

I have recently started using neovim and am having a problem. I have mapped <leader>m to <esc>. It seems to be working fine but has a small problem. It moves to the next line after getting ...
0
votes
0answers
31 views

Stack splits left, or: have a fixed width for all vim splits

I've searched high and low for this information but have had no luck. I've recently purchased a very wide monitor, and essentially what I want to do is not have every vim vertical split be an exact % ...
0
votes
0answers
28 views

How to determine the cursor is close to the last line of the file?

As title. I have the following script and I want to set scrolloff to 0 when the cursor is approaching the last line of the current file. vim.cmd [[ augroup switchScrolloffTopBottom autocmd! ...
0
votes
0answers
24 views

Adding a new file:line format for gF for a given file type

I use gF a good amount when getting to the bottom of compilation errors in different tech stacks. With Dart/Flutter, I'm getting the error messages in the following format: lib/main.dart:58:34: Error: ...

1
2 3 4 5
18