Skip to main content

Questions tagged [neovim]

Use this tag for questions specifically regarding Neovim-only features (i.e. features not found in Vim and other Vi-like editors). It should only be used if the problem does NOT occur in Vim or other Vi-like editors.

Filter by
Sorted by
Tagged with
2 votes
1 answer
106 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
22 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
1 vote
1 answer
161 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
47 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
1 answer
109 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
225 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
  • 509
0 votes
0 answers
43 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
227 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
26 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
81 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
48 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
  • 33
0 votes
0 answers
119 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
54 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
20 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
55 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
22 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
65 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
32 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
14 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
17 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
17 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
39 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
316 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
32 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
59 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
29 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
36 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
79 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
53 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
38 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
45 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
88 views

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
62 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
59 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
45 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
132 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
  • 704
0 votes
1 answer
41 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
25 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
52 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,621
0 votes
1 answer
58 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
212 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
47 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
0 votes
0 answers
58 views

How do I compile glossaries using vim-tex?

I initially asked this on the LaTeX stack exchange, but there seems to be little input: https://tex.stackexchange.com/questions/712127/compiling-glossaries-with-neovim TL;DR: how do I set up the ...
Mstislav Keldysh's user avatar
1 vote
1 answer
224 views

installing and using R-nvim plugin with nvim with vim-plug

This is an elementary question really, for which my apologies, but I have been using vim-plug as my plugin. I usually have done the following: call plug#begin('~/.vim/plugged') " common ...
user3236841's user avatar
1 vote
2 answers
209 views

How to start search manually from a command or mapping, after remapping /?

After remapping / to something other than search, how can I open the builtin search interface? Normally in Vim, when you press /, a / appears in the bottom-left (where the command line also would be), ...
minseong's user avatar
  • 2,383
2 votes
1 answer
32 views

Neovim: Making a function that checks the beginning of line and acts depending on it

Extra details, The whole code: local obsidianSettingsGroup = vim.api.nvim_create_augroup('Obsidian Group', { clear = true }) vim.api.nvim_create_autocmd('FileType', { pattern = {'markdown'}, ...
Crimson Crusader's user avatar
1 vote
1 answer
32 views

Why does iterm show vim's logo instead of neovim when a buffer is opened in iterm2? [closed]

I'm curious if anyone knows how/why the logo uses vim instead of neovim's logo. I'd love to dig into and learn how to fix it. I apologize for the size of the pictures but this is what I mean. You can ...
user50568's user avatar
0 votes
1 answer
144 views

Using Alt instead of Ctrl for vim-tmux-navigator

I recently configured vim-tmux-navigator and I'm enjoying it. However, the binding of ctrl-K overrides the kill to end of line command in the terminal and I use this a lot. As such, I want to bind ...
Stephen Rasku's user avatar
0 votes
1 answer
29 views

Proper way to execute "g<Tab>" to switch to a previous tabpage from neovim

This works, but it's pretty ugly, just wondering if there's a better way: vim.cmd[[exec "g\<Tab>"]] None of these work: vim.cmd.normal("g<Tab>") vim.cmd.normal("g\...
synic's user avatar
  • 115
1 vote
1 answer
191 views

Pyright LSP, leading spaces appears as "&nbsp;" in hover

I am using pyright LSP with the neovim (0.10.0-dev), and am seeing any leading spaces in docstrings replaced by &nbsp;. For example, see the attached image: As far as I can tell it seems very ...
Tom's user avatar
  • 11

1 2
3
4 5
37