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
2 answers
132 views

How to load formatter.nvim with lazy.nvim?

I am trying to load formatter.nvim but I get this error: Lua Diagnostics undefined field 'setup' What is the path for the logs? This is my full configuration: return { 'mhartington/formatter.nvim'...
1 vote
2 answers
313 views

Where can I config my LSP server in AstroNvim?

I have browsed AstroNvim config extensively and even ran a grep seach for my LSP server's name but could not find mention of it. Yet I need to change the setup of this server :(. How can I do it? The ...
1 vote
1 answer
100 views

Where to find debug logs for an LSP started with vim.lsp.start()?

Long time vim user, I am getting started with using LSPs in nvim. I want to use the clangd LSP to get all those powerful LSP goodies. I am seeing a bunch of spurious errors whenever I edit a file, so ...
0 votes
1 answer
164 views

TSEnable highlight - true by default

I'm using the plugin 'nvim-treesitter/nvim-treesitter', and I can enable syntax highlighting by using the command: :TSEnable highlight However, once I close n/vim it reverts back to disabled. I'm ...
1 vote
2 answers
100 views

How can I create command abbreviations (`ca`) with the lua api?

In my init.vim, I have the following: ca WQ wq What would be the equivalent in my init.lua?
1 vote
1 answer
26 views

What is the meaning of lbr in Vim?

I write set lbr in my vimrc file but I don't know the meaning of that. What does this option do? I know it's about line-breaking but I need more explanation. This is from the Vim document and I can ...
1 vote
1 answer
64 views

Get motion used within operatorfunction?

How can I make a custom operator function that can programmatically reuse the motion that the user called it with? E.g. I want to map the operator m so that miw goes to the start of the file and then ...
1 vote
1 answer
570 views

neovim change keybind only for specific buffer type/plugin

In neovim, I have my leader mapped to space. I also use nvim-tree. What I want: when nvim-tree is open and that is the active buffer (cursor is there), map leader to something else so I can use space ...
1 vote
1 answer
57 views

Making a shortcut for compilling in C

I've changed my code about a million times already and can't seem to get it right. I want to compile the file I have open with whatever its name is minus the .c that comes after and I want to do it on ...
1 vote
1 answer
149 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?
20 votes
3 answers
18k views

How do I check the version of NeoVim in vimscript?

I can check vim's version by using v:version, and I can check if I am running in nvim by doing has('nvim'). Is there a variable like v:version in neovim to let me know the nvim version, like 0.1.4 ...
0 votes
1 answer
36 views

Neovim slow while compiling LaTeX [closed]

When I compile a .tex file using vimtex it takes a hot second to compile. Following this post I obtained the profile.log while compiling latex [given below is just the sorted part] FUNCTIONS SORTED ...
1 vote
2 answers
28 views

Switch modes without losing the selection

I use VsCode with Neovim extension. Sometimes I have to add different quotations or underscores or edit parentheses around a word but the words or marks around them aren't always straightforward or ...
0 votes
1 answer
17 views

Error when configuring lspconfig with mason

I'm trying to set up autocompletion, fixing, etc. for lua files in Neovim. I started by trying to follow the instructions from this video: https://www.youtube.com/watch?v=lpQMeFph1RE&t=188s ...
0 votes
1 answer
36 views

How to edit WebAssembly Text Format (`.wast`/`.wat`) files using NeoVim?

The latest version of VIM includes some basic support for .wat files (although it doesn't highlight the global directives directly), but the latest version of NeoVim doesn't. In NeoVim, I can set the ...
0 votes
1 answer
1k 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>...
2 votes
1 answer
45 views

How can I go to the definition (gD) in a new tab?

I am using Typescript and I have this config for going to the definition when hovering over a function name: vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) -- does not work vim.keymap.set(...
0 votes
1 answer
15 views

In Lua, how can I check if a buffer exists on disk?

I use Neotree on Neovim, and have mapped a key to open the file browser which is supposed to: open the file browser pointing to the current file if there is no filename, open the file browser at the ...
0 votes
0 answers
8 views

Recommended configuration of npm for working with Neovim and LunarVim in Debian stable

I'm trying to figure out how to set up npm the "best" way for my future Neovim+LunarVim use in Debian stable. I installed the latest stable Neovim from source and I'm in the process of ...
1 vote
1 answer
508 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 ...
0 votes
1 answer
47 views

How to traverse folders in :edit command dropdown menu

When opening a new file I use :e <tab> then a dropdown appears showing files in the PWD, I can move up and down with <tab> and <shift>+<tab> Pressing <enter> accepts the ...
1 vote
2 answers
359 views

How to range format with nvim 0.9.0?

I don't set a mapping to format code because it is not something I do all the time. So previously, I used to have a command to format or range format as follows: " format code command! -range ...
4 votes
1 answer
106 views

Why doesn't Vim recognize a pair of <\> as a single unit?

I'm kind of confused about why doesn't Vim accept di> operation on this piece of text: <This is a random text but has a backslash at the end\> but rather does on this: <This is a text with ...
1 vote
0 answers
21 views

TypeScript LSP Not Reading tsconfig.json

I am almost certain that I have a mistake in my Neovim configuration... The Neovim ~/.config/nvim directory I'm using is: https://github.com/andrewgregorywright/nvim-config/tree/main I've created an ...
1 vote
3 answers
88 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
9 views

Nvim-lspconfig sorting diagnostics floating windows

Is there a way to raise floating windows by their type in nvim-lspconfig? Like in this situation I would like to see the documentation window above the errors window. Many thanks in advance.
0 votes
2 answers
569 views

NeoVim: Following the instructions in ":h clipboard-wsl" not work? It shows "no provider" but also "ok" in ":checkhealth"?

I am using neovim on archlinux/WSL2, and try to communicate with the Windows clipboard in neovim. Following the instructions in :h clipboard-wsl, I filled in init.lua with code: vim.g.clipboard = { ...
0 votes
0 answers
16 views

Ugly border line after running shell command in Neovim

How to remove this kind of status line that appears after I get result of running shell command in Neovim using exclamation mark (!)? NVIM v0.8.1 with lualine.
5 votes
1 answer
1k views

How do I perform a code action on a visual range in Neovim 0.9?

In Neovim 0.8, I had the following command mapped vnoremap <leader>a :lua vim.lsp.buf.range_code_action()<cr> which in visual mode, gave me options such as Wrap In Try-Catch/Extract Method ...
2 votes
1 answer
40 views

How do I tell (*Neovim*) that `.ipynb` files have 1 space indents, so indent guides are correctly shown?

I'm using the Indent Blankline plugin to show indent guides. My Jupyter Notebook/.ipynb files have 1 space indents. Vim identifies them as JSON files. One way to tell Neovim that Jupyter Notebook ...
0 votes
0 answers
15 views

How to prevent the ansible format from getting overwritten?

I am using this plugin for ansible: ansible-vim, I am installing it with lazy like this: return { 'pearofducks/ansible-vim', build = 'UltiSnips/generate.sh', lazy = false } When opening a file ...
0 votes
1 answer
15 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
0 answers
35 views

How to fix 'error pwsh: not available' in Neovim healthcheck?

I am on Windows 11. I do not understand what the issue is about or how can I fix it. I just know that 'pwsh' is not recognized as an excutable but I can execute powershell by running powershell.
0 votes
1 answer
104 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
0 answers
13 views

Error setting up julia language server in Neovim

When I try to use julials I get the following prompt: Client quit with exit code 1 and signal 0 These are the lsp log [ERROR][2023-09-24 23:12:43] .../vim/lsp/rpc.lua:677 "rpc" "/...
1 vote
3 answers
11k views

Short key mapping by lua for Neovim?

The simple way to remap key in lua is: vim.api.nvim_set_keymap('n', 'foo', 'bar', { noremap = true, silent = true }) But I want a simple syntax like vimScript: nnoremap foo bar n_keymap('foo','bar') ...
0 votes
0 answers
17 views

How to change spelllang alias in vim-airline (option `vim.g.airline_detect_spelllang = 1`)?

I have enabled the vim.g.airline_detect_spell = 1 and vim.g.airline_detect_spelllang = 1 options (config is written in Lua and can be found here). The vim.g.airline_detect_spelllang = 1 makes the vim-...
1 vote
1 answer
89 views

How to handle no content for a custom text object?

I am building custom text object in lua. With the following code, I am able to change content within certain symbols. This is my code: local in_symbol = function(start_symbol, end_symbol, mode) ...
0 votes
1 answer
710 views

Highlight nvim tree directory that contains file I found with telescope

Is there a way to highlight a directory of a found file? For example I look for a specific file with telescope and when I open it, my nvim-tree is updated and shows me parent directory?
2 votes
1 answer
114 views

How do I add a custom LSP to `nvim-lspconfig`?

I am new to Neovim and wanted some help. I have been looking around but I could not find documentation on how to add an LSP that isn't preconfigured inside nvim-lspconfig. I have been trying to get ...
0 votes
0 answers
14 views

switch to terminal opened from autocomand

I am trying to create autocommand to run current python file in a terminal, when it is saved. It is working with the following autocommand: vim.api.nvim_create_autocmd("BufWritePost", { ...
1 vote
1 answer
44 views

How can I edit a file in real-time?

I would like to edit a file using Neovim and have changes saved in real-time (changes should be written to the file as I am typing), which will be displayed by an OBS plugin. Is this possible?
1 vote
1 answer
27 views

What are the differences in use case between tabs and buffer in Neovim?

Especially in the case of having a buffline.
0 votes
1 answer
67 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
35 views

How to replace <Esc> with Ctrl-c completely?

NVIM v0.9.1 Windows10 I usually prefer <C-c> rather than <Esc> or <C-[> which made me think that I want to replace <Esc> with <C-c> perfectly for almost all situations(...
2 votes
1 answer
134 views

How can I prevent the present working directory to sync between tabs in Neovim?

I think this behavior is annoying because I want to use tabs specifically to be able to work on two directories simultaneously.
1 vote
1 answer
46 views

How can I debug a nerd font not working on Windows + Neovim?

I am on Windows using AstroNvim. On other machines and installs, merely installing my nerd font is enough to make it work but this time and installation, all icons stay blank. What steps can I take to ...
1 vote
2 answers
93 views

How can I ignore default filetype indenting?

Can I tell Neovim not to load a bundled indentation file? For example, when I edit a .tex file, "share/nvim/runtime/indent/tex.vim" loads automatically. I don't want those settings. Do I ...
2 votes
0 answers
23 views

Use treesitter to jump to next argument without going into nested function calls

I'm hoping to write a macro that involves jumping to a second argument of a function call and deleting it. The function arguments will sometimes include nested function calls, sometimes not, will ...
0 votes
0 answers
20 views

How do I configure NeoVim to use angularls when working on Angular code?

I work with AngularJS an I'm really missing a good way to navigate the code with NeoVim. I would like to have the same facilities, if possible, that I have using the angularls for Angular. How do I ...

1
2 3 4 5
31