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).

521 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
0 answers
657 views

Persistently fix the height of a split in vim

So I searched the web far and wide and I can not for the life of me figure out how to do this. I have the following key binding: nnoremap <leader>o :below 10sp term://.//$SHELL <cr> :set ...
Otis Wright's user avatar
7 votes
0 answers
14k views

Is there any similar way in vim to get standard path like neovim stdpath function

In neovim, we can get default standard path via stdpath() function. I wonder if there is any way to do that in vim. below is the help doc about stdpath() in neovim: stdpath({what}) *...
ZMJ's user avatar
  • 273
7 votes
1 answer
2k views

Use :terminal to display file with ansi escape codes

I want to display a file in Neovim with ansi terminal escape codes interpreted. I created a file which contains ansi escape codes (only colors for now, we can think about others as a bonus): echo '\e[...
Lucas's user avatar
  • 1,599
6 votes
0 answers
494 views

How to get bold comments in vim

I am trying to add bold comments to my vim files. What i mean, is to be able to get something like this: I saw other articles like this that allow to toggle bold comment. The proposed solutions from ...
needle's user avatar
  • 181
6 votes
0 answers
667 views

How to exit insert mode if pressing escape merely types "^["?

I have neovim 0.4.2 running in a session of kiTTY 0.17.4 on OSX. I have pasted a long url while in insert mode. After doing this, every time I type BKSPC vim adds ^? to my document. Every time I type ...
Andrew Farrell's user avatar
5 votes
1 answer
1k views

How do I perform a code action on a visual range in Neovim 0.9?

In Neovim 0.8, I had the following command mapped vnoremap <leader>a :lua vim.lsp.buf.range_code_action()<cr> which in visual mode, gave me options such as Wrap In Try-Catch/Extract Method ...
pinoyyid's user avatar
  • 153
5 votes
0 answers
39 views

Neovim makes spurious directories and doesn't clean them up on exit

Neovim makes directories in my home folder (presumably to store swapfiles, etc.) of the form nvimzOvQcg, nvim098eqo, nvimUyUGZ8, etc. Upon exit, the contents of these directories are cleaned up but ...
user26306's user avatar
5 votes
0 answers
1k views

(Solved-ish) neovim: Don't close :terminal buffer after process exit

In Vim, when I run, for example, :terminal python3, and, when I'm done, exit python, the terminal window stays open as a readonly buffer, which I can inspect freely. In Neovim, I always get "[Process ...
LunarLambda's user avatar
5 votes
0 answers
9k views

How to delete swap files on neovim?

While editing a file my neovim crashed when I tried to save the file (with the error message "init.vim" 77L, 2423C writtennvim(5888,0x7fffa9f29340) malloc: *** error for object ...
Blaszard's user avatar
  • 545
5 votes
1 answer
2k views

How can I configure nvim to use a single escape to exit insert mode?

I was trying out nvim (neovim) for the first time and I find that I have to type <escape> twice to get out of insert mode. I'm not sure if this is a feature or a bug. I see the same behaviour ...
Peeter Joot's user avatar
4 votes
0 answers
962 views

How to disable semantic highlighting for certain filetypes only?

Using Neovim's native LSP interface, I noticed that semantic highlighting provided by LSP makes things worse for certain languages, so I want to disable it based on filetype. I know about possibility ...
Thunderbeef's user avatar
4 votes
1 answer
184 views

How to normalize a file path opened from the quickfix window?

Setup I am using NeoVim v0.7.2 (also tested with v0.6.1) on Windows 10 in git-bash, with vim-dispatch to allow for asynchronous builds (building a C++ codebase with Clang). I have this option in my ...
Ad N's user avatar
  • 141
4 votes
0 answers
1k views

Can (Neo)Vim be configured to set the filetype according to the shebang?

Lately I've been using neovim to edit lots of files with the .tmpl extension. These files all have shebangs, most (but not all) of which are #!/bin/sh. The default behavior seems to be that neovim ...
Brian Fitzpatrick's user avatar
4 votes
0 answers
211 views

Mapping that works in Vim does not work in Neovim

I use Tim Pope's plugin vim-unimpaired, and one of the shortcuts that it enables is "bubbling" text (moving a line or a set of lines up/down). In normal mode, the shortcut for bubbling text ...
Michael P. Geraci's user avatar
4 votes
0 answers
148 views

How does expression folding actually work?

The following is a stripped down version of my folding function for LaTeX documents: setlocal foldmethod=expr setlocal foldexpr=LaTeXFoldsExpr(v:lnum) " Sections to be folded let g:...
noibe's user avatar
  • 179
4 votes
0 answers
1k views

"^[[201~" character being pasted at the end of file

I'm trying to copy-paste by hand this file, but whenever I paste the contents in vim the last line shows this weird character at the end of the line ^[[201~. My guess is that it's one of those wrong ...
Teodoro's user avatar
  • 153
4 votes
0 answers
924 views

How do I setup Mypy with Neomake

I'm trying to use Mypy with Neomake, but without success. I am currently using flake8 with Neomake, and it works seamlessly, e.g.: def foo(bar): return 1 foo(1) > E305 expected 2 blank lines ...
Jay Lee's user avatar
  • 141
4 votes
0 answers
763 views

Wrong color-theme displayed

I recently saw this video about tmux and vim and instantly fell in love with the color theme used in the video. Luckily the presenter (Nick Nisi) provides a link in the video-description to his .vimrc ...
LastSecondsToLive's user avatar
3 votes
0 answers
436 views

How to disable a lsp server using a specific rule?

I'm on a vue project, and I installed both tsserver and volar, but both of them will be called up when I open a *.ts | *.js file. But for vue project I only want to use volar since both tsserver and ...
ogios's user avatar
  • 33
3 votes
1 answer
78 views

How to call incremental forward/reverse search inside function in Neovim?

I'm trying to implement a search function that finds a pattern and jumps to it without overriding the current searched for & highlighted pattern. Specifically, I want to be able to type out the ...
WalksB's user avatar
  • 497
3 votes
0 answers
1k views

TailwindCSS Intellisense into Neovim

I need someone that has tailwindcss-intellisense into neovim, I haven't been able to set it up since yesterday, I might have at this point to build it from scratch. I followed this two guides: https://...
Atlas's user avatar
  • 31
3 votes
1 answer
2k views

neovim: vim.fn is nil

I have a lua plugins script defining local fn = vim.fn. A couple of lines later it defines local install_path = fn.stdpath('data'). This script is called from my init.vim by lua require('plugins'). ...
Jonathan Scholbach's user avatar
3 votes
0 answers
2k 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....
Mopparthy Ravindranath's user avatar
3 votes
0 answers
525 views

How do I recover a specific swap file?

Last night I wrote a short piece the saved saved and exited (:wq). Then the goat-rope of trying to recover what apparently seemed to vanish stated. Since it was about 3 AM and I was getting no where, ...
hrokr's user avatar
  • 131
3 votes
0 answers
238 views

Delete key appears to remove two characters

I open a simple HTML file and navigate to a section of the file where I want to delete a character. I enter INSERT mode and press the DEL key, this seemingly causes two characters to be removed, ...
HennyH's user avatar
  • 31
3 votes
0 answers
422 views

<ESC> does not exit command-line mode. Neovim on tmux on WSL

nvim is not exiting command-line mode when the ESC key is hit. E.g., the key sequence :ff<ESC>ff gives :ffff at the command-line prompt. The expected behavior is that the first :ff be discarded ...
Liam's user avatar
  • 139
3 votes
0 answers
3k views

View pylint errors using coc and neovim

For the following code there is an error in the gutter, but I don't know how to view the actual message for it. Similarly here: In the bottom right of the editor are warnings and errors: But I don'...
baxx's user avatar
  • 985
3 votes
0 answers
299 views

How to set rulerformat to align left and full width in vim?

I use ruler format like this, set rulerformat=%36(%5l,%-6(%c%V%)\ %f%)%* However, if the filename gets too long, it will be broken. So I like to align left, but It can't be align like statusline %=. ...
ryuta69's user avatar
  • 41
3 votes
2 answers
260 views

Prevent buffer loads within NERDTree

If I have many buffers opened and, if the cursor (focus) is within NERDTree, when I change the buffer with :bn or :bp, the content of buffer loads within NERDTree. There's a way to, before buffer ...
Diego Somar's user avatar
3 votes
0 answers
2k views

How to recover from swap files correctly on Neovim?

My Mac crashed and was forced to restart. So I opened Terminal, try recovering the file, but struggle to correctly recover the file. Specifically, I tried the following command: nvim ~/.config/nvim/...
Blaszard's user avatar
  • 545
3 votes
0 answers
119 views

How to emulate vim job out_io buffer with neovim?

I'd like to make a plugin with functionality that is similar to https://github.com/ramele/agrep and grep-edit in emacs. That is get search results from ag or some other tool that supports multiline ...
user1685095's user avatar
  • 1,141
2 votes
0 answers
22 views

Error setting up julia language server in Neovim

When I try to use julials I get the following prompt: Client quit with exit code 1 and signal 0 These are the lsp log [ERROR][2023-09-24 23:12:43] .../vim/lsp/rpc.lua:677 "rpc" "/...
kay's user avatar
  • 61
2 votes
1 answer
103 views

Use treesitter to jump to next argument without going into nested function calls

I'm hoping to write a macro that involves jumping to a second argument of a function call and deleting it. The function arguments will sometimes include nested function calls, sometimes not, will ...
Michael's user avatar
  • 121
2 votes
0 answers
44 views

Why xdg-open won't launch mplayer when started from within Neovim?

I have my ubuntu 20.04 system set up so that xdg-open launches mplayer for .mp4 files. When I type xdg-open ~/video.mp4 in the shell in terminal, xdg-open launches mplayer and the video plays. But ...
Zoran Loncarevic's user avatar
2 votes
0 answers
342 views

Extremely slow with C++ LSP and fairly big project

How do i troubleshoot what is causing below problem. Problem: neovim unresponsive for several seconds (10-30 seconds) for any keys Setup: Neovim 0.9.2 and neovim nightly workspace with > 900 files ...
Zhivaji's user avatar
  • 21
2 votes
0 answers
176 views

How to search workspace symbols across multiple languages by using LSP in neovim?

I want to search the workspace symbols across multiple languages without opening any buffer. Like what VSCode can do: I tried the following: Neovim built-in vim.lsp.buf.workspace_symbol() Telescope. ...
Birudo Un's user avatar
2 votes
0 answers
74 views

Delay When Closing `:terminal` Window

Long story, short.... Everything's fine on my MacBook, but I have an issue in Neovim 0.9.1 on Windows 10. I see this behavior when starting nvim from the usual shells - Command Prompt (cmd.exe), ...
Phil R's user avatar
  • 471
2 votes
0 answers
509 views

Mapping a "Command" key in neovim / alacritty

I am failing to map Command+T, Command+[ and Command+] keys in Neovim under macOS / Alacritty. I've reduced my Alacritty to be minimal: env: TERM: xterm-256color font: size: 16 key_bindings: - {...
oldhomemovie's user avatar
2 votes
0 answers
347 views

enable `update_in_insert` only for certain extensions

I have several LSP servers I use in neovim with nvim-lspconfig. Some are fast, and most are slow. I can make the diagnostics update while in insert mode by doing something like vim.lsp.handlers['...
Max Coplan's user avatar
2 votes
1 answer
407 views

Cannot open terminal ini nvim

I installed Plugin terminal using the vim-terminal plugin and try to execute :TerminalSplit bash but before the terminal open I got a warning message. Python 2 interface is not installed, using Python ...
Muhammad Fhadli's user avatar
2 votes
0 answers
157 views

CTRL-^ work in Vim but not in Neovim

I'm reading Neovim's usr_07.txt. When I start Neovim like neovim t1.txt t2.txt t3.txt, and then issue :next, the shortcut CTRL+^ is supposed to bring me to the previous file (i.e., the alternate file)....
robertspierre's user avatar
2 votes
0 answers
51 views

Parse files, hidden from the user

I am working on a snippet for C/C++ that can generate switch statements with cases from the types that an enum can have. So far I have some code that can get the type location from the language server....
c60cb859's user avatar
2 votes
0 answers
1k views

What is the file structure of Neovim?

It seems like Neovim has files in many places. The binary is in /usr/bin/nvim. Inside ~/.config/nvim is init.vim, for declaring plugins, and also directories in ~/.config for storing Neovim plugins, ...
Julius H.'s user avatar
  • 239
2 votes
1 answer
129 views

Vimwiki overriding normal md highlighting

I love the concept of Vimwiki, but have a problem with it overriding the default md syntax highlighting. The default works well, and I use it regularly to edit md documents to be used with pandoc. ...
Megymagy's user avatar
2 votes
0 answers
541 views

Edit history in Neovim

I'd like to edit my command history at ~/.local/share/nvim/shada/main.shada to remove some incorrect commands. I open the file with nvim main.shada, remove the commands in question, and close the file....
Matthias Braun's user avatar
2 votes
1 answer
59 views

Where is the text data stored during typing text in insert mode?

I would like to develop a small app in React and Nodejs that sends real-time typed text from my Nodejs/Express server to my React frontend. To do this, I would like to use socket.io. The text data is ...
Piet Pro's user avatar
2 votes
0 answers
3k views

Neovim nvim-jdtls Error Client 1 quit with exit code 13 and signal 0

i tried setting up my neovim with the nvim-jdtls plugin (https://github.com/mfussenegger/nvim-jdtls) But I always get a Client 1 quit with exit code 13 and signal 0 Error Message. I followed the ...
AnxiousBane's user avatar
2 votes
0 answers
1k views

Neovim - blend transparent highlight colors

I am trying to make the NvimTree background a different color than the main neovim window, while retaining transparency set by Alacritty. The desired panel can be made fully transparent with :...
NeovimNoob's user avatar
2 votes
0 answers
1k views

Neovim - How do you call Python from Lua and store the results as a Lua variable?

I am trying to improve a GitHub repository for Neovim called quangnguyen30192/cmp-nvim-ultisnips It's a Lua repository that calls another Vim plugin repository, SirVer/ultisnips , a primarily Python-...
ColinKennedy's user avatar
2 votes
0 answers
301 views

How does neovim handle keyboard input?

In classical Vim, keyboard input is handled fairly archaically, and it's why you can't remap say <Ctrl-M> and <Enter> to different keys or commands. This is probably my biggest gripe about ...
shabam's user avatar
  • 21

1
2 3 4 5
11