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
0 votes
1 answer
182 views

How to enter terminal buffer using command?

As title. Assume my cursor is already at the terminal buffer, but it's still in normal mode. I'm trying to use TermEnter to enter terminal mode when ever I switch to a terminal buffer.
-1 votes
1 answer
6 views

How can I show the source for each completion in the nvim-cmp popup?

When an nvim-cmp popup show there is no indication of what source actually provided the completion nvim_lsp, luasnip, buffer, path, copilot, codeium, etc. Is there any way to include the source name ...
0 votes
1 answer
22 views

How to pretty print a lua table into an nvim buffer?

Neovim provides a convenient pretty-printer: :lua vim.print(vim.lsp.get_active_clients()) However, the active lsp clients output is massive so I'd want to see it in a buffer. With vim-scriptease, I ...
0 votes
0 answers
17 views

Nvim+Treesitter gives me language highlights in markdown code blocks, how do I set custom highlights?

When writing technical documentation in markdown, Neovim and Treesitter will provide language formatting for triple back-tick code blocks ```cpp For example: int main() { printf("hello world\n&...
1 vote
1 answer
9 views

How to install VimTex on Neovim (NvChad) on Windows (not WSL)

Hi I’m trying to install VimTex in NvChad on Windows (not WSL), but I’m not sure what to do, the official Git page wasn’t of much help, and I’ve been stuck for hours. I want to know what I must ...
0 votes
0 answers
8 views

How do I use --server in Neovim on Windows?

How do I use nvim --server? I'm on Windows 10 and I installed nvim with scoop. I try these commands: > nvim --version NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v&...
6 votes
2 answers
12k views

Most efficient way to call a Vim script function with lua (Neovim)

What is the most efficient way to call a Neovim function using Lua. I am able to call the sign_define Vim script function using the nvim_command procedure. I struggle with calling it with the ...
2 votes
2 answers
1k 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 ...
0 votes
1 answer
51 views

Preventing cursor from indenting after a previously indented line

I'm using neovim and a init.lua file. In what follows X will indicate the cursor: for i in range(1,5): print(iX Then I press o: for i in range(1,5): print(i) X Then I press backspace: ...
0 votes
1 answer
79 views

Stop flushing the last command when hitting enter

Suppose I wrote this command: command! -nargs=1 E echo ' -> <args>' and when user feeds an argument, :E abc I intend to see the following effect as they hit Enter: :E abc -> abc Of ...
1 vote
1 answer
29 views

v_g_ctrl-g in neovim does not work

I am trying to find out the word count in selected text in neovim. For some reason, g_ctrl-g works perfectly fine in normal mode, but when I try it in visual mode after selecting some text, nothing ...
1 vote
1 answer
21 views

Install plugins to an nvim-only package folder inside ~/.vim?

I want to try out nvim, but I don't want to break my vim configuration. I have my vim config in ~/.vim and I have an %LocalAppData%\nvim\init.lua that sources my vimrc and this block in my vimrc get ...
0 votes
1 answer
62 views

Neovim assign shortcut for compiling and running a scala file

Currently, after writing a scala program I have to invoke the three commands: File save compile the file run the program How to assign a shortcut for steps 2 and 3 above?
3 votes
1 answer
2k views

neovim: vim.fn is nil

I have a lua plugins script defining local fn = vim.fn. A couple of lines later it defines local install_path = fn.stdpath('data'). This script is called from my init.vim by lua require('plugins'). ...
0 votes
1 answer
15 views

How to fix vimwiki auto hiding things when the cursor is not at that line?

I am new to Vim/Neovim and I'm facing a problem. I need a very simple setup of vimwiki where I can link mathematica .m files together. No other bells and whistles required right now. I have everything ...
1 vote
1 answer
161 views

Pass custom glob to ripgrep when using Telescope live_grep

I want to use the find_command argument in Telescope's live_grep, as far as I know, it accepts a list of arguments that will be passed to ripgrep in this case. This command works in the terminal: rg -...
0 votes
1 answer
220 views

Error running notification service

I installed the new version nvim nightly and get the following error: Error running notification service: ...l/share/nvim/lazy/nvim-notify/lua/notify/stages/util.lua:150: attempt to index a number ...
5 votes
1 answer
3k views

Vim /usr/bin/bash: /s: No such file or directory

Repost from Stackoverflow; I read a comment which directed me here saying it would be more helpful. Just set up nvim; unfortunately, the following error is plaguing the setup. Whenever I try to ...
0 votes
1 answer
29 views

Get attached lsp server name

I am trying to show on lualine the current attached LSP server name. I don't want to install plugins in order to do this so I am searching for a way to do it with the Neovim API. I've read the docs ...
0 votes
2 answers
4k views

Configuring VimTeX in NvChad config

I've been trying to configure vim-tex working on the NvChad configs. I got the :VimtexCompile working and giving me output pdf. But the usual <leader>ll is giving me these errors. Also in vim {{ ...
0 votes
1 answer
18 views

Remap `ctrl` + non-english letter doesn't work. I can remap `å`, but not `<C-å>`

Remap ctrl + non-english letter doesn't work. I can remap å, but not <C-å>. -- this one works: vim.api.nvim_set_keymap('n', '<C-u>', ':vertical resize +5<CR>', { noremap = true, ...
0 votes
1 answer
111 views

Mapping > (and <) to function for special indent

I would like to map > (and <) in normal mode to a function such that it indents the line and keeps the cursor at the original position after performing the indent Here my code in the file ...
2 votes
0 answers
34 views

How do you manually install plugins for Neovim on Windows without a plugin manager, and without WSL or similar?

I'm trying to configure a vim plugin on neovim on Windows 10. I specifically don't want to use WSL or similar. I'm proficient with vi as an editor but have never used vim or neovim with plugins. I'm ...
1 vote
1 answer
432 views

Make Line Numbers Appear in Documentation

I have set number in my init.vim (I am using neovim) and it works fine for any buffers I'm editing. However, I have to enter :set number into the command line to make line numbers appear in the ...
0 votes
1 answer
34 views

How to get started with Go lang? [closed]

I purchased a book on Go lang and I wanted to get Neovim with kickstarter setup for my first project. In Mason there are a bunch of different items I have available to install. What is recommended for ...
1 vote
1 answer
46 views

Long file name overrides other items in statusline

I build my own statusline because I don't need such fancy things inside my statusline as some plug-ins provides. Usually everything is fine. The result looks like the following: NORMAL | ~/.config/...
1 vote
1 answer
1k views

<Tab> out of insert mode - lua keymap

I'm a relatively new neovim user. I use nvim-autopairs to always induce matching (, [, {, ', " character pairs, and automatically placing my cursor inside them. As an example, in insert mode, if ...
0 votes
2 answers
783 views

How to force the Read-only mode?

Greetings Today I was learning the different methods for opening a file in Vim, and I recently learned the view [filename] or [vim_launcher] -R [file_name], while both of these commands are great, ...
0 votes
1 answer
3k views

How to debug-print when writing NeoVim Lua?

While writing/debugging my nvim lua, I would like to have a running log file that I can monitor with tail -f in a side terminal. I couldn't find a good answer to this question via Google. Adding what ...
0 votes
1 answer
888 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 ...
0 votes
0 answers
45 views

Why does <esc> on empty, indented line, jump to beginning?

I'm trying to do something very simple, enter normal mode and ALWAYS be able to somehow put the normal mode cursor where it was in insert mode, whether through a mark, or otherwise. I'm doing this ...
0 votes
1 answer
1k 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')....
0 votes
1 answer
25 views

Neovim help setting a variable

I use Neovim 0.10.0 with Ubuntu. Just started and try to set a variable for gitgutter_sign_modified. In the readme it says to add in ~/.vimrc: let g:gitgutter_sign_added = 'xx' let g:...
0 votes
1 answer
36 views

Neovim not loading User-level shell (bash) profile when running on a remote server

I installed Neovim on a remote server. Everything runs fine, except that among the very few plugins I use, Telescope does not work properly since it does not find the rg (ripgrep) command. Two ...
0 votes
1 answer
5k 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
1 answer
76 views

Is it possible to run LSP diagnostics across the whole worksapce?

My LSP config works perfectly for the current buffer, but sometimes I just want to check the whole project and find all problems. I know that folke/trouble.nvim could show workspace diagnostics, but ...
0 votes
0 answers
16 views

Telescope stops working after too many instances

I am getting used to a nvim + tmux setup when I noticed Telescope suddenly delivered no results, outside currently open vim files for the current tmux window. I have 5 windows open, telescope works ...
0 votes
1 answer
715 views

Build errors when installing neovim from source in Debian ModuleNotFoundError: No module named 'ninja'

I am facing some build errors in building Neovim from source in Debian (MxLinux). I tried the package installer and was able to install Neovim, but it is an older version. So, I installed all ...
0 votes
1 answer
270 views

Can I make a new mode in Nvim?

I want to create a new mode other than normal, visual, or insert because I want to: change the functions of all keys at once allow remapping preserve the mappings of other modes and retrieve when go ...
0 votes
0 answers
110 views

How do I resolve "no parser for 'vimdoc' language" (or clean my installation)?

I am new to Neovim and decided to install the kickstart.nvim config. After using it for a while I didn't like it, so I tried to remove it. Something went wrong in this process: after deleting most of ...
0 votes
1 answer
37 views

How to enable forward slash for directory names on autocompletion with hrsh7th / cmp-path plugin?

I use this plugin https://github.com/hrsh7th/cmp-path for autocompletion, including paths in the command mode. And the problem is that on a tab press the name is completed, but the slash is not ...
0 votes
0 answers
17 views

How do I send the current selection to a desktop application in Wayland?

I use Pot Desktop to translate words. I cannot use it with the content I selected Neovim by selecting text with the mouse (Visual mode). Tech stack: kitty wayland hyprland archlinuxcn
0 votes
1 answer
1k views

Can't figure out how to set up java debug adapter Neovim

I've been getting into Neovim more and I quite like it so far. I need to use java for university in a couple months so I've been setting that up. I've gotten java to run pretty good, but I'm running ...
1 vote
1 answer
3k views

Neovim LSP not using project root configs (tsserver / eslint)

Today I have been setting up neovim on windows 11 (not WSL). I can't get the lsp servers to work. The issue is that nvim isn't loading the projects root tsconfig.json or eslintrc.json file for any ...
0 votes
1 answer
44 views

Select first file by default in netrw

When I open a directory in netrw, the .. directory at the top is selected by default How can I make netrw always select the first listing that is not .. or . by default instead? Thanks to a comment, ...
0 votes
1 answer
57 views

Vim to drag current selected multi lines up

How do we have neovim to drag up current selected multi lines as vim.api.nvim_set_keymap('x', 'I', ":m '<-2<CR>", { noremap = true, silent = true }) or: vim.api.nvim_set_keymap('x',...
7 votes
1 answer
6k views

How to change editor mode from lua (or viml)

I know I can get the current mode, via mode(), but is it possible to set the current mode from viml or preferably lua (though I know a vim command/fn can be gotten to via the lua bridge). I know I can ...
0 votes
1 answer
3k views

Sumneko lua-language-server failed to load

My OS is openbsd 7.2 with neovim v0.7.2. I am using the repo at https://github.com/amy-juan-li/nvim-lua.git to configure Neovim. There is a problem with the neosolarized.rc.lua file. Can anyone see ...
3 votes
1 answer
222 views

Vimwiki overriding normal md highlighting

I love the concept of Vimwiki, but have a problem with it overriding the default md syntax highlighting. The default works well, and I use it regularly to edit md documents to be used with pandoc. ...
1 vote
0 answers
17 views

How can I save a window layout with plugin windows and restore it later without sessions?

I want to have something like workspaces in Neovim: I can't use sessions because they don't properly restore windows for Neotree or Outline.nvim. The only workaround for that I have is to run commands ...

1
2 3 4 5
37