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
1
vote
1answer
28 views

BufDelete running after window is closed

For some reason, the BufDelete autocommand is being executed right after a window is created, instead before, and i think it shouldn't be like that, according to the docs: Before deleting a buffer ...
2
votes
2answers
59 views

how to navigate to a file or a function using neovim or vim?

All, I am pretty new to NeoVim or Vim and i have setup vim for scala development. Everything else seems to be working fine. The only hiccup i have is i am not able to navigate to a file or function. ...
2
votes
0answers
38 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, ...
0
votes
0answers
68 views

LspConfig code action does not work

I have problems with LspConfig when extracting a method to a new file. When executing the following command buf_set_keymap("n","<space>ca","<cmd> lua vim.lsp.buf....
0
votes
1answer
76 views

How to get the Lua version of Neovim?

As title. From nvim -v it only shows about the version of LuaJIT: NVIM v0.7.0-dev+714-g3aff3d634 Build type: Release LuaJIT 2.1.0-beta3
0
votes
0answers
37 views

Auto update a buffer opend in a split when it changed?

I'm writing TypeScript and there is a command npx tsc --watch that will (over)write to an output file every time the source file is changed. I open one split for each of these files. But when I save ...
1
vote
0answers
39 views

How can I launch interactive terminal programs in neovim just like I can do in vim? [duplicate]

I'd like an easy way to switch from neovim to vim for the reason of, some plugins are not compatible with neovim (Ultisnips). I hope'd I could just run :!vim however that doesn't work - errors appear: ...
1
vote
1answer
60 views

Custom Arguments to User Command

I am trying to create a command that runs a function, however, I can seem to get custom arguments that are autocompleted when pressing Tab. How would it be possible to set these arguments? The current ...
1
vote
1answer
21 views

`:verbose map` doesn't list origin of some mappings

I'm trying to debug a mapping of the key Y. :verbose map gives the following snippet: ... noxW * repmo#SelfKey('W', 'B') Last set from ~/.dotfiles/vim/.config/vim/vimrc line 446 n Y ...
1
vote
1answer
26 views

Make `!` work with powershell (neovim)

I want to use ! with powershell. I use neovim natively on windows. I tried these settings set shell=powershell.exe set shellcmdflag=-NoProfile\ -NoLogo\ -NonInteractive\ -Command set shellpipe=| set ...
1
vote
0answers
30 views

Make `%!` work in windows

I am on windows natively with neovim-qt . I tried to use %!python -m json.tool on a valid json file . It says Expecting value: line 1 column 1 (char 0) . In powershell : cat .\graphs.json | python -m ...
1
vote
0answers
31 views

Using inline cmdline expressions in windows

I wondered if I could use inline cmd expression like in the example :args ``find -iname *.py`` So, I wanted to either use WSL expressions(same as above) or powershell (Get-ChildItem C:\temp | Select-...
0
votes
1answer
62 views

How to run a bash one liner within nvim

I am running the latest version of nvim on the latest version of arch. I have this bash one liner which works as intended echo; lpstat -p | sed 's/printer //g' | sed 's/is idle. enabled since.*//g'; ...
1
vote
2answers
83 views

How to robustly use D- mappings in terminal nvim?

I'm using kitty to run terminal nvim on macOS. I want to use D- (command-key) mappings inside nvim. Because terminals, for reasons I don't understand, don't simply pass command-key chords through to ...
0
votes
0answers
89 views

NeoVim nvim-tree.lua, tree view displaying every folder and file duplicate

I am using nvim-tree.lua with my nvim When i open my tree view it is displaying duplicate files and folders. Here is my config require("nvim-tree.events").on_nvim_tree_ready(function() ...
1
vote
1answer
59 views

Split a window without splitting tab

first time asking question here. I have been using [N]VIM a lot over last few months and really enjoying it so far. But have been struggling to get a particular editor layout setup and starting to ...
0
votes
0answers
39 views

How to change color of the text on statusline?

I use a airline for my nvim and vim config (share between both) and I want to change the font color of the status line. I tried using base16_solarized_light or dark but I don't like it and would like ...
1
vote
0answers
155 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 ...
0
votes
0answers
117 views

How to reset neovim setting on MacOS to its default completely

I installed neovim on MacOS Big Sur via homebrew. Then created the init.vim using vim-bootstrap (the languages I picked were C, Go, Haskell, Ocaml, and Rust) and put it on ~/.config/nvim/init.vim. ...
0
votes
1answer
18 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:
0
votes
1answer
291 views

Neovim LSP with Go

I am trying to set up my Neovim (nightly - latest) with Go (the programming language). However, it doesn't seem to be working, most likely because I'm missing something. I'm not sure what though. ...
1
vote
1answer
22 views

Tab page is closing when deleting buffer

I'm using bufferline.nvim in order to display both buffers and tab pages on the tabline, whenever i delete a buffer with bd, all the buffers on that tab page are deleted as well, alongisde with the ...
1
vote
1answer
120 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 ...
2
votes
2answers
53 views

How to do no higlight search in a mapping?

I want to write some mappings so I can move faster between the code. The problem is that I have hlsearch on(and i don't want it off) so I did it like this: au BufNewFile,BufRead *.py nnoremap <...
1
vote
0answers
73 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 :...
1
vote
0answers
29 views

How make vim/neovim output window to show carriage return (\r) correctly

I am running an external command (ninja build) that uses carriage return \r to overwrite the last printed line. From the terminal: $ ninja -C build [2/2] Linking CXX executable a.out From vim: :!...
0
votes
1answer
67 views

Neovim deletes itself after some time

I'm new to Vim/Neovim and I'm taking the firsts steps on the editor, but for some unknown reason the nvim.exe binary just deleted itself from the folder three times. The first time I installed via ...
1
vote
1answer
43 views

Echo filename before deleting buffer

I would like to echo the filename before deleting any buffer (:bd, :q). I wanted to achieve this by using auto-commands like this: augroup DummyCodeGroup autocmd! autocmd BufDelete * lua print(...
0
votes
1answer
84 views

rust-analyzer not working in NeoVim on Windows 10

I'm trying to get rust-analyzer working in Neovim, but with no luck so far. I've downloaded the rust-analyzer binary (rust-analyzer-x86_64-pc-windows-msvc.gz) from the rust-analyzer releases page and ...
0
votes
0answers
65 views

neovim lsp client jump to implementation in another project

Nvim info NVIM v0.5.1 Build type: Release LuaJIT 2.1.0-beta3 Also using nvim-lspconfig, and tsserver Filesystem dir structure |--home |--project-A |--src |-- |--/* ...
1
vote
2answers
79 views

Some migration problems from vimrc to init.lua

How can I simplify the following codes in my init.lua? (For "simplify" I mean that by vim.cmd(...) you're actually letting Lua run vimscript under the hood. But there is probably a Lua API ...
0
votes
0answers
48 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-...
1
vote
0answers
77 views

My $VIMINIT causes a warning in :checkhealth in neovim

I have this in my .bashrc file so that I can use two different configuration files for vim and neovim: export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : &...
2
votes
1answer
118 views

Set current working directory when opening vim

When opening neovim via nvim /path/to/directory I want the current working directory of vim to be set to the given path instead of the current path of my terminal. When opening a file instead it would ...
1
vote
0answers
37 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 ...
0
votes
0answers
25 views

how to copy text with mouse when nu and mouse=x is set in neovim

The only time the mouse does not select the numbers when mouse is set is if mouse is set to v. But you cant copy the text with right click or menu key.
-2
votes
1answer
295 views

Error while configuring nvim cmp

I am trying to configure nvim-cmp (https://github.com/hrsh7th/nvim-cmp), by adding the following lines to ~/.config/nvim/lua/lsp-config.lua. After this, when I start nvim, I get an error as shown in ...
0
votes
0answers
47 views

Cursorline became black when cursor is moving

If I change the colorscheme by <option>+12345 :colorscheme newsprint Then when I will firstly got the expected result: But then if I move my cursor by j/k, the clean cursorline gone: I can ...
0
votes
1answer
323 views

How to use packer.use inside neovim?

I was switching vimscript to lua in neovim, and I saw packer.nvim is a famous plugin manager for lua. In this README.md file I saw I can use startup function, but it's not required and I can also use ...
0
votes
1answer
114 views

How to transform this Vimscript into Lua?

Can anyone help me transform this into nvim.lua? inoremap <silent><expr> <TAB> \ pumvisible() ? "<C-n>" : \ <SID>check_back_space() ? "<TAB&...
2
votes
2answers
440 views

How to run multiple commands sequentially in nvim?

What I have referenced in my .zshrc file: nvim --headless -c 'LspInstall tsserver | qall' This doesn't work. The qall is regarded as an argument of LspInstall while I didn't mean to. The LspInstall ...
0
votes
1answer
57 views

How to make vim show suggest current word in spellchecking suggestiong if current word is correct?

I often write code, and sometimes I check comments with z= when I am not sure of a spelling of some word. Vim then presents a list of suggestions. However, when I got the spelling right and the word ...
0
votes
0answers
32 views

highlight clear SignColumn isn't taking effect

I can't understand why the setting highlight clear SignColumn in my vimrc doesn't seem to work when nvim launches. I've tried appending a : :highlight clear SignColumn. And I've tried adding the ...
0
votes
1answer
114 views

Default init.vim file

For nvim, can anyone show me what the default init.vim file look like? I had to make my own and I don't know what they look like by default
0
votes
0answers
77 views

nvim: how to manually clear popups which do not clear themselves?

While it may not be the only culprit, coc.nvim is a bit notorious for leaving popups hanging around the screen long after they should be cleared. Sometimes, as in the gif below, dangling popups will ...
0
votes
1answer
490 views

How to add `~/.config/nvim' into runtime path for Lua?

In my init.lua I call: require('plugins') require('theme') This works when editing in the ~/.config/nvim directory, where init.lua, plugins.lua and theme.lua are located. But when I run vim outside ...
0
votes
0answers
39 views

Mapping an keyboard shortcut to interrupt the terminal window

I have program running in the neovim terminal window, and I want to interrupt it. I can do so by moving to the window, <C-W>l, going into insert mode, and pressing <Ctrl-C>. Normally, at ...
0
votes
1answer
63 views

Typescript add missing import on cursor?

I'm working on a TypeScript-React project using neovim, because I love it. I want a feature: when my cursor is on a name that has not been imported, I can press some key-combination to choose which ...
2
votes
0answers
91 views

Vim /usr/bin/bash: /s: No such file or directory

Repost from Stackoverflow; I read a comment which directed me here saying it would be more helpful. Just set up nvim; unfortunately, the following error is plaguing the setup. Whenever I try to ...
1
vote
1answer
61 views

expanding parentheses gives undesirable indentation in neovim

This post is not about curly brackets. It is about parentheses. I couldn't find a solution on how to expand parentheses with my ideal indentation. What happens now with expanding parentheses Before (|)...

1
2
3 4 5
18