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
1
vote
1answer
195 views

Unable to use conceal with vim-javascript plugin

editor: NVIM v0.4.3 I have the following syntax file at ~/.config/nvim/after/syntax/javascript.vim syntax clear javaScriptFunction syntax match javaScriptFunction /\<module.exports\>/ ...
0
votes
0answers
28 views

Problems with running neovim

I have some problems with running neovim. I don't know what I have done but it shows me this message: nvim: /builddir/build/BUILD/neovim-0.5.0/src/nvim/ui_compositor.c:556: ui_comp_raw_line: Assertion ...
2
votes
0answers
33 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
0answers
26 views

Getting pwd onto Lualine

Trying to place the working directory into a Lualine segment here's what I'm trying: function fpwd() │ local cwd = cmd('pwd') │ return cwd │ end ... lualine_b = {fpwd}, I believe ...
0
votes
0answers
24 views

expanding parentheses gives undesirable indentation in neovim

This post is not about curly brackets. It is about parentheses. I couldn't find a solution on how to expand parentheses with my ideal indentation. What happens now with expanding parentheses Before (|)...
0
votes
1answer
33 views

Run a Function Upon Exiting a Terminal

By using the following code... vim.fn.termopen("foo") I can open a terminal with a certain command. What I want to do is run a Lua function from a plugin upon exiting the terminal. Pseudo ...
94
votes
8answers
64k views

Exit from Terminal mode in Neovim/Vim 8

I can't figure out how to go back to Normal mode after entering Terminal in Insert mode... Escape just doesn't seem to work. Any idea?
0
votes
1answer
44 views

How to set the diagnostic level for neovim lsp

By default the lsp has set the diagnosticLevel to Hints, i wanna set this to information level. I tried looking at various places but couldn't find much. I am using LunarVim config if that gives extra ...
0
votes
1answer
32 views

Syntax highlighting is incomplete on neovim, fixed by calling Telescope

I have this problem that I would really like to get to the bottom of. If I open a file on neovim it will display like the broken syntax highlighting, see image below. Now, If I run :Telescope ...
0
votes
0answers
23 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
0answers
20 views

How can I read the contents of a buffer or line then rewrite them, from a Lua script?

I am trying to write a pretty-printer Lua plugin for a LaTeX-like language. The idea is that if a user types \cup in insert mode then presses <Space> or <Tab> or <CR>, then my script ...
0
votes
1answer
55 views

How to map <BS> to do nothing?

(I'm using Alacritty + NeoVim, I'm not sure about whether this issue is from Alacritty or NeoVim.) I want to map <BS> in insert mode to do nothing, i.e. <Nop>. I have tried: inoremap <...
0
votes
0answers
23 views

Can you have relative numbers, but for characters/words in a line?

This is relativenumber. It shows the line numbers, relative to your cursor: 1 one line before your cursor 0 your cursor is here 1 first line after 2 second line 3 third line 4 and so on It's super ...
-1
votes
0answers
46 views

How to setup vim/neovim for golang development [closed]

I am really struggling with this now. I have been using Vim for a long time and it is my preferred editor. Looks like there have been some really interesting developments recently such as LSP. I would ...
0
votes
1answer
15 views

Global variable not setting correctly when starting neovim

I'm trying to setup separate configs for my WSL, Windows, and MSYS2 environments in the same init.vim with simple if-else statements. So, I'll need to know what environment I'm in. To know that I ...
0
votes
2answers
37 views

how to make a word turn into certain commands in vim command line?

I want :cup in vim command line to turn into :tabdo call MapRunCmd()<CR> Hope that somebody can help me out PS: I've tried this nnoremap :cup :tabdo call MapRunCmd()<CR> but didn't like ...
1
vote
1answer
25 views

How to autocomplete from dictionary while typing?

I've set a dictionary with the command: set dictionary+=~/Dictionary.txt And add the following command to make more quickly to access it: set complete+=k But I still have to press <CTRL-N> to ...
0
votes
1answer
27 views

Run `vim -c <command>` before loading vimrc?

I'm adding some setup to my .vimrc, and what I want to do is to be able to run a command using the command line before the vimrc is executed. I tried vim -c 'command' but it runs after the .vimrc. The ...
0
votes
0answers
34 views

Need help to make a by-default `:RunWithFile` of this toggle function

related to this post, How to make a toggle function in .vimrc that toggles multiple configs of almost same type? @BLayer's code func! MapRunCmd() abort if exists("b:rwfcmd1") && ...
0
votes
0answers
17 views

How to set up a buffer to receive command output

In my $VIMRC, I would like to autocmd BufWinEnter *.ly call s:BufWinEnterLY() autocmd TextChanged *.ly call s:TextChangedLY() autocmd BufUnload *.ly call s:BufUnloadLY() I want s:BufWinEnterLY() to ...
1
vote
1answer
2k views

Correct way to setup python version for coc

I want to set PYTHONPATH and python interpreter according to projects I am working on. I am working both on projects involving python 2.0, and ones involving python 3.0. There is the concept of ...
0
votes
1answer
51 views

How to make a toggle function in .vimrc that toggles multiple configs of almost same type?

My .vimrc code autocmd FileType cpp nnoremap <F4> :RunWithFile autocmd FileType cpp nnoremap <F4> :RunWithFile ~/Downloads/ > output.txt && cat output.txt<s-left><s-...
0
votes
0answers
10 views

How do I enable completion prompts in Neovim + LSP?

I am using Neovim 0.6.0 nightly (I also have the nvim-lspconfig and hrsh7th/nvim-cmp plugins installed) and have a few different LSP servers which do seem to be working (I have tested them by simply ...
0
votes
0answers
12 views

:checkhealth in neovim spits out gibberish next to branch name

I tried doing :checkhealth and found something similar which looks like this $TERM is xterm-256color, I'm on Ubuntu 20.04 LTS. This is interfering at other places as well, if I try formatting the ...
0
votes
1answer
80 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
0answers
13 views

How to hide or configure type labels when using Neovim+Treesitter+Rust

I installed Rust language support to Neovim's Treesitter via :TSInstall rust. All works well, but now there are extra labels showing the type to the right side of each variable assignment. While I ...
0
votes
1answer
39 views

Why vim creates an extra last line when importing a template?

My init.vim code: autocmd BufNewFile *.cpp 0r C:\Users\User\Desktop\cp\Template.cpp When i create a .cpp file, Template.cpp code is imported in that cpp file. upto this point, everything is fine. ...
0
votes
1answer
26 views

what's the difference between `tag` and `tags` command

I've recently come across the concept of tags in vim. I run ctags on a file and it generates tags for that file. When I try to access those tags Iuse the tag command which basically provides a list of ...
0
votes
0answers
15 views

Make nvim to show colors while performing external commands [duplicate]

By default my new neovim doesn't do this showing everything black and white. How could I make it show as on picture 2 (it works this way on raw vim)?
13
votes
4answers
4k views

Remote pair programming in NeoVim?

I'm a NeoVim user and would like to be able to collaborate in real time with users, preferably also across other editors. Are there any open source plugins that enable remote Neovim←→Neovim pair ...
1
vote
0answers
22 views

coc.nvim having issues with background color and error messages

Above is what I see in NeoVim 0.4.4 (on Ubuntu) when I get a type error using coc.nvim and the Haskell Language Server. My configuration for all background and theme related things are: syntax on ...
0
votes
2answers
36 views

How to find line and column for a n-th byte in a buffer?

I want to find a line number and a column for a particular byte number in a buffer in Neovim. I can get it (sort of) with local b = 444 local line = vim.fn.byte2line(b) local line_start = vim.fn....
0
votes
1answer
60 views

Using the execute shell command (:!) on Windows and MSYS2

I'm new to neovim (and vim in general), and I'm trying to use it on Windows with MSYS2. I noticed they have a package for vim, but not for neovim. I used the neovim installed through chocolatey ...
0
votes
3answers
103 views

How can I make vim check for vimrc updates on startup?

My vimrc file is hosted on github. I update it once in a while, and use it on many different computers. Is it possible to make vim asynchronously check the github repo for a new version of the vimrc ...
0
votes
1answer
43 views

how to deduplicate packpath / runtimepath?

Problem: I noticed that my "&packpath" has some duplicates, I want to remove them. What I have tried: My viml knowledge is not very strong but I did manage to create a unique "List&...
14
votes
5answers
7k views

What are the major differences between vim and neovim?

I have been using vim for a few months and I am wondering if I should switch to neovim. Currently I am using no plugins, and only a few basic mappings.I use vim both for quick edits of config files ...
2
votes
2answers
2k views

Vim/neoVim really slow startup

I am facing huge slowness when i start the neovim for the first time in a session, and then next time i open it the startup time is little better relatively but not as fast as vim is. I looked at the ...
0
votes
1answer
118 views

ever since i moved from vim to neovim, my AG has started acting strange

I recently switched to neovim, but ever since my AG usage have acted weird lately. Here is my current .vimrc file. Here is my neovim init file ~/.config/nvim/init.vim: set runtimepath^=~/.vim ...
0
votes
1answer
31 views

Is it possible to exclude special buffers from the v:oldfiles list?

I use the :oldfiles command a lot, but it's annoying that it gets populated with things like terminal or help buffers. My understanding is that any buffer for which a mark exist will be listed by the ...
3
votes
1answer
585 views

How to delete non-empty directories in netrw (vim 8 or nvim)?

I will try to delete some non-empty folder in netrw by pressing SHIFT + d and, after press y, i got this error: (netrw) unable to delete directory {path} I already put this variable in my .config/...
0
votes
1answer
39 views

How to set the intelephense workspace for CoC phpls?

I'm using coc-phpls to edit a plugin project inside a bigger project. i.e. the dir structure is like /var/www/example/ /var/www/example/libraries/ /var/www/example/plugins/myplugin ← my working dir. ...
0
votes
1answer
35 views

Make 'cabbrev' work from command-line but not search prompt?

I am using NeoVim, and I automatically define an abbreviation for the string W every time the commandline mode starts. However, it seems that commandline mode includes the search modes as well. I do ...
0
votes
1answer
43 views

Vim locks up completely when pressing `ctrl+w` while using tmux + vim

I have a tmux + vim setup in which I use split panes. Every time I press ctrl+w to move between the vim panes, my vim instance becomes completely unresponsive. At first I thought this was a tmux issue ...
0
votes
1answer
14 views

Unable to resume backgrounded Neovim-terminal-emulator-process using `kill -CONT`

So, I'm trying to find an actual solution to another question on here that doesn't really have one. However, I'm running into a problem with backgrounding/foregrounding behaviour. I need to background ...
0
votes
1answer
32 views

How to colorize words in a buffer, using type data and position data?

I am writing a plugin for Neovim using Lua. If I have a text and some predefined arbitrary types, for example: chita wolf grizzly types: dog(green), cat(blue), bear(yellow) And I know positions/...
0
votes
0answers
23 views

How to require `luafile` not in a subdirectory

in my config of init.lua ,I want to load a luafile from anywhere or any directory so : can I source it without function vim.cmd() vim.cmd('luafile /full/path/to/file.lua')
0
votes
1answer
47 views

Data storage for a plugin

I would like to make a plugin for Neovim that does some pretty expensive processing for a text in a file. I would need to keep processed data as well as a hash signature of a file (to avoid processing ...
1
vote
1answer
25 views

How to match two parts of error message and concatenate them?

I try to read :h errorformat: %m error message (finds a string) I try to read it, but I practically found that it's impossible to specify %m twice: E372: Too many %m in format string I ...
1
vote
0answers
54 views

What Neovim GUIs have GUI scrollbars as described in vim under :h gui-scrollbars?

TL;DR I am looking for a Neovim GUI with GUI scrollbars as described in vim under :h gui-scrollbars (accessed on 2021-08-21). What GUI Vim scrollbars are like 2. Scrollbars *gui-...
1
vote
1answer
19 views

Conceal HTML span and highlight content

I am currently writing some Anki cards in NeoVim. Anki supports HTML and I can therefore write cards in the following format. Forumlate the <span class="highlight">Central Limit ...

1
2 3 4 5
16