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
2
votes
1answer
2k views

Jedi module is not found (deoplete)

:checkhealth shows neither errors nor warnings about jedi: health#jedi#check ==================================== ## jedi #### Jedi-vim debug information ##### jedi-vim version - jedi-vim git ...
0
votes
1answer
20 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
12 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
150 views

How to set the diagnostic level for neovim lsp

By default the lsp has set the diagnosticLevel to Hints, i wanna set this to information level. I tried looking at various places but couldn't find much. I am using LunarVim config if that gives extra ...
0
votes
1answer
18 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
18 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 ...
1
vote
1answer
24 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
0answers
17 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
46 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 &...
0
votes
1answer
19 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
0answers
14 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
15 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
16 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
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 ...
0
votes
1answer
13 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 ...
2
votes
1answer
51 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
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 ...
1
vote
1answer
2k views

Correct way to setup python version for coc

I want to set PYTHONPATH and python interpreter according to projects I am working on. I am working both on projects involving python 2.0, and ones involving python 3.0. There is the concept of ...
0
votes
1answer
18 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.
1
vote
1answer
113 views

Completion sources not recognized by nvim-cmp

I recently transitioned from LanguageClient-neovim to built-in lsp support and completion using omnifunc. However I was enticed by the promise of auto-imports and completion snippets including ...
10
votes
5answers
5k views

Use case for neovim terminal emulator?

One big difference of neovim and Vim is that neovim includes a terminal emulator that works asynchronously. However, I fail to see how can I profit from this feature. For what can I use it? Can you ...
0
votes
0answers
40 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
100 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 ...
15
votes
2answers
3k views

How to patch add in Fugitive plugin

This screen I got after running the :Gstatus command Then I moved the cursor to init.vim file and pressed the p key, i.e. run git add –patch for the current file. Now I have this screen As you can ...
2
votes
0answers
45 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....
0
votes
2answers
39 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 :(
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.
1
vote
0answers
30 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
31 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
27 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 ...
-1
votes
2answers
2k views

short key mapping by lua for neovim

the simple why to remap key in lua is: vim.api.nvim_set_keymap('n', 'foo', 'bar', { noremap = true, silent = true }) but i want a simple syntax like vimScript: nnoremap foo bar n_keymap('foo','bar') ...
0
votes
1answer
154 views

ever since i moved from vim to neovim, my AG has started acting strange

I recently switched to neovim, but ever since my AG usage have acted weird lately. Here is my current .vimrc file. Here is my neovim init file ~/.config/nvim/init.vim: set runtimepath^=~/.vim ...
0
votes
1answer
43 views

Is it possible to exclude special buffers from the v:oldfiles list?

I use the :oldfiles command a lot, but it's annoying that it gets populated with things like terminal or help buffers. My understanding is that any buffer for which a mark exist will be listed by the ...
4
votes
1answer
823 views

How to delete non-empty directories in netrw (vim 8 or nvim)?

I will try to delete some non-empty folder in netrw by pressing SHIFT + d and, after press y, i got this error: (netrw) unable to delete directory {path} I already put this variable in my .config/...
0
votes
0answers
11 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 ...
0
votes
1answer
33 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
1answer
88 views

How to get range value of a ex-mode command in Lua?

I want to get the range of ex-mode command in Lua(eg 1 and 3 in 1;3d). The range value should be stored as a:firstline and a:lastline in vim, but based on the doc, a is not implemented in the vim ...
1
vote
0answers
32 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 ...
0
votes
1answer
88 views

Vim locks up completely when pressing `ctrl+w` while using tmux + vim

I have a tmux + vim setup in which I use split panes. Every time I press ctrl+w to move between the vim panes, my vim instance becomes completely unresponsive. At first I thought this was a tmux issue ...
1
vote
1answer
54 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
44 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 ...
2
votes
2answers
392 views

Get value of $MYVIMRC from Lua

I am trying to retrieve the value of $MYVIMRC in my init.lua but I am coming up short because I don't understand what $MYVIMRC actually is. It is not a global variable, is it? None of these work: vim....
0
votes
1answer
17 views

How to show Chinese characters in Floating Terminal inside Neovim?

As title. Also I'm using Neovim inside Tmux. I've tried both with/without Tmux and the results are the same:
8
votes
3answers
7k views

open coc-definition in new split in coc

I am using coc.vim in neovim. coc.vim suggests the following mapping for jumping to the definition of a class/method. nmap <silent> gd <Plug>(coc-definition) If there is only a single ...
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
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
25 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 ...

1
2 3 4 5
18