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
46 views

How to Vim multiply symbol "a" with a number from clipboard?

I need to multiply symbol "a" with a number from clipboard. For example 3a = aaa In clipboard register is @+. May be to do that throw command line mode, but don't understand how.
serii 's user avatar
  • 59
1 vote
1 answer
912 views

How to configure Neovim clangd to find my files?

I've used LazyVim's mason to install clangd LSP, but it doesn't seem to work properly. It can't find files in my workspace, so when I try to jump to declaration, it does nothing if the declaration is ...
CIsForCookies's user avatar
0 votes
1 answer
30 views

Map `^[` or `<c-[>` in neovim (without mapping `<esc>`)

At least on nvim-qt, <c-[> or ^[ can't be mapped without mapping <ESC> as well (as it usually translates to it!
eyal karni's user avatar
  • 1,016
0 votes
0 answers
41 views

How do I run nvim-qt from the appImage?

I downloaded nvim.appimage v0.9.1 to run on KDE neon 22.04 5.27 base: Ubuntu 22.04 LTS Jammy. In the terminal, so far, so good. However, looking at the nvim.appimage --help and also at :help, I haven'...
Eric's user avatar
  • 1
0 votes
1 answer
42 views

Can't use `:wqa` with open terminal buffers

I have next problem: When I use :term buffers the :wqa command produces error: Which is quite expected because terminal buffers isn't writable. BUT the :wa and :q separatly work. This is strange. To ...
Vladyslav Rehan's user avatar
0 votes
1 answer
70 views

Missing LSP diagnostics from XO via null-ls for TypeScript

I have been using the same Neovim config on my desktop and laptop computers for a while now (it's actually based on LazyVim, but I can reproduce the issue without it as well) without any problems. Now ...
Isti115's user avatar
  • 113
0 votes
1 answer
83 views

How can I create command abbreviations (`ca`) with the lua api?

In my init.vim, I have the following: ca WQ wq What would be the equivalent in my init.lua?
David Goldstein's user avatar
1 vote
1 answer
65 views

How can I run a java file from a neovim terminal using a remap

For a bit of background, I'm trying to set up a function that runs a java file in Neovim, I've tried using the following autocmd: vim.api.nvim_create_autocmd( { "FileType" }, { ...
Nico Elbers's user avatar
0 votes
1 answer
72 views

How to make zsh detect if terminal session is run inside nvim's :term

I were following the Modern Vim book by Drew Neil. In tip 20 he writes: At a glance, you may not be able to tell whether a shell is running within a terminal buffer or outside of Neovim. In this tip, ...
Vladyslav Rehan's user avatar
0 votes
0 answers
282 views

Spawning language server with cmd: `clangd` failed

I have a c project and I would like to use the feature of LSP in Neovim such as gd (go to definition). I follow each of these materials to configure LSP langserver.org/ Konwing that I need to use ...
HRC's user avatar
  • 11
1 vote
1 answer
73 views

Devanagari in Neovim

It is an old issue, that Vim is not able to correctly display Devanagari (Sanskrit) ligatures as it is non GUI (emacs, gedit do well). In different forums it was discussed in the past (mostly before ...
Denis's user avatar
  • 21
0 votes
1 answer
97 views

Autocmd is breaking my lsp and not working (neovim)

I’m new to neovim so there’s a decent chance this is just a rookie mistake. I wanted to make an autocmd to remap F5 to running the (python) file. I found a stack overflow post on how to do this (https:...
Nico Elbers's user avatar
1 vote
1 answer
206 views

vim-devicons not rendered properly

I am configuring vim-devicons for my neovim and this is my init.nvim: :set number :set autoindent :set tabstop=4 :set shiftwidth=4 :set smarttab :set softtabstop=4 :set mouse=a call plug#begin() Plug ...
Rahn's user avatar
  • 175
1 vote
1 answer
85 views

How to evaluate Lua in substitution field instead of vim script?

As simple example, take this: :'<,'>s/\vs([A|B])\.size\(\)/\={"A":"a","B":"b"}[submatch(1)]/g This substitution will replace sA.size() with a and sB.size(...
Vladyslav Rehan's user avatar
0 votes
1 answer
32 views

NeoVim - Single Redo my mapping containing an <Escape>

Well I know it doesn't work because of the <Esc>, but is there any way to do it so that .(vim single redo) repeats the whole mapping and not only the part after the first <Esc> (without ...
Pixelbog's user avatar
  • 325
0 votes
0 answers
254 views

How to force bashls, shellcheck to treat zsh files as bash using lspconfig?

Most of my dotfile scripts are in zsh, with the .zsh extension and shebang - #!/usr/bin/env zsh. Formatting and linting does not work in zsh files out of the box (understandably so); however, they can ...
casraf's user avatar
  • 101
1 vote
2 answers
76 views

Ex global command is silenced, why is execution still stopped on error (Neovim)?

I have a sample text: 123 456 If I delete the first line, why does :silent! execute 'g/123/d' | execute 'g/456/d' work while :silent! g/123/d | g/456/d doesn't work, unless I bring back the first ...
danko's user avatar
  • 11
0 votes
2 answers
71 views

Cannot get block-wise visual selections in vimscript?

I am searching for how to get visual selection in vimscript. And I found this: https://stackoverflow.com/a/61486601/4438921, it is great, but the only issue is that, in block-wise visual mode, I ...
linrongbin's user avatar
0 votes
1 answer
80 views

How to pass an argument to a user command that contains a space

I have a user command that grep-replaces files recursively using vimgrep and cfdo: -- Grep vim.api.nvim_create_user_command( 'Grep', function(opts) if #opts.fargs < 1 then print("...
Martin Braun's user avatar
0 votes
1 answer
93 views

How to replace one char in Neovim?

I used to use s for replacing one char with another. e.g. source: "bla". command: ss. result: "sla" source: "bla". command: 3ss. result: "s" Neovim (using ...
CIsForCookies's user avatar
0 votes
0 answers
114 views

Copy to android system clipboard in nvim from termux

I use Neovim on termux on android 11 I commonly use :y to yank/copy text to nvim clipboard Then paste it to another files Recently I've tried using helix-editor(hx) looks and feels so similar to ...
ANDuser's user avatar
0 votes
1 answer
167 views

CSS Syntax highlighting in NeoVim in a <style> inside an html file?

Just getting started learning Vim/Neovim and am just following along with some tutorials that said to just open up any repo on your system to play around. I noticed that I don't have syntax ...
null's user avatar
  • 101
0 votes
1 answer
297 views

JsDoc typechecks for JS files in Neovim

Is it possible in Neovim to use JsDoc for typechecking of javascript files? Right now I use default LSP configurations for eslint and tsserver provided by lspconfig: -- init.lua require('lspconfig')....
xaxa's user avatar
  • 165
0 votes
0 answers
54 views

How to display LanguageTool suggestions with neovim

I want to see LanguageTool suggestions (not just errors) when using LanguageTool with my LaTeX documents. LanguageTool can output the Error, Context, and Suggestion. However, with my setup (ltex-ls ...
nikost's user avatar
  • 101
0 votes
0 answers
43 views

In Neovim where is {lhs} of triggering a keymap stored? Can we access it?

If we set a keymap that {lhs} is abc in normal mode. For example, local opts = { noremap = true, silent = true } vim.keymap.set('n', 'abc', function() print("Keymap abc!"), opts) If we type ...
HRC's user avatar
  • 11
0 votes
0 answers
156 views

How can I make (Neo)vim wrap lines in respect to indentation?

Currently, indented lines will wrap all the way to the left of the text area. Currently, this is what they look like: This is a long line of text that is indented wi th tabs. In order for it to ...
natalie's user avatar
0 votes
1 answer
38 views

Insert current branch name in insert mode in Neovim

I'd like to create a hotkey to insert the current branch name directly in insert mode with the hotkey <C-b>. I use the plugin gitsigns which has a variable vim.b.gitsigns_head containing the ...
Marc's user avatar
  • 113
0 votes
0 answers
108 views

Neovim diagnostic virtual_text keep on showing only after save current file

this is my neovim diagnostic config, I have enabled "update_in_insert" when diagnostic detect new error, It will show them correctly, but when error is fixed, it still show the old virtual ...
Jeff Jia's user avatar
0 votes
0 answers
30 views

(neovim) nvim_win_get_cursor() gets same value after nvim_input("<CR><Esc>")?

I'm trying to set a key map like local key_map = vim.keymap.set local input = vim.api.nvim_input local opts = { noremap = true, silent = true } key_map('n', '<C-j>', function() ...
HRC's user avatar
  • 11
0 votes
1 answer
33 views

Adding Colorscheme to Neovim conditionally?

I'm trying to create a status line and get the color scheme correctly. I have the function function GetDiagnosticErrorCount() local errorCount = #vim.diagnostic.get(0, { severity = vim.diagnostic....
Marc's user avatar
  • 113
0 votes
0 answers
24 views

Problems with libEG.dll after installing neovide

After installing neovide on my Windows 11 Pro machine, several other apps started to fail because they do not find: C:\tools\neovim\nvim-w64\bin\libEG.dll So I uninstalled neovide, restarted my ...
Antonio Sesto's user avatar
0 votes
1 answer
575 views

How to setup treesitter in vim script?

I have my entire nvim setup written in vim script at ~/.config/nvim/init.vim, but tresitter on it's GitHub says require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" ...
Vladyslav Rehan's user avatar
0 votes
1 answer
70 views

Can't apply config changes to all windows in neovim without closing the buffer at least

I am trying to update the config and see the changes take place without exiting neovim. I have structured my neovim config files like this ~/.config/nvim ├── init.lua └── lua └── [username] ...
me.nkr's user avatar
  • 31
0 votes
1 answer
189 views

Neovim - using patched nerdfont but icon not working

I am using neovim 0.9. I liked JetBrains Mono font so I downloaded the nerd font patched JetBrains font and installed on my Linux Mint 21.1. All is well except when there is an error, neovim ...
ThomasDKim's user avatar
2 votes
1 answer
1k views

Neovim lua module not found even though it exist

I have structured my neovim config files like this ~/.config/nvim ├── init.lua └── lua └── [username] ├── core │   └── options.lua ├── init.lua └── plugins These ...
me.nkr's user avatar
  • 31
1 vote
1 answer
77 views

How do I change the color of the deleted text on the left side of a vimdiff?

My colors currently look like this, with the text highlighted green on both sides: I would like it to be red on the left, and green on the right. I tried to change the DiffDelete highlight, but that ...
vinnydiehl's user avatar
0 votes
0 answers
93 views

How to add fonts/icons to a remote terminal running on ubuntu vm?

I am using lunar vim, and want to add icons to a remote terminal running on ubuntu vm. Is this possible? On vm, output of echo $TERM is xterm-256color. I tried the steps given here https://www....
HarshvardhanSharma's user avatar
0 votes
0 answers
29 views

Cannot connect from python repl to neovim instance which waiting on '127.0.0.1:6666'

I tried to experiment with what the nvim documentation (connecting chapter in api.txt) says. The experiment is to use python repl to execute an instruction to nvim listening for socket communication. ...
ksk srs's user avatar
3 votes
1 answer
117 views

If I set cmdheight=0 I get the "Press Enter or type command to continue" message

If I set my cmdheight=0 then any action I perform like saving the buffer or opening a new buffer or anything trigger the Press Enter or type command to continue message. It annoys me. I want to ...
Nikhil Singh's user avatar
0 votes
2 answers
86 views

How would I bind a keybind that uses Rubber to compile the current file on NvChad?

I'm fairly new to NvChad and I'd like to learn how to bind a keybind <leader>t which executes rubber on the current file. My previous nvim setup had the code nnoremap <leader>t :!rubber --...
user avatar
0 votes
0 answers
65 views

How to use `Ctrl+c` in Nvim if GNOME terminal SIGINT call was remapped to Ctrl+x?

GNOME terminal SIGINT call was remapped to ctrl+x using stty intr ^X, and ctrl+c was mapped to be 'copy'. In Neovim config I have vim.keymap.set("v", "<C-c>", "\"+y&...
Vlad Mosienko's user avatar
0 votes
0 answers
67 views

fzf.vim - How to search git branch command with git log preview?

I'm trying to create neovim fzf command FzfGBranches to use git branch -a as query, and use git log --oneline as fzf preview: command! -bang -nargs=0 FzfGBranches \ call fzf#vim#grep( ...
linrongbin's user avatar
0 votes
3 answers
512 views

Neovim+PHP basic set up

I’ve been using Vim for years want to try out nvim and a bit confused. Can someone please assist me on how to set up a simple config with Lsp intelephense for php, commenting lines, show folds and fzf....
iaskakho's user avatar
0 votes
0 answers
97 views

Packer or config structure problem

I'm trying to port my nvim configuration to another desktop, but I can't seem to figure out how to make packer work. I enter nvim and I don't see any errors regarding packer at startup, just about ...
enrico223's user avatar
1 vote
2 answers
42 views

How to prevent left/right arrow from cycling through completion candidates on the :cmdline?

Say I have 4 files in current directory: file-bar-01.txt file-bar-02.txt file-foo-01.txt file-foo-02.txt Next, I want to save current buffer to a new file file-foo-03.txt. So I enter :w f and then ...
vim.ggyG's user avatar
  • 181
0 votes
1 answer
485 views

NeoVim: Following the instructions in ":h clipboard-wsl" not work? It shows "no provider" but also "ok" in ":checkhealth"?

I am using neovim on archlinux/WSL2, and try to communicate with the Windows clipboard in neovim. Following the instructions in :h clipboard-wsl, I filled in init.lua with code: vim.g.clipboard = { ...
Jerry Z's user avatar
1 vote
1 answer
99 views

Alt > or Alt < mappings do not work

I am trying to configure the key mappings for the barbar plugin commands, specifically the BufferMovePrevious and BufferMoveNext actions. The desired key combinations are Alt < and Alt >. ...
Jastcher's user avatar
1 vote
0 answers
147 views

How to autoformat with efm-langserver

I just want autoformat on save, I don't want it to have any delay. And they say efm-langserver is best choice. After I installed via AUR yay -S efm-langserver, that's only I know what to do. How do I ...
Happy Cakiey's user avatar
1 vote
1 answer
79 views

Neovim append method does not works on matchpairs

I want to append <:> to vim.opt.matchpairs, which AFAIK is a string type. Neovim lua doc says: vim.opt:append() Option:append(value) ...
manungsa's user avatar
1 vote
2 answers
143 views

LeftMouse focus window without moving cursor

Is there a way for clicking on a Vim window to focus that window if inactive (without moving the cursor), then move the cursor if the window is already active? Here's what I've got so far: function ...
thirstyice's user avatar

1 2
3
4 5
31