Skip to main content

New answers tagged

0 votes

Pass custom glob to ripgrep when using Telescope live_grep

The live_grep function takes the vimgrep_arguments option in place of find_command, which is the option for the find_files function call. So: vimgrep_arguments = {"rg", "-g", "...
teddy waweru's user avatar
1 vote

How do I remove the delay when using a key remapped to `k`?

There is Dvorak support in an optional plugin distributed with Vim (:edit $VIMRUNTIME/macros/README.txt): The following have been moved to an optional package. Add the command to your vimrc file to ...
D. Ben Knoble's user avatar
  • 26.6k
1 vote
Accepted

How do I remove the delay when using a key remapped to `k`?

In standard Neovim the c key command is the command for change c. It wait for a move (or a text objet) to determine what to change, switching to operation pending mode. LazyVim comes with which-key....
Vivian De Smedt's user avatar
0 votes

How do I set up the lazy.nvim plugin installer in LazyVim?

If you are are a beginner my advice is to start with "dead" technologies where it will be easier for you to get support: Neovim vim-plug vim-latex. If you want to feel the fuss but don't ...
Vivian De Smedt's user avatar
0 votes
Accepted

Neovim and LazyVim: Customising Lualine status line

setup inside config worked for me: return { { "nvim-lualine/lualine.nvim", event = "VeryLazy", config = function(_, opts) require('lualine').setup { ...
rofrol's user avatar
  • 120
1 vote
Accepted

Unable to set custom colors for LSP errors

I believe the highlighting group to use is: DiagnosticVirtualTextError. Since like: DiagnosticFloatingError DiagnosticSignError DiagnosticVirtualTextError NvimTreeDiagnosticErrorIcon it is, by ...
Vivian De Smedt's user avatar
0 votes
Accepted

How do I start a search with the currently selected text?

I would do in Lua: vim.api.nvim_set_keymap("v", "/", '"vy/<C-r>v', { noremap=true}) Or its equivalent in Vimscript (for init.vim): vnoremap / "vy/<C-r>v ...
Vivian De Smedt's user avatar
0 votes
Accepted

Perplexing character: ^V in a terminal used by Neovim

In Insert mode you can type Ctrl+vCtrl+v. In Insert mode if you hit Ctrl+v the next character typed is inserted literally. More information with :help i_CTRL-V The ^* characters (e.g.: ^V, ^M, ...) ...
Vivian De Smedt's user avatar
2 votes
Accepted

How to show outputs of a ":!cmd" command on a new screen, rather than at the bottom of my screen?

I would do: :terminal ls Or its short form: :te ls This start a terminal buffer and run the ls command in it. Since it is a terminal buffer you can switch to: Terminal mode using a (or i or A or ...
Vivian De Smedt's user avatar
2 votes

Neovim displays with different colors, compared to Vim. Why?

New default color scheme. It has different (I'd argue, better) definitions and links of built-in groups. Adding colorscheme vim or source $VIMRUNTIME/colors/vim.lua restores previous defaults. Option '...
Lucian Chauvin's user avatar
0 votes
Accepted

Arbitrary character on the current line are highlighted, what plugin or part of the configuration is doing it?

It looks to me like the quick-scope plugin. It highlight a unique letter in each word to let you jump directly to it using the f & t motion. Remark: It was actually a Neovim clone of quick-scope: ...
Vivian De Smedt's user avatar
0 votes

Vim to drag current selected multi lines up

I would do: vim.api.nvim_set_keymap('v', 'I', ":move '<-2<CR>", { noremap = true, silent = true }) The x flag make the mapping only working in Visual mode. If you select the text ...
Vivian De Smedt's user avatar
0 votes

Docker-Compose LSP will not attach to buffer nor automatically start

I think I got this from kickstart.nvim; works great: local function set_filetype(pattern, filetype) vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { pattern = ...
jaustin's user avatar
  • 101
0 votes
Accepted

I can't get Python autocomplete to work with NvChad + python-lsp-server

I figured it out. From the list of LSP servers, I found I needed to install python-lsp-server like so: apk add py3-lsp-server Then I needed to edit ~/.config/nvim/lua/configs/lspconfig.lua to add ...
Travis's user avatar
  • 121
2 votes
Accepted

How to hide keybinds in which-key.nvim depending on buffer type?

I believe the problem is that your register your which-key buffer mappings globally. Instead of having the register call of the buffer mapping in vimrc they should probably be in the ~/.config/nvim/...
Vivian De Smedt's user avatar
1 vote
Accepted

How to get default Generic Keywords autocomplete functionality when LSP is in use?

If your LSP bridge overrides the Ctrl+n and Ctrl+p (with Coc you can configure the keys) and don't include the standard Neovim completion (Coc merges the two completions in the same menu) you could ...
Vivian De Smedt's user avatar
0 votes

How to get default Generic Keywords autocomplete functionality when LSP is in use?

One possible solution, which seem to work is to remap the original Ctrl + n to another key sequence. I remapped it to Ctrl + J inoremap <C-j> <C-n> It seems to preserve the original ...
d.k's user avatar
  • 696
0 votes

Is there an Ex mode for Neovim?

The Ex-mode use case listed in the following answer have I believe lost traction over time. The Ex-mode is even somehow hidden by default in Vim already (the default.vim remap Q to gq). Neovim ...
Vivian De Smedt's user avatar
2 votes

How do I get the value of $XDG_STATE_HOME in Neovim's Lua?

While expand() in the other answer is generally safer (:help expr-env-expand), in this case it is probably unnecessary as the XDG variables should be set in the current environment. Combining this ...
D. Ben Knoble's user avatar
  • 26.6k
2 votes
Accepted

Neovim 0.10 syntax highlight is completely broken

Neovim 0.10 has introduced a new default colorscheme. If you want to get back your old colors you have to add to your init.vim the following line: colorscheme vim set notermguicolors There are more ...
Vivian De Smedt's user avatar
0 votes

Autocommand to reformat working only partially

For C++ the LSP format is relying on [cland-format] and it seems to me that it only consider the cland-format option there are no way to override it by the parameters given to the format method. For ...
Vivian De Smedt's user avatar
1 vote
Accepted

Configure space using gc in LaTeX

The behavior is controlled by the commentstring option. To achieve what you want you should set the commentstring option to: % %s :setlocal commentstring=%\ %s To set that option for all LaTeX files ...
Vivian De Smedt's user avatar
0 votes

How do I get the value of $XDG_STATE_HOME in Neovim's Lua?

The pure Vimscript solution that will work both in Vim and Neovim is to use expand() on the environment variable: let &backupdir=expand('$XDG_STATE_HOME') .. '/nvim/backup' or, to append to the ...
Friedrich's user avatar
  • 2,225
1 vote
Accepted

How do I get the value of $XDG_STATE_HOME in Neovim's Lua?

Use stdpath, like this: vim.o.backupdir = vim.fn.stdpath("state") .. "/backup//" If you prefer Vimscript, you can run: let &backupdir = stdpath("state") . "/...
Flimm's user avatar
  • 2,303
3 votes
Accepted

Why doesn't Neovim version number follows semantic versioning rules?

Neovim plans to go for version 1.0 in April 2026. Here is the 1.0 milestone tracker. The current version is still considered somehow beta.
Vivian De Smedt's user avatar
0 votes

How to change the inlay_hints position on Neovim 0.10.0?

The positioning of extmarks depends on the arguments passed into nvim_buf_set_extmark(). Specifically, see the virt_text_pos option. It looks like your "actual" screenshot is set to "...
nullromo's user avatar
  • 270

Top 50 recent answers are included