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
1 answer
13 views

How To Set Initial Settings On netrw in Neovim?

I'm using neovim (v0.8.3) and like it quite well. Recently discovered netrw and it's nice; I wanted to set some default settings for when the netrw pane opens but what I'm trying doesn't seem to work....
Onorio Catenacci's user avatar
0 votes
0 answers
16 views

Copy text from remote headless Neovim server using local Neovim --remote-ui

I have a docker container running nvim --headless --listen 0:0:0:0:7777 I can connect to it successfully with nvim --remote-ui --server localhost:7777 There does not seem to be any built in copy ...
Jeff Bigler's user avatar
0 votes
1 answer
22 views

Bufferline in Nvim: auto-close or hide [No Name] buffer when other buffers are open?

I'm using Bufferline with Neovim to show my open buffers at the top of the nvim window. I'd rather not see the 'No Name' buffer if I don't have to. I understand that nvim must always have a buffer ...
MikeTheTall's user avatar
2 votes
1 answer
25 views

How can I used mason installed debugpy with nvim-dap-python?

The instructions at nvim-dap-python recommends to install debugpy into a dedicated virtualenv, and the pass the path of the python executable in that virtualenv to nvim-dap-python with: require('dap-...
RubenLaguna's user avatar
1 vote
1 answer
22 views

Ctrl+w Shift+n after :term does not start a normal window

In Vim, you can start the terminal by :term, and Ctrl+WShift+N allows you to treat the terminal window as a normal Vim window. I tried the same in NeoVim, but it does not work. Is it an expected ...
T_T's user avatar
  • 189
1 vote
1 answer
32 views

Why is vim.fs.joinpath() missing from neovim 0.9.5 on macOS?

The online documentation mentions vim.fs.joinpath() but I can't find that on my local Neovim with :help vim.fs.joinpath, it's not on :help lua at all. And :lua print(vim.fs.joinpath) says it's nil. I ...
RubenLaguna's user avatar
1 vote
1 answer
71 views

nvim `select mode` uses wrong keymap for the "first" character

title: "The wrong keymap is used for the first typed character" summary: When entering a snippet my nvim seems to assume the keymap for the fist "typed" character is qwerty, and ...
molleweide's user avatar
0 votes
0 answers
11 views

Prevent some lsp from creating commands

Ocamllsp spawns new commands like OCamlSwitchNewWin, overriding some of mine. How to prevent such ? local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = vim....
Carbone_13's user avatar
0 votes
0 answers
24 views

Tags in help not showing [closed]

Am I crazy or there should be something showing here? When I pass the cursor over there, it seems to go over all the characters of the tag, stepwise at least, but I just see it stuck in that one ...
matiac's user avatar
  • 1
1 vote
1 answer
27 views

Neovim command mode keymap without executing

In my vimrc I had a mapping to read the word under the cursor (<C-R><C-W>) and put it on the command line as an argument ready to search with the GrepperRg tool: nnoremap <leader>gg :...
Noel Evans's user avatar
0 votes
1 answer
23 views

How do I close the quickfix window inside a user-defined function?

If the quickfix window is open, I can close it with :cclose. I can map that to a shortcut key: vim.keymap.set('n', '<C-q>', ":cclose<CR>") vim.keymap.set('n', '<C-q>', vim....
Sasgorilla's user avatar
0 votes
2 answers
35 views

How to escape spaces when setting options in vimscript?

I am trying to set an option in my init.vim. Specifically, it is the path variable, and I need to set it to a value that contains spaces because several of the directories in my Windows path contain ...
Tom Warner's user avatar
0 votes
1 answer
59 views

Error when adding new string to errorformat in init.lua?

In Neovim I want to jump through Python traceback in the quickfix list. To do that, I set the following option :set errorformat+=%.%#File\ \"%f\"\\,\ line\ %l%.%# and this works well. What ...
Fabz's user avatar
  • 1
1 vote
2 answers
69 views

init.lua - Remove default mapping recursively

I want to use the i_CTRL-G mapping to abort the current cmp selection, but i_CTRL-G is already used by neovim. I tried to delete the mapping with this: vim.keymap.del('i', '<C-g>') But it just ...
Bog's user avatar
  • 479
0 votes
0 answers
14 views

How can implement deno organize imports like vscode in neovim with nvim-lsp

How can i implement a command on denols that organize imports like vscode does? I use nvim-lsp example for typescript: local function organize_imports() local params = { command = "...
Igor Brasileiro's user avatar
0 votes
1 answer
26 views

Neovim nvim-cmp don't work autocompletion for path?

Plugins for cmp use("hrsh7th/nvim-cmp") -- completion plugin use("hrsh7th/cmp-buffer") -- source for text in buffer use("hrsh7th/cmp-path") -- source for file ...
serii 's user avatar
  • 91
0 votes
0 answers
21 views

Set the current line limit for jumping in Vim

I want to set a limit for the use of e. Basically e is for jumping forward to the end of words, but I do not want to go to the next line. I just want to jump to the end of all the words in the current ...
mohamadi_arch's user avatar
1 vote
0 answers
25 views

Why won't lazy.nvim update itself?

I'm trying to update to the latest lazy version for quite some time, but lazy refuses to and stays on the same version.
Ciobanu Nicolae's user avatar
0 votes
1 answer
32 views

How to get the value of visual-mode wordcount() in lua script

Objective I am working on writing a keymap through lua script in Neovim: First, selecting some words in visual mode and, in the corresponding lua script, trying to get the value of vim.fn.wordcount()....
HRC's user avatar
  • 23
0 votes
0 answers
29 views

VimTeX: Viewer cannot find Zathura window ID! (Ubuntu 22.04 LTS x11)

The PDF file is not opening with Zathura after the VimTeX compilation. I am using https://github.com/benbrastmckie/.config and the file vimtex.lua in my directory ~/.config/nvim/lua/neotex/plugins ...
raf's user avatar
  • 101
0 votes
0 answers
13 views

clangd No client with id 1

I am running Manjaro KDE and neovim version v0.9.5. I have a slightly modified version of this nvim config and I have downloaded the clangd language server. Everything was working fine and great, up ...
ChrisHusky's user avatar
0 votes
0 answers
8 views

How to know if vim/neovim is focused in tmux when opened?

The autocmd events FocusGained and FocusLost work when switching focus between tmux panes. However, I want to know if vim is focused when it's first opened, I'd like to not run some things if that's ...
fent's user avatar
  • 121
1 vote
1 answer
42 views

What is the reason to not have <C-c> trigger InsertLeave event?

In the past, I had a problem with the diagnostics virtual text not coming back after exiting insert mode. After a few hours of searching I just gave up. Today I have spend 2 hours trying to get my ...
NicoAnde's user avatar
0 votes
0 answers
17 views

Is it possible to keep the file position using less.sh from neovim?

I added following to my init.vim in order to preserve the last opened file position: if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"...
Piotr Martyniuk's user avatar
1 vote
0 answers
20 views

How to jump to a specific file and line from an error output in Neovim?

I use Neovim as an IDE for Python development. When I execute a Python script inside Neovim using the :terminal command, and an error occurs, I get an output similar to the following: Traceback (most ...
john's user avatar
  • 68
1 vote
0 answers
12 views

How can I jump to a sibling node in Neovim?

Say I want to write a custom function / keyboard shortcut to jump to the next sibling node in Neovim/Lua. In theory, I can get that with TSNode:next_sibling(). But I'm lost as to how I would put the ...
Sasgorilla's user avatar
0 votes
0 answers
8 views

Make vim.execute function dot repeatable

I made the following keybinding to substitute "a/b" with "\frac{a}{b}". -- convert / to \frac{}{} -- (dot repeatable) _G.div_to_latex = function() vim.cmd('execute "normal f/...
robertspierre's user avatar
0 votes
0 answers
9 views

How can I flash/copy a file I am working on to a usb drive natively in VIM?

I am using Lazy NeoVim, and I am also in Computer Science competitively. I am looking at Vim to be a fast alternative to others, such as VS code. However, I am still with the issue of having to flash/...
TheFastPilot360's user avatar
0 votes
1 answer
12 views

Setting guard variables does not prevent default ftplugin/syntax/indent files from running

I want to prevent the default ftplugin/syntax/indent files from running for tex files. I have a tex.vim in the $XDG_CONFIG_HOME/nvim/ftplugin directory, i confirmed it runs before the default ftplugin/...
CoelinG's user avatar
0 votes
1 answer
31 views

Know where there is no more space on pandoc beamer presentation

I write my presentations in Markdown, and use pandoc to compile into a PDF with latex's beamer. An issue I frequently encounter is that I write too much, and so the content gets out of the slide. Here ...
robertspierre's user avatar
1 vote
1 answer
60 views

coc.nvim build/index.js not found please install dependencies and compile coc.nvim by npm ci

how to fix this guys? its my first time to use nvim.. vscode is so laggy on my laptop
user50775's user avatar
0 votes
1 answer
22 views

Why is config files in Windows not in .config

I actually have been wondering for a while why does neovim not use the .config directory that windows has instead of appdata/local
Andre Mossi's user avatar
1 vote
1 answer
46 views

How to find out what's happen between switching from insert & to normal mode? [closed]

When I type something on insert mode and press escape to get normal mode, the cursor goes away and the Neovim does something behind the scenes for a couple of seconds. I can stop this behaviour with ...
ogirginc's user avatar
  • 345
0 votes
0 answers
16 views

Auto importing issue from installed npm packages in neovim (only in js not ts)

I mainly use Neovim for my MERN stack work and it's been a few days, I have noticed that from some of the installed npm packages of my project, I wasn't able to auto-import the functions or components....
Nitesh's user avatar
  • 1
0 votes
1 answer
21 views

How to identify names of lua configuration variables to inspect them?

I load a plugin, and the plug docs tell me that I can configure it using lua code like this, which I might put in my startup file: lua require('plugin_name').setup{ \ foo ...
Mars's user avatar
  • 123
0 votes
0 answers
24 views

nvim-lspconfig cannot go to definition to jdk or external library

I'm using Kickstart.nvim config with enabled jdtls LSP server for java but I have problem with go to function definition. vim.lsp.buf.definition() command (to jump to the definition) works for all the ...
Damian S.'s user avatar
1 vote
2 answers
33 views

Neovim doesn't open previously unopen file in horizontal split

In classic Vi/Vim when I opened a previously unopened file with ctrlp, NERDTree, etc. and the current file/buffer was unsaved, it would open the new file in a horizontal split. After switching to ...
webermaster's user avatar
0 votes
1 answer
25 views

Why is this showing everytime I try to open Neovim?

When I start Neovim I get the following error message: Error detected while processing /home/dell/.config/nvim/init.lua: E5113: Error while calling lua chunk: /home/dell/.config/nvim/lua/core/bootstra ...
Ankit Kumar Sahu's user avatar
0 votes
0 answers
18 views

Remove filename section in command bar in neovim

I have a lualine plugin which also displays a filename section, so essentially i don't need the default one which is on the right, how do i disable it, i tried setting vim.opt.statusline = ""...
user50683's user avatar
0 votes
2 answers
72 views
+50

How do I switch modes inside a user-defined lua function?

I want to write a command to do the following: Make a visual selection. Call a command on the visual selection. By way of example, I'd like to call vat to visually select around the current tag, and ...
Sasgorilla's user avatar
0 votes
1 answer
33 views

How to convert plugin specific vimrc configurations into lua?

I have a full lua config on my Neovim setup. It seems we can't have both init.vim and init.lua on the same setup. I am trying to setup fugitive-gitlab.vim, but it provides vimscript instructions. Both ...
Varun Gawande's user avatar
0 votes
0 answers
21 views

In Neovim which-key, how can I show the command instead of the description?

I'd like to make the label for each keymap the keymap.rhs instead of keymap.desc in the folke/which-key.nvim UI menu, even when they are both defined in the keymap. keymap.rhs is displayed by default ...
ql88888's user avatar
0 votes
0 answers
26 views

How to close unnamed, unmodified buffer when hidden?

I'm currently trying to set this up using the following autocommand, but it is not working for some reason. -- Delete unnamed, unmodified buffers when they are hidden. vim.api.nvim_create_autocmd(&...
jinscoe123's user avatar
2 votes
2 answers
111 views

Neovim has wrong background setting

I'm having a trouble with Neovim colors when using my vimrc file as Neovim's init.vim. Here's the expected look, how it looks in Vim: And here is how it looks in Neovim: I guess that's because of ...
d.k's user avatar
  • 692
0 votes
1 answer
27 views

How to navigate a soft link from netrw?

I just want to navigate the contents of a soft link that points to a directory using netrw. How can I navigate into it? My OS is: Arch Linux and I use: Zsh
Thesevs SCUTULATUS's user avatar
1 vote
1 answer
18 views

Range marks aren't set in lua function called from keymap

I'm trying to insert a table of contents with an external process. Currently, I have this: .config/nvim/after/ftplugin/markdown.lua --- @param v boolean local function toc(v) if v then vim.cmd([[...
theherk's user avatar
  • 133
1 vote
1 answer
33 views

clientserver with sockets in regular Vim?

I read somewhere that you can use a socket do clientserver functionality but I can't figure out where the socket is. Is it a file socket in the file system like mysql used to use? Is it a tcp socket? ...
leeand00's user avatar
  • 3,577
0 votes
1 answer
26 views

Neovim coc-html don't use auto-closing tag for macros?

I am using neovim and coc.vim for lsp. Also for html used coc-html. But i have an bug, when write or use macros, have 2 closing tags. How can i disable this behaviour? Thanks in advance.
serii 's user avatar
  • 91
0 votes
0 answers
72 views

What is the difference (if any) betweeen vim.fn.getcwd() and vim.loop.cwd()?

I saw that the harpoon2 plugin uses vim.loop.cwd() in here, and then it got me thinking what is the difference between using vim.fn.getcwd() and vim.loop.cwd(). The following code returns the same ...
RubenLaguna's user avatar
0 votes
1 answer
36 views

VimTex is nonstop compiling if gnuplottex is used

I am using VimTex to write LaTex. I am trying to use gnuplottex in my documents, but get the problem that VimTex won't stop compiling the tex file. I am guessing that some gnuplot related files are ...
dragontec12's user avatar

1
2 3 4 5
35