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
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
25 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
699 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
78 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
203 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
85 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
101 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
31 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
128 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
91 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
71 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
71 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
617 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
100 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
2 answers
569 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
107 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
161 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
89 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
148 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
0 votes
0 answers
21 views

How to check if a function is deprecated using NeoVim Lua api

I'm currently working on neovim plugins that use vim functions through the Lua API. However, I'm not sure how to determine if a particular Vim API function is deprecated or not using the Lua API. For ...
Danielo515's user avatar
0 votes
0 answers
41 views

How to remove non printable chars in lua?

I am using astronvim. Installed copilot and set hotkey ctrl+l. Here is the code itself, lua on top, plugin below. mappings.lua file return { n = { ["b"] = { "<Plug>Sneak_S&...
serii 's user avatar
  • 59
0 votes
0 answers
38 views

Neovim startup: faster on the second run, how do I warm it up?

I noticed that the second time I run nvim it loads much faster (on Windows 11). Ideally, what I want is this something like nvim --warmup-then-exit, which I would run on session startup/login. How ...
Guy Langston's user avatar
0 votes
0 answers
331 views

error "attempt to index global 'keymaps' (a nil value)"

I am on Mac with nvim v0.9.0. I have the following „init.lua“ config loaded: vim.g.mapleader = '<Space>' local keymap = vim.keymap keymap.set("i","jk","<ESC>")...
dragontec12's user avatar
0 votes
0 answers
130 views

Making vim-fugitive compatible with file explorers

I have the vim-fugitive plugin and use :G a lot. If I have NERDTree as a plug or netrw enabled then :G will open either a NERDTree file or a netrw file instead of the usual fugitive file with the ...
hilbor's user avatar
  • 15
0 votes
1 answer
53 views

NeoVim - Interact with the thing that pop ups when you type in a command

Questions How can I type something in there? What even is the name of this thing? Problem If you type in for example :!echo 'Hello World' This kinda terminal thing pops up I want to interact with ...
Pixelbog's user avatar
  • 335
0 votes
5 answers
188 views

Replace pattern with user input for every occurrence on the line

I'm a new Vim user, so please bear with me. A while ago I wanted to be able to replace a pattern with user input, and I stumbled upon this question on StackOverflow, and its answer worked beautifully. ...
Szpilman's user avatar
1 vote
1 answer
140 views

What is the most convenient window splitting strategy for Vim users when using Terminal Multiplexer and Tiling Window Managers? [closed]

I use Vim/Neovim mostly inside Wezterm, with I3 as my window manager. Also all of them offer tabbed interface. Shortcuts to cycling through the different layers is difficult, even with ergonomic ...
Aviik's user avatar
  • 23
0 votes
0 answers
56 views

How to load method definition in a popup?

This is a followup to this question, where I would like to load the method definition in a pop-up rather than a split screen (or the whole screen for that matter). Attempt 1: using nui.vim I’m using ...
abbood's user avatar
  • 643
0 votes
1 answer
34 views

My plugin got sourced first before init.lua

I make a colorscheme plugin with vimscript (the code sucks, as I've never write a plugin before), there it checks if a global var exist or not. " nvim-colors/colors/kalm.vim ... if !exists('g:...
manungsa's user avatar
1 vote
1 answer
68 views

Is there a package or common set of shortcuts for Neovim/Vim in "insert" or "i" mode? [duplicate]

Coming from bunch of years of using the VS Code environment in Windows I'm used to Ctrl + some keys to manage the interface. In Vim/Neovim I always have to exit insert mode to do most operations. Are ...
Aviik's user avatar
  • 23
0 votes
1 answer
73 views

Specifying filetype in ModeChanged event autocmd

I'm using stylua as the code formatter for lua files. I do not usually get used to its formatting style but sometimes I do need a little help with it, so I decided to make it the formatprg during the ...
Futarimiti's user avatar
1 vote
1 answer
50 views

Error only when I'm NOT in ~/.config/nvim directory

I get this error when I open nvim in any directory other than ~/.config/nvim Error detected while processing /home/evirac/.config/nvim/init.lua: E5113: Error while calling lua chunk: /home/evirac/....
evirac's user avatar
  • 13
0 votes
1 answer
417 views

Alpha nvim not starting

It has something to do with my configuration, but I can't seem to display Alpha when starting nvim. There isn't even :Alpha when I start nvim, I have to type :lua require'alpha'.setup(require'alpha....
enrico223's user avatar
0 votes
0 answers
94 views

OpenMP not detected by clangd despite compile_commands.json

My program compiles fine, but within Vim (with CoC + clangd) I get the linting error: #include <omp.h> 'omp.h' file not found (clang pp_file_not_found) I use bear -- make as described in https://...
strbry's user avatar
  • 1
0 votes
0 answers
14 views

Debugging remote plugin (Invalid channel)

I wrote a neovim remote plugin. I get this message after the command finished ( when I try another). Error detected while processing function remote#define#request: line 2: Error invoking 'C:/Users/...
eyal karni's user avatar
  • 1,026
0 votes
2 answers
76 views

How to format curl result into jq then redirect to Vim?

I am trying to pipe curl result to jq then to Vim, but nothing happens. If I follow the below method I get the desired result: curl --location --request GET "$url/myproj/v1alpha1/consumption"...
Samselvaprabu's user avatar
0 votes
0 answers
155 views

upgrade neovim 0.8.3 to 0.9.0 and font-hack-nerd-font, the font displayed by number appears overflow

Updated neovim 0.8.3 => 0.9.0 and font-hack-nerd-font. use https://github.com/folke/todo-comments.nvim plugin and Hack Nerd Font, config font_size=12, the font displayed by number appears overflow. ...
sharp's user avatar
  • 1
0 votes
1 answer
1k views

E5113: Error while calling lua chunk: vim/_meta.lua:0: Invalid option (not found): 'data_dir'

I am using neovim config from custom directory and also want that it stores its data in custom directory. So i set this in my ~/.config/nvimcustom/init.lua : vim.opt.data_dir = '~/.local/share/...
Cheems Doge's user avatar
0 votes
1 answer
651 views

neovim how to keep the diagnostic message in insert mode?

When I upgrade neovim 0.8.3 to 0.9.0, the plugin https://github.com/junnplus/lsp-setup.nvim diagnostic message disappears when the content is entered in insert mode. after exiting insert mode, the ...
sharp's user avatar
  • 1
0 votes
1 answer
279 views

Shortcut to open definition of variable in a vertical split with Neovim mapping

This is a follow up question to this post where I would jump to the definition of a variable in a vertical split for ctags. I’m currently using an lsp language server like so: local bufopts = { ...
abbood's user avatar
  • 643
0 votes
1 answer
164 views

TSEnable highlight - true by default

I'm using the plugin 'nvim-treesitter/nvim-treesitter', and I can enable syntax highlighting by using the command: :TSEnable highlight However, once I close n/vim it reverts back to disabled. I'm ...
Ari's user avatar
  • 101
0 votes
1 answer
78 views

Colors for floating hint text arent readable; neovim + coc

I'm using Neovim (0.72), coc.nvim at latest release branch, and coc-tsserver also at latest. The issue I'm having is that I can't see the floating text for a code hint produced by vim-tsserver; It ...
Scott's user avatar
  • 103
0 votes
0 answers
63 views

nvim-qt on Windows, cursor highlight color not work

I use nvim-qt on windows 10, and i set the cursor highlight color by: highlight Cursor guifg=Red guibg=Green highlight iCursor guifg=Red guibg=Green set guicursor=n:block-Cursor/lCursor but it does ...
tyts9874's user avatar
0 votes
0 answers
65 views

Search forward / backward (`*` / `#`) in visual select mode

This seems to be a mismatch in behavior between Vim and Neovim. In Vim, when in visual selection mode, * and # work as expected: they jump forward / backward to the next occurrence of the word under ...
phg's user avatar
  • 197
0 votes
0 answers
48 views

How to override neovim paste implementation?

I wanted to add some handler that is triggered whenever a paste happened. From what I know, there is no such a thing like autocmd for paste action. I have look into some possible solution such as ...
Muhammad Sulthan Mazaya's user avatar
0 votes
0 answers
235 views

Is there a way to have somewhat globally persistent marks?

Basically, I like marks. I'd like to save/keep my marks either in the file, or as a project configuration, is there an extension or a way to do so? I know that the project or file based settings are ...
Whiskers's user avatar
0 votes
1 answer
83 views

Attempt to index local tmp error for dynamic node (LuaSnip)

I am trying to create a snippet that changes based on the optional lua pattern input, but I am getting an error about a local tmp for the dynamic node. The desired outcome for typing $cup$ is $\cup$ ...
TrustinN's user avatar
1 vote
2 answers
1k views

Neovim - LSP attached to client but not working

I have this problem, that angularls is attached to my client, but the autocomplete / go to definition / format / hover is not working, for example if I tried to do vim.buf.hover using 'K' on '@...
anonymous-1234's user avatar

1 2 3
4
5
31