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

giving one snippet priority over another

I would like to use two custom snippets whose endings are the same: snippet ah "\aH for ta marbuta" i \\aH${0} endsnippet snippet iyyah "\iyyah" i \\iyyah${0} endsnippet How can ...
2 votes
1 answer
3k views

NeoVim: colorscheme won't work in init.vim; requires command to be typed

I'm new to NeoVim and just getting started. My init.vim file under NeoVim\share\nvim\runtime\plugin\init.vim successfully sets everything except for the colorscheme and background. As seen in the ...
9 votes
4 answers
8k views

open coc-definition in new split in coc

I am using coc.vim in neovim. coc.vim suggests the following mapping for jumping to the definition of a class/method. nmap <silent> gd <Plug>(coc-definition) If there is only a single ...
0 votes
1 answer
230 views

How to use tzachar/cmp-tabnine in NvChad?

This are the installation instructions for tzachar/cmp-tabnine using Packer: return require("packer").startup( function(use) use "hrsh7th/nvim-cmp" --completion use {'...
3 votes
2 answers
170 views

What's the difference between coc-emmet and emmet.vim?

I'm working in HTML and want to choose emmet support for neo(vim) but don't know where to start. What are the differences between coc-emmet or emmet.vim?
0 votes
1 answer
38 views

How can I open a vim fold so that it is not affected by `foldclose=all`?

In my config file I have set foldclose=all so that folds get automatically closed upon cursor leaving them. However, sometimes, I want a specific fold not to close for a while. Because folds below ...
1 vote
1 answer
24 views

Showing text info in window split separators

(I'm using nvim 0.7 and have recently moved from a init.vim to lua, which is baffling me slightly.) In my old set-up a split would look like this: → note that the bar that splits the two windows ...
1 vote
1 answer
368 views

Gitsigns color customization

I am customizing the color scheme of the gitsigns column on the left. I managed to change all different symbols using the following: hi DiffAdd hi DiffChange hi DiffDelete hi DiffText I cannot figure ...
1 vote
1 answer
46 views

nvim (plugged with coc, coc-clangd) is showing parameters for every function. How do disable it?

my nvim (plugged with coc + coc-clangd) is showing the paramters for every function, how do I disable it ? I'm using a common vimrc for vim and neovim, but this problem only happens in neovim. FILE *...
0 votes
0 answers
13 views

neovim - unable to setup gopls integration

I have configured my neovim editor using this link (https://github.com/LunarVim/Neovim-from-scratch). I have run LspInstallInfo and installed gopls successfully here. However, when I open type of ...
3 votes
1 answer
35 views

How to normalize a file path opened from the quickfix window?

Setup I am using NeoVim v0.7.2 (also tested with v0.6.1) on Windows 10 in git-bash, with vim-dispatch to allow for asynchronous builds (building a C++ codebase with Clang). I have this option in my ...
0 votes
1 answer
29 views

K does not show function signature

My full config is on GitHub. In my lsp-config.lua I have the following: buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) However, when I press K on the name of a ...
0 votes
0 answers
24 views

How to make VIM Use the Whole Screen While Reading Help? [duplicate]

Why is it, when I search for help, that so much of my screen's vertical space is wasted by default in vim? How can I make it use the whole screen instead. See below:
0 votes
1 answer
428 views

how i set floatterm plugin in neovim , that shortcut F5 compile javascript and how i do for other languages?

i plugged float-term plugin , that open terminal window in neovim. when i compile javascript with node in float term i did like :FloatermNew node % then it compiles fine and show me the output in ...
0 votes
1 answer
109 views

Reload function when sourcing init.lua

In "~/.config/nvim/lua/foo.lua" I have the following local M = {} function M.test() vim.notify("hello") end return M And then in my init.lua I have local test = require('foo')....
0 votes
1 answer
22 views

packer.nvim: Error running config for <PACKAGE>: attempt to call a nil value

When I start neovim, I'm now getting a lot of errors like this, packer.nvim: Error running config for hop.nvim: attempt to call a nil value packer.nvim: Error running config for nvim-lspconfig: ...
0 votes
1 answer
25 views

Get byte length of current line in Lua

How do I get the length, in bytes, of the current line in Lua? vim.api.strlen('foo') doesn't work
5 votes
4 answers
3k views

Delete indenting spaces one at a time

I want to be able to delete indenting spaces one at a time. If I set shiftwidth to 4, it deletes 4 spaces at a time if vim counts them as indentation. Setting shiftwidth to 1 fixes the problem, but ...
0 votes
0 answers
41 views

Ho to force the pyright language server to use a interpreter on a mounted volume

I have a problem with the following setup: the volume of a remote machine is mounted using sshfs nvim is opened on the mounted volume to ensure all my plugins and settings work ~/anaconda3/envs/.. is ...
0 votes
1 answer
46 views

Incorrect autocomplete with Javascript using nvim-lspconfig

My lspconfig works fine with typescript files, but not with Javascript. Autocomplete shows .constructor and other standard props/methods instead of the expected ones defined on the type This happens ...
3 votes
1 answer
166 views

Prevent buffer loads within Nerdtree

If I have many buffers opened and, if the cursor (focus) is within NERDTree, when I change the buffer with :bn or :bp, the content of buffer loads within NERDTree. There's a way to, before buffer ...
1 vote
2 answers
197 views

Delete all marks except bookmarks in nvim

I use dashboard so I like my marks clean. So I generally make many marks while working on something and then delete them all except the file bookmark in the end. Is there any way to delete all marks ...
1 vote
1 answer
45 views

Automatically highlight visual selection matches

Since there are no VisualEnter and VisualLeave events, I am trying to make a function that will activate on every cursor movement in visual mode, i.e. it will automatically highlight all the matches ...
0 votes
1 answer
48 views

How to check if an external command exists in Lua

How do I translate this VimL code into Lua? if executable('rg') set grepprg=rg\ --vimgrep endif
2 votes
1 answer
498 views

How to change the color of the tabline of the vim-airline?

I'm trying to make transparent the tabline of the vim-airline, as in the second picture. I'm using the onedark colorscheme. They don't have a color specific for that. They use the same color variable ...
0 votes
0 answers
74 views

Why is :packadd failing in this case?

I am trying to reinstall neovim so that all the files are in the config directory of .config/nvim. In my config file which is required by /home/shadrock/.config/nvim/init.lua. The commented local ...
0 votes
1 answer
43 views

Vim Autoindent does not work [closed]

I'm configuring my Vim editor. Now I want it to automatically indent when I press enter after a parenthesis (like in modern IDEs) function test() { | } I already have autoindent and smartindent ...
0 votes
0 answers
29 views

Cannot install vim plugin due to git problem

I'm on MacOS Big Sur with nvim 0.7.2,vim-plug, and git 2.37.1 installed. I succesfully installed vim-crystal (to enable syntax highlighting for Crystal codes) by doing this: Edit ~/.config/nvim/init....
0 votes
1 answer
519 views

keymap for LSP code formatting in visual mode

In neovim I would like to set a keybinding -- via lua config -- to use LSP to format the visual selection when I type \qf. Using this setting, I can format the whole buffer from normal mode: vim.api....
0 votes
0 answers
36 views

Override autocmd to change filetype for a subset of markdown files

I'd like to load the cornelis plugin for the Agda language when I open a *.lagda.md file. I have this autocmd in init.vim: au BufNewFile,BufReadPre *.agda,*.lagda* setf agda However, *.lagda.md gets ...
1 vote
1 answer
406 views

netrw not open correctly, just open blank with noperm message

I am Neovim user and have serious problem with netrw I find netrw has a bug when trying to open the file, at first it only shows an empty buffer(1st picture), and right bottom corner, you can see [...
1 vote
3 answers
1k views

How to configure neovim to properly format python code?

I have neovim 0.8.0 installed. I have neovim/nvim-lspconfig plugin installed. I have installed pyright language server on my system (pip install pyright) I have configured neovim to use the pyright ...
0 votes
1 answer
988 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
0 answers
33 views

How to change background color of the text of hover window?

I have such binding that opens the hover window vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) As you can see the background color of the let name2: {unknown} is white (#ffffff). I would like ...
2 votes
2 answers
28 views

Keymap or mark to jump to timestamped filename

I often need to access a machine-generated file. This file is always in the same folder, and is created each day with a timestamp, e.g. $HOME/foo/bar/target-2022-07-21.txt. Currently I use fzf to open ...
0 votes
0 answers
14 views

virtual replacement by string not cchar

the virtual text makes vim/neovim very powerful I want to use the conceallevel to change some text virtually, using the regex or treesitter replace > with one char: ▶ " vim > > > :...
2 votes
2 answers
81 views

choose template option for newfiles in vim

I have different templates in this directory ~/Documents/Library/ like: Template.cpp, normal.cpp, advanced.cpp normally i use this autocmd BufNewFile *.cpp 0r ~/Documents/Library/Template.cpp I want ...
0 votes
0 answers
16 views

Is there a way to redefine options set in a lua setup{} call without calling setup again?

I'm trying to customize a plugin and I want to know if there's a way to just set a single option without calling setup, or to change an option after setup has been called. local actions = require('...
1 vote
2 answers
273 views

Can I go to the implementation in the c project with lsp?

I'm separating the functions from main.c to func1.c func2.c, then I'm using util.h to store the prototype (all name of all functions). PROBLEM when I try to go to implementation, lsp leading me into ...
4 votes
3 answers
7k views

Neovim with split integrated terminal / REPL

Other editors and IDEs, such as VSCode and RStudio, have an integrated console/terminal/REPL with the following characteristics: They open in a split window. The file we’re working on is visible at ...
0 votes
2 answers
28 views

Neovim wont match beginning of word with # sign

/\< matches beginning of all words as expected. /\<a matches beginning of all words starting with a but /\<# doesn't match words starting with # what am I missing here? Was planning on using ...
3 votes
1 answer
51 views

How to use -complete=lua for command-completion?

If you check the help for :command-completion, there is a line that reads: -complete=lua Lua expression But it does not give further instructions about how to use it, or how to provide a Lua ...
0 votes
1 answer
33 views

Opening the first file(not empty) shows blank

After starting nvim, the first opened file always shows blank, the second will be back to normal. This issue is out of nowhere. OS:Arch nvim: 0.7.2 terminal: kitty
1 vote
1 answer
31 views

Issues of UI when combining Tmux and neovim and sourcing a python virtual env created with Poetry

The issue I recently switched to nvim + tmux and I have a fully working setup with various plugins. I use Poetry to manage my python virtual envs and it's a mandatory tool. I highlight the fact that ...
2 votes
4 answers
3k views

Neovim lua config: how to append to listchars?

In a neovim init.lua config, I know that I can append to a string like so: vim.opt.wildignore:append("*/node_modules/*,*/vendor/*,*/venv/*,*/.venv/*,*/target/*") However, I'm getting errors ...
0 votes
0 answers
9 views

Refresh neovim when terminal is not focused [duplicate]

I'm using external program to change content of file and I want to use neovim to content in real time. If some change is made to file and terminal is focused window then neovim immediately shows the ...
1 vote
1 answer
34 views

Why wrap neovim config in a table?

I've noticed that some neovim configs are separated into several files or folders and the content of each file is wrapped in code like so: local M = {} function M.name() ~~~~~~~~ ~~~~~~~~ ...
1 vote
1 answer
37 views

What's the effect of "range" on :lua and :luafile commands?

The :lua and :luafile commands take an optional [range] specification. But it's unclear what effect it has (unlike the :luado command, where the effect is explained clearly in the help text). Is ...
0 votes
1 answer
33 views

Why is nvim updating the clipboard on start?

I use set clipboard=unnamed in my configuration. When I open nvim with nvim, the clipboard is left unchanged but if I open with nvim . the latest entry of the clipboard is always something unexpected. ...
1 vote
1 answer
300 views

How to create key bindings that apply on in a quickfix buffer?

The autoload command can be used to execute code depending on a range of events and filetypes. When I list the active buffers, the buffer hosting the quickfix window has what seems to be a unique ...

1
2 3 4 5
21