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
0 answers
20 views

How to use command to insert a space in insert mode?

As title. Given that I'm already in insert mode and there is some insert mode function. Inside the function, I want to insert a space by command, how?
user avatar
  • 721
0 votes
2 answers
37 views

How to "enter" the selected folder in the vertical wildmenu?

When using the vertical file/folder wild menu (ex: pressing Tab after :e or :cd ) and focused on a folder, is there a way to map a key to "move" inside that folder, and pick one of it's ...
user avatar
0 votes
0 answers
13 views

HTML Lsp missing format shortcut

I'm having a problem in Neovim with Lsp formatting in Html files. :checkhealth is Ok :LspInfo is Ok, html is attached I have a shortcut for formatting, buf_set_keymap("n", '<space>fo', ...
user avatar
0 votes
0 answers
6 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 ...
user avatar
0 votes
0 answers
20 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 {'...
user avatar
3 votes
1 answer
403 views

Installing Neovim 0.7 on Ubuntu?

I just moved from Mac to Ubuntu. I have set everything up but my lua keybindings are following the 0.7 configurations. When I install neovim on Ubuntu it gives me 0.6. I tried this: sudo add-apt-...
user avatar
  • 75
0 votes
1 answer
18 views

Wrap lines only after a space [duplicate]

So, I like that (n)vim has line wrapping support, but what I dislike about it is that it does things like this: 1 | Instead of wrapping text--| 2 | like this, Vim does it lik| 3 | e this. ...
user avatar
0 votes
1 answer
59 views

How to remove vim trailing white space?

In Vim I used autocmd BufWritePre * :%s/\s\+$//e to delete trailing white space. Now, Neovim 0.7 has the new vim.api.nvim_create_autocmd. What is the correct syntax to update this autocmd in Lua? vim....
user avatar
  • 103
0 votes
1 answer
58 views

Neovim Lua: Error while calling lua chunk [...] '' expected near 'local'

When I run Neovim (NVIM v0.6.1), I get Error detected while processing /home/ecarroll/.config/nvim/init.lua: E5113: Error while calling lua chunk: vim.lua:63: /home/ecarroll/.config/nvim/lua/plugins....
user avatar
0 votes
0 answers
22 views

(Code review) Copying file path relative to cwd with the line number appended

I am replicating what PHPStorm and VSCode do by allowing me to copy the file path and line number (plus column) to clipboard. I have written a function in lua to do this, but, I wanted to ask about ...
user avatar
1 vote
1 answer
45 views

How to comment html in php file in vim?

I use this plugin for comments. Plug 'tpope/vim-commentary' And when I comment html code in php I get /* <div class="our-photos"> */ /* <h2 class="our-photos__main-title"...
user avatar
  • 15
0 votes
2 answers
157 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 ...
user avatar
  • 307
1 vote
1 answer
89 views

Wrap :retab! or create a new command that calls it?

My vim does most everything what I want with :retab! one thing I would like it to do in addition is remove all trailing whitespace like this, :%s/\s\+$// Is there a way to redefine :retab! such that ...
user avatar
0 votes
0 answers
18 views

Disable LaTeX concealing in nvim easymotion highlighting

When using nvim with vim-easymotion it conceals a lot of LaTeX commands while showing all the easymotion symbols, i.e. it shows unicode symbols as motion symbols which I just can not type. It only ...
user avatar
0 votes
1 answer
123 views

How is this called, and what do I need to do to get it in Neovim?

Honestly I don't even know where to ask this, but I want to get a plugin in order to get this inside my nvim, but I don't even know what it is called to search for it So, what do you call the thing on ...
user avatar
0 votes
1 answer
48 views

Configure neovim to use means other than color for syntax highlighting

I'm trying to write a .vimrc that's portable between vim and nvim (neovim) and directs the editor to use means other than colors to distinguish syntactic entities. In vim, the following .vimrc will ...
user avatar
  • 1,633
0 votes
0 answers
29 views

latex file opens to be empty

I am just starting to learn vim and im using neovim to write latex files. I open an existing file as follows: nvim Personal Notes.tex And the output for this is a blank nvim file. Is this not the way ...
user avatar
0 votes
0 answers
29 views

How to get the current window horizontal padding?

Today I wrote this little utility function to resize my current window to a comfortable width: -- Resizes the current window to the maximum required width function M.resize_window() local padding =...
user avatar
0 votes
1 answer
48 views

leader not working in visual mode in lua?

I am migrating from vimscript to lua for my keybindings and I have remapped the leader key as space: vim.g.mapleader = " " It works fine with all my key bindings. Except in visual mode. ...
user avatar
  • 75
1 vote
1 answer
43 views

Which setting allows me to text wrap whole words instead of letters?

At the moment, my width is set to 80. when a new line starts, it doesn't take the whole word to the next line. Instead, it takes the lagging letters. Which setting changes this behavior?
user avatar
  • 75
0 votes
0 answers
29 views

Where should dein.toml be stored?

I'm installing nvim and I can't get :call dein#install() to find the dein.toml file. I am on OSX, nvim 0.7 Install path for dein is ~/.cache/dein, and nvim's init.vim is in ~/.config/nvim/init.vim. I ...
user avatar
0 votes
1 answer
27 views

How to make an abbreviation that expands without pressing space

I am trying to replicate the behavior of beg abbreviation shown on the page https://castel.dev/post/lecture-notes-1/ with vimscript. That means I want to make it so that when I type "beg" in ...
user avatar
  • 11
2 votes
2 answers
42 views

How to detect whether the current file might contains a long line?

As title. I want to disable some plugins when the current file is a production file, i.e. it is compacted into < 10 lines but each line contains >1000 columns. I'm using NeoVim so I prefer ...
user avatar
  • 123
0 votes
0 answers
27 views

Convert Vim keymap to lua

I want to change my emmet leader key in vim, but I do not know how to do this in lua. Vim Script code: imap ,, <C-y>, Lua Code: local map = vim.keymap.set
user avatar
  • 1
0 votes
1 answer
25 views

How to take the path argument passed into vim/neovim into account when call `getcwd()` within the config?

As title. I'm using NeoVim. If I use vim.fn.getcwd() in the config I will not get the correct path considering the argument, e.g. nvim ./go/deeper/into/some/folder, passed to nvim. Solutions in ...
user avatar
  • 123
2 votes
0 answers
63 views

TailwindCSS Intellisense into Neovim

I need someone that has tailwindcss-intellisense into neovim, I haven't been able to set it up since yesterday, I might have at this point to build it from scratch. I followed this two guides: https://...
user avatar
  • 21
0 votes
1 answer
39 views

Disable/change colors in vim terminal (but not in open file)

I'm on Mac Neovim. When I type :term, I am greeted by this: This poses some issues; For example when I run a command, it also colors the output; I don't want this to happen. Is there some way to ...
user avatar
  • 11
0 votes
0 answers
17 views

In nvim, can I map Tab without removing <C-i> as `jump forward`?

I've been mapping all my telescope commands to tab-<key>, which is quite convenient. However I've noticed that its broken the default shortcut for navigating forwards through the jump list, ...
user avatar
  • 153
2 votes
1 answer
56 views

How can I call function in visual mode

I want a function to change underline word to little camel for one line. When I use <shift+v>:s/_\(\w\)/\u\1/g, it work fine. And then I want to make a function to simplify it, <shift+v>:...
user avatar
  • 23
0 votes
0 answers
20 views

Pasting via "p" not working in normal mode in Telescope

If I open Telescope for file or text search and switch to normal mode within the Telescope prompt and press p, nothing happens. Does anyone know how I can enable pasting via p in normal mode in ...
user avatar
  • 525
0 votes
1 answer
29 views

Neovim source code: what is if_true in options.lua?

The defaults that Neovim has are specified in src/nvim/options.lua. I'm trying to understand this source, Let's take for example, something like backup { full_name='backup', abbreviation='bk'...
user avatar
0 votes
1 answer
114 views

CTRL-SHIFT-P is not working on `neovim`

Below lines are part of my .vimrc. map <C-S-p> :CtrlPCmdPalette<CR> let g:ctrlp_cmdpalette_execute = 1 It's working fine on normal vim, but not working with neovim. My neovim init file ...
user avatar
  • 103
0 votes
1 answer
97 views

How do I close a hover'ed window with LSP information, Escape does not work?

Whenever I open a hover window with my LSP plugin, :lua vim.lsp.buf.hover() I get a floating window hovered over text, but then I can not close it? I've tried ESC and the like. How do you close these ...
user avatar
1 vote
1 answer
24 views

How can I re-run my init.lua?

If I'm making changes in my init.lua file, is there anyway to have those changes reflect in my current copy of Neovim without restarting the editor? Not limited to mappings, but is there something ...
user avatar
0 votes
1 answer
53 views

super key not working in neovim on linux

I'm trying to create a shortcut, but I can't get vim to recognize my super key. I tried the following combinations: lvim.keys.normal_mode["<A-h>"] = ":BufferLineCyclePrev<cr>...
user avatar
  • 525
0 votes
0 answers
16 views

Nerdtree Tab witdth - how do I change the size?

When I press t in nerdtree, it opens the file in a new tab. But the tabs are very small. How do I make them longer (span the page)?
user avatar
  • 75
1 vote
2 answers
155 views

Where does neovim store its defaults? Where is the defaults.vim for neovim?

On regular vim, you can find the defaults in defaults.vim. These are sourced when there is no .vimrc, or when you include in your .vimrc the following, source $VIMRUNTIME/defaults.vim " Source ...
user avatar
1 vote
0 answers
33 views

How does .vimrc relate to ~/.config/nvim/init.lua?

When I heard neovim had a "native language client", I wanted to trying moving it. Previously, I was using a language server loaded through vim-plug. This was always problematic. When I ...
user avatar
1 vote
1 answer
39 views

Is the goal of Lua in neovim to replace Ex, and if not what is it?

I am a new user to neovim, and a moderator on this site said You seem to imply that you expect there should be a native way to run [filetype] (and to some extent every Ex command) directly in Lua. ...
user avatar
1 vote
1 answer
155 views

How can I find what Lua API functions are supported in my Neovim?

When I try to run the following code in my conf or under :luado vim.api.nvim_create_autocmd({"BufNewFile", "BufRead"}, { pattern = {"*.t"}, callback = function () ...
user avatar
0 votes
1 answer
36 views

How do you set terminal options like t_Co in neovim?

When I put into my ~/.config/nvim/init.lua vim.opt.t_Co = 256 I get E5113: Error while calling lua chunk: vim/_meta.lua:659: Not a valid option name: t_Co But there is an option in vim called t_Co. ...
user avatar
-1 votes
1 answer
36 views

How can I port nmap, map, and imap commands to Lua configuration?

How can I port map commands in my vimrc file to Neovim lua configuration? For example: nmap <silent> <F2> <Plug>(lcn-rename)
user avatar
0 votes
2 answers
157 views

How do I port a filetype command to neovim's lua format?

Currently my .vimrc file has this in it, filetype plugin indent on -- filetype detection[ON] plugin[ON] indent[ON] How can I port filetype plugin indent on to neovim's lua format?
user avatar
0 votes
1 answer
55 views

neovim lsp configuration

I'm a begginer in vim/neovim world. I understand that lsp is for autocompletion, auto import, signature info, etc... So I have installed coc.nvim. But I have some question about the concept : if I ...
user avatar
  • 101
0 votes
0 answers
24 views

How can I make the NeoTerm command start halfway down the screen?

I have a bunch of macros that invoke the :T <command> functionality of Neovim's neoterm plugin. But as you can see, it creates the terminal right near the top of the screen: This forces me to ...
user avatar
0 votes
1 answer
35 views

How to set prettier indents?

I have set tabstop to 4. But when I use prettier, it defaults my indentations to 2 spaces. How do I change this? I am using the coc prettier extension. const thing = () => { var hi = 1; //...
user avatar
  • 75
0 votes
0 answers
16 views

Adding new line characters after a specific amount of bytes

I'd like to add new line characters after every specific number of bytes in binary mode. I tried this script but the repetition count depends on the number of characters not bytes. Like when there is ...
user avatar
  • 101
0 votes
0 answers
27 views

NERDTree: open/close directories with arrow keys

I would like to be able to open and close folders within NERDTree with the right and left arrow respectively, instated of having to use the enter key. I tried the following keybind, without success : ...
user avatar
  • 101
1 vote
0 answers
30 views

How to visually select entire broken line in NeoVim terminal

(I'm using NeoVim, vsplit term://zsh) If I have a long terminal line that gets broken, and go into visual mode in order to copy something, selecting the entire line does not work as I expect: |$ ...
user avatar
1 vote
1 answer
28 views

Word motion as though non-keyword characters were whitespace

I'm very new to vi, so sorry if this is a dumb question. I've recently learned about the list of keyword characters, and I've noticed that vi treats strings of characters not in that list as words ...
user avatar

1
2 3 4 5
20