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
13 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-...
Vladyslav Rehan's user avatar
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", { ...
user48990's user avatar
0 votes
0 answers
22 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.
samuelnihoul's user avatar
1 vote
1 answer
34 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?
CoffeeDev's user avatar
2 votes
1 answer
129 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.
samuelnihoul's user avatar
1 vote
1 answer
22 views

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

Especially in the case of having a buffline.
samuelnihoul's user avatar
1 vote
1 answer
22 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(...
bigpotato's user avatar
  • 111
2 votes
0 answers
13 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 ...
Michael's user avatar
  • 121
0 votes
0 answers
13 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 ...
Anderson's user avatar
1 vote
1 answer
14 views

How to exclude filetype in autocmd using Neovim's Lua API?

Translating this excellent Vimscript answer for creating an autocmd that applies certain options only to the focused window into Lua, I have the following: local focused_window_group = vim.api....
Jethro Cao's user avatar
0 votes
1 answer
21 views

I've switched to nvim and init.lua, which pulls in onedark colorscheme. How can I add a custom rule?

I have C-style comments inside PHP strings that contain SQL code, so I can easily understand what the query is doing when I see it running on the server. DB::runQuery('/* this is my SUPER complicated ...
Codemonkey's user avatar
2 votes
1 answer
104 views

How do you pass options to a lua plugin?

In many Neovim plugins these days, configuration is done in a new way, and the readme just says to "pass option_name = someval to enable some behaviour". For example, archibate/nvim-gpt, ...
TamaMcGlinn's user avatar
1 vote
2 answers
87 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 ...
Alan's user avatar
  • 123
1 vote
1 answer
92 views

Neovim v0.9.2 Treesitter Update: Repeated Parser Installation Issue and Permissions Problem

I've updated my neovim from v0.8.x to v0.9.2, so my treesitter just stopped to work. Every time a opened a file (js, ts, tsx, jsx, lua, html, css, etc...) it run the parser installation for that file ...
Lai32290's user avatar
  • 245
0 votes
1 answer
21 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 ...
piedpipr's user avatar
0 votes
2 answers
43 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 ...
jonstewart's user avatar
0 votes
1 answer
32 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 ...
vishalpaudel's user avatar
0 votes
0 answers
11 views

Control neovim via pynvim from jupyter notebook

I've got a jupyter notebook, from which I want to control an instance of neovim. Following the instructions in the pynvim repo, I can setup neovim to listen like so: NVIM_LISTEN_ADDRESS=/tmp/nvim nvim ...
beyarkay's user avatar
  • 163
1 vote
2 answers
33 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 ...
tsvallender's user avatar
3 votes
1 answer
34 views

Question about LuaSnip

I am following this guide to setup Snippets in lua. I managed to get the first example snippet working, but then noticed the Readme for Luasnip ( Resources for beginners section) mention that "...
kay's user avatar
  • 33
-1 votes
0 answers
21 views

mason-lspconfig install pylsp-mypy

I am replacing nvpak requirements with mason In the past, I used null-ls to solve these needs, installing plugins for lsp like pylsp-mypy, but it seems that mason-lspconfig can only install lsp ...
Pakrohk's user avatar
0 votes
1 answer
69 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(&...
Educpf's user avatar
  • 33
0 votes
1 answer
21 views

Neovim Markdown toggling bold keybind

I am trying to make it so I can have a keymap for toggling things like bold in a markdown file. I used to use vscode with the markdown plugin and they offered the option to, with a simple keybind, ...
Educpf's user avatar
  • 33
1 vote
1 answer
56 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, "<&...
HRC's user avatar
  • 11
1 vote
1 answer
34 views

Resize a vertical split to just fit the max width of the file contents

I'm trying to make the width of a vertical split as small as possible but still fully show even the longest line of text. No line wrap. I'm trying to do something like :vertical resize <longest-...
agshe's user avatar
  • 23
0 votes
1 answer
16 views

Separating adjacent folds created with foldexpr

So, context: I'd like to use foldexpr to fold by indentation, but including the start and end lines (that are not indented). For example: function TestFunction(args) statements ... end Would ...
Sneez's user avatar
  • 1
1 vote
1 answer
39 views

Cannot make vim-markdown conceal the formatted text

I am quite new to Neovim, just installed some of the important plugins and now I wanted to make it really good for writing Markdown files. I installed vim-markdown for that, and followed the ...
Educpf's user avatar
  • 33
1 vote
1 answer
28 views

VimTeX omnicompletion for bibliography

Problem with builtin omnicompletion for bibliography. It works on main.tex, but not in the chapters. This is the tree structure: ├── chapters │   ├── actors_behaviour.tex │   ├── analysis_acts.tex │   ...
enrico223's user avatar
1 vote
1 answer
61 views

Neovim/Lua: How to use vim.keymap.set with vim.v.count

I'm trying to add a count to one of my keymap bindings. vim.keymap.set("n", "<leader>o", vim.v.count .. 'o<Esc>') does not work as expected. My intention for this ...
agshe's user avatar
  • 23
1 vote
1 answer
86 views

Error wihle 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 ...
samuelnihoul's user avatar
1 vote
1 answer
39 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 ...
samuelnihoul's user avatar
0 votes
1 answer
11 views

What is the syntax to use character classes inside Vim regex bracket expression?

I did the following tests: code output notes :echo substitute("s s", '\v[^s]', "<&>", "g") s< >s space replaced. All fine :echo substitute("s s&...
KamilCuk's user avatar
  • 265
0 votes
0 answers
18 views

(nvim-treesitter) How to disable hyperlink highlighting in tree-sitter-markdown?

I installed tree-sitter-markdown in my nvim for editing the md files. However, it seems it highlights the links and hides the url part. This often annoys me when I edit url/paths. You can see it in ...
Garid's user avatar
  • 101
0 votes
0 answers
11 views

Preventing copilot suggestions when "normal" suggestions are present

Since my last update of my plugins, copilot now gets in a fight with CoC trying to complete. The result is that I can't use tab to select the first CoC suggestion, since it will apply the copilot ...
Davis Yoshida's user avatar
0 votes
0 answers
29 views

How do I disable truncating long external command outputs?

When I run an external/filter command in neovim, it "sometimes" truncates the output with three dots: "..." For example: :! tree /home │ │ │ │ │ ├── hi.pak.info │ │ │...
enthus1ast's user avatar
1 vote
0 answers
55 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 ...
Ari Sweedler's user avatar
1 vote
1 answer
73 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'...
nbari's user avatar
  • 121
-1 votes
0 answers
41 views

getcwd(-1,-1) doesn't return global working directory Neovim

I don't quite get it. According to the documentation of getcwd in Neovim : If both {winnr} and {tabnr} are -1 the global working directory is returned. The call getcwd(-1,-1) gives me ...
eyal karni's user avatar
  • 1,016
2 votes
1 answer
55 views

How to map Ctrl-Delete?

I am new to Neovim and its configuration. I would like to know, first of all, what is your opinion on maintaining the functionality that Ctrl-Delete has outside the editor. In my case, it deletes the ...
Educpf's user avatar
  • 33
0 votes
0 answers
22 views

Error when using :Ex after :Lexplore

I am starting to use neovim and in the process of configuring the text editor. While doing some test I found that every time I try to open a file using the :Ex command I get the error: Error detected ...
Educpf's user avatar
  • 33
0 votes
0 answers
26 views

Debugging a program that requires escalated privileges

I have written a program in C that needs to access /dev/input/eventX programmatically. Running it as sudo ./a.out works well, but I am not sure how to debug it (using nvim-dap & cpptools). Here is ...
ElijaRock's user avatar
1 vote
1 answer
51 views

jump to definition goes to import statement rather than actual file defintion

Here is my nvim setup: local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) local lspconfig = require('lspconfig') local servers = { '...
abbood's user avatar
  • 633
0 votes
0 answers
31 views

How to change the terminal that launches Neovim?

When I double click a text file, the file is opened with Neovim in an xfce4-terminal. How to change xfce4-terminal to kitty? I tried to uninstall xfce4-terminal and then ln -s /usr/bin/kitty /usr/...
aj3423's user avatar
  • 199
0 votes
0 answers
17 views

How to detect whether current cursor position is code-block in markdown file from lua function?

Target: Trying to write lua function that will return true if current cursor position in code-block in markdown, false if not. Current Status: I have following code, that (based on tree-sitter) ...
Garid's user avatar
  • 101
0 votes
0 answers
26 views

Neovim does not highlight syntax unless I'm logged in as root

My config file for Neovim under ~/.config/nvim/init.vim looks like this :set ignorecase :set smartcase :set nu :let $VIMRUNTIME="/usr/share/nvim/runtime" :let $VIM="/usr/share/nvim&...
user2565010's user avatar
1 vote
0 answers
72 views

How to disable a lsp server using a specific rule?

I'm on a vue project, and I installed both tsserver and volar, but both of them will be called up when I open a *.ts | *.js file. But for vue project I only want to use volar since both tsserver and ...
ogios's user avatar
  • 13
2 votes
0 answers
31 views

Why xdg-open won't launch mplayer when started from within Neovim?

I have my ubuntu 20.04 system set up so that xdg-open launches mplayer for .mp4 files. When I type xdg-open ~/video.mp4 in the shell in terminal, xdg-open launches mplayer and the video plays. But ...
Zoran Loncarevic's user avatar
2 votes
1 answer
72 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 ...
Andrew's user avatar
  • 21
1 vote
1 answer
33 views

Neovim paste without overwriting register w/ Lua

So I know with vimscript you could make paste not overwrite your register with this: vnoremap p pgvy And I've tried a few ways to get this to with with Lua such as: vim.api.nvim_set_keymap('n', 'p', '...
Zach B.'s user avatar
  • 113
1 vote
1 answer
45 views

Is there an autocmd event that triggers when a command becomes available?

I'm using nvim-lsp and pyright. That latter provides a command PyrightSetPythonPath to reset the path to the python interpreter. Since I can see no other way to perform the same task, I'd like to call ...
Futarimiti's user avatar

1
2 3 4 5
31