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
3 answers
175 views

Exclude empty lines when copying

I'm writing Python programs using Vim/NeoVim. One thing I often do is copying text to the system clipboard using "+y command. This lets me copy parts of the program to the clipboard, and run it ...
0 votes
0 answers
17 views

Keymaps get reset upon switching focused window back to Neovim instance

Lately I've been running into a strange issue where, upon switching focus in and out of Neovim to other windows, some of my keymaps will not be set properly upon re-focusing and instead use the ...
1 vote
1 answer
338 views

Handle star imports in Python

I'm currently developing a lot with Python. I use projects like pwntools and sometimes I'm contributing to repositories that use star imports in their source code. I know that star imports are not ...
0 votes
1 answer
204 views

How to configure pylsp installed by Mason with lsp-zero for nvim?

I want to disable a specific error/warning - E203. This is my lsp.lua where I tried to add ignore config according to this doc from lsp-zero git local lsp = require("lsp-zero") lsp.preset(&...
0 votes
1 answer
90 views

Neovim window rolls up when dividing screen horizontally with tmux

When I'm coding, I like to have neovim window up and command line window down to run my code on the screen. When I save a neovim file and divide the screen into two horizontally using tmux, the neovim ...
0 votes
1 answer
1k views

How to overwrite the conceal background color with line color?

I've started using coc for NeoVim and I've setup a highlight for a line with error using the following: hi CocErrorLine guibg=#ce2c28 However, when the error line has a concealed character, it has a ...
2 votes
1 answer
302 views

How to pass custom arguments to the shell invoked by :terminal?

I would like to specify the startup command to run on the :terminal shell. E.g. bash -c ls. The shell can be specified with set shell=bash, but how to specify the arguments? In another use case, I ...
0 votes
1 answer
98 views

Is there a way to prevent Neovim from editing another file?

When I'm using Neovim in conjunction to firenvim to edit a text box in the browser, I typically have the need to open another file. I'd like to disable Neovim's ability to read from and write to other ...
0 votes
1 answer
1k views

Black Borders in Neovim when using Windows Terminal

Why are these black borders generated when I open Neovim in Windows Terminal?
0 votes
1 answer
54 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
1 answer
206 views

(coc.nvim) error: Warning: The 'x' rule requires type information

I'm using coc.nvim for react (typescript) development. I have installed following coc plugins. coc-tslint-plugin coc-tsserver coc-prettier tslint integration is enabled for prettier in coc-settings....
0 votes
1 answer
426 views

NeoVim does not pick up ruby defined by rbenv/asdf

On my clean install macOS Big Sur (with migrated user account), I am having the mentioned problem in (homebrew) NeoVim 0.4 with Neovim gem (0.8.1) using zsh. :ruby puts RUBY_VERSION 2.7.2 :echo ...
0 votes
1 answer
110 views

How to overwrite ftdetect from a plugin loaded with lazy?

I am using ansible.vim I am loading it with lazy: return { 'pearofducks/ansible-vim', } and this is the configuration I have for ansiblels: ["ansiblels"] = function() ...
0 votes
1 answer
837 views

How can I easily configure my Neovim to provide a vs code like javascript, html & CSS autocomplete, intellisence & highlighting?

I am new to Neovim & overwhelmed by the extremely huge number of ways to configure it, which take hours & have no surity of working for me, as I am using Neovim on my Android via termux (for ...
2 votes
1 answer
64 views

Where is the text data stored during typing text in insert mode?

I would like to develop a small app in React and Nodejs that sends real-time typed text from my Nodejs/Express server to my React frontend. To do this, I would like to use socket.io. The text data is ...
2 votes
1 answer
377 views

What is 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 I use the tag command which basically provides a list ...
0 votes
1 answer
38 views

Conditional Key Mapping in Neovim Based on File Type

How can I do in nvim if the file type is js do this: vim.api.nvim_set_keymap('n', '<A-1>', [[:w | split term://node % <CR>]], { noremap = true, silent = true}) else if file type is lua do ...
1 vote
1 answer
4k views

How to configure Neovim clangd to find my files?

I've used LazyVim's mason to install clangd LSP, but it doesn't seem to work properly. It can't find files in my workspace, so when I try to jump to declaration, it does nothing if the declaration is ...
0 votes
0 answers
8 views

Neovim only underline LSP diagnostics that are part of a line

I only want an LSP diagnostic to have an underline if the underline covers only part of the non-whitespace text of a line. I have a column of diagnostic signs so a full line being underlined gives no ...
1 vote
1 answer
57 views

I can't get haskell-tools working in LazyVim

I'am trying set up my LazyVim and i would like to have haskell-tools working. I can't figure out, where start looking for problem, in my ubuntu system i got several version of GHC, HLS installed via ...
1 vote
1 answer
34 views

Not displaying symbols in vim-airline

My vim-airline has an unexpected ? symbol next to the program being run: I have tried manually setting the airline_symbols from here, for ex: let g:airline_left_sep = '>' and so on but this does ...
0 votes
1 answer
27 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: ...
1 vote
2 answers
2k views

Error while reading ShaDa file

I get the following error even though I have a .viminfo in my home directory. Isn't that what it is complaining about? E576: Error while reading ShaDa file: last entry specified that it occupies 11 ...
1 vote
1 answer
257 views

ccls configuration in nvim-lspconfig

I've been struggling for setting ccls in Neovim. I've ever used clangd for a long time; after following TJ's video and instructions on nvim-lspconfig, it works well. Now I would like to switch to ccls ...
0 votes
0 answers
14 views

Prevent Neovim from setting Application Cursor Keys Mode [PuTTY]

I’m using nvim within a PuTTY terminal and I’m having trouble with the Arrow Keys and the Ctrl + Arrow keys. Both keys generate identical character sequences, leading to some complications. While I ...
0 votes
1 answer
65 views

Can I jump to implementation in a C project with coc-clangd?

I use NeoVim with coc-clangd. I have a project in C and I use vendor library SPL for STM8S chips. SPL library is in parent directory out of my project. This is my compile_flags.txt: -xc -std=c99 -Wall ...
0 votes
0 answers
23 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
96 views

How to debug this problem with the :map command?

I was trying to view my key mappings because I can't seem to jump through parts of snippets in UltiSnips. So I type :map and hit enter and it comes up with the start of the list, but there I can't ...
4 votes
1 answer
1k views

How to disable semantic highlighting for certain filetypes only?

Using Neovim's native LSP interface, I noticed that semantic highlighting provided by LSP makes things worse for certain languages, so I want to disable it based on filetype. I know about possibility ...
2 votes
1 answer
52 views

Neovim is looking for configs in current directory, how do I fix this?

I am trying to configure neovim by adding plugins via lazy in my C:\User\{username}\AppData\local\nvim folder. However when I try to use neovim it only works in the nvim folder and no where else. I ...
1 vote
2 answers
163 views

How can I make Neovim kill ongoing processes when I quit?

I'm setting up a nice development environment in Neovim. If I have a Docker container running inside a terminal in Neovim, I want that command to exit when I quit Neovim with :qall. Currently, I can ...
0 votes
0 answers
16 views

How to make all source selector visible in neo tree

I'm trying to use neo-tree.nvim for file viewing purpose. My complete neovim configuration is here local Icons = { diagnostics = {error = "", warn = "", hint = "", ...
0 votes
1 answer
27 views

From a Neovim extension, how to detect project root?

I am learning to write Neovim extensions. Let's name it my-extension. From my extension, I want to detect the presence of a .my-extension.json at the root of the project. This is because I want to ...
0 votes
1 answer
92 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 ...
0 votes
0 answers
21 views

Remove initial message: "In the vue 3 project, The Vue Language Features (Volar) is new recommended extension in VSCode.: "

I installed via mason vetur-vls and after opening any *.vue file, I got this message: In the vue 3 project, The Vue Language Features (Volar) is new recommended extension in VSCode.: 1: Learn More ...
0 votes
1 answer
212 views

Can not remap command using mapleader and keymap

I am trying to set <leader>pv as :Ex but always it shows E492: Not and editor command: ,pv Basically the newly added command mapping is not setting up or saving properly. I do not know what to ...
0 votes
1 answer
28 views

keybindings that change mode: cannot use keybindings on the new mode

I have defined the following keybindings: local opts = { noremap = true } local ll = "<leader>i" opts["desc"] = "Send visual lines" vim.keymap.set("v", ...
1 vote
1 answer
393 views

vim.keymap.set issue

I've tried to make a key map as follows: vim.keymap.set('x', '<leader>n', function() -- Here <leader> is <Space> line1r, line1c = unpack(vim.api.nvim_buf_get_mark(0, "<&...
1 vote
1 answer
52 views

Redraw cursor at absolute top or bottom while keeping scrolloff

My goal is to remap zt and zb to set scrolloff=0, run zt or zb, then set scrolloff back to its original value. I like the context when scrolling, but when I hit one of these keys I really want the top ...
0 votes
1 answer
35 views

init.vim: E194: No alternate file name to substitute for '#'

I have a problem with adding a keymap to delete all my buffers. Namely, I used the following map in my init.vim file (source): nnoremap <leader>B :%bd|e#|bd#<CR> And I get the following ...
0 votes
1 answer
1k views

Preview syntax highlighting from Telescope more accurate than in nvim buffer

Syntax highlighting within Telescope preview shows up better than inside neovim itself. From what I understand, the Telescope preview is based on what it would look like in an nvim buffer, so what am ...
0 votes
1 answer
25 views

Text randomly shown in italics after being sent to a REPL with iron.nvim

Some parts of my code, apparently at random, are rendered in italics, and when I type it goes back and forth from italics to normal. Why is that and how I can avoid that? EDIT: Contrary to what I ...
1 vote
2 answers
604 views

How to achieve a vertical split with tabs on left?

I'm a newb trying to learn neovim. I'd like a layout where a tab window is on the left-hand side and the right hand side has a horizontal split with the terminal window in the bottom and various help ...
0 votes
1 answer
33 views

<C-w>= doesn't work

When I press <C-w>, whichkey tells me that pressing = leads to "equally high and wide". However this only works for horizontal splits but not for vertical ones. How can I have "...
1 vote
1 answer
770 views

Change the fold marker characters used to delimit folds [duplicate]

So, oftentimes when I create folds, they actually interfere with other parts of my code and begin folding wherever (n)vim finds another group of three }}} A quick example would be: % {{{ Custom ...
0 votes
1 answer
627 views

Neovim: external C++ Library Header file parsing not working

I am using Neovim (LunarVim IDE layer), I want to work with 'openFrameworks' library. To not get linter warning on header file includes (look at example below), I am adding all possible header files ...
0 votes
1 answer
1k views

Unable to use Nvim-dap with codelldb

I am trying to configure neovim with nvim-dap to debug C++ code. I was thinking about using the codelldb debugger, so I installed it via Mason My configuration looks like this: local dap = require(&...
0 votes
0 answers
12 views

launching dap without opening specific file

I'm using dap+dapui+dap telescope extension. And I am using launch.json configuration to run django code with dap To launch I need to open a python file and run Dap Continue to make dap menu show and ...
1 vote
1 answer
29 views

Using a single carret character as the fold character in Neovim using Lua

I am using Neovim v0.9.5 and configured this editor using Lua. I'm searching for a way of using a single caret down (▾) character for folds. Here is what is currently used by Neovim by default. ** ...
1 vote
4 answers
2k views

How can I view a list of all of the features that can be checked for using `has()` in Vim?

How can I view a list of all of the features that can be checked for using has() in Vim? I recently came to know the has() function for testing the presence of "features" (see below). :h ...

1
2 3 4 5
34