Questions tagged [lua]
Questions about the Lua bindings in Neovim
223 questions
0
votes
0
answers
23
views
How to remove carriage return at EOL from snippets provided by LSP for dart?
I am using Windows 11 Pro with Neovim v0.11.3, with the distro called Lazyvim.
I setup dartls language server using the code
vim.lsp.enable("dartls")
Which would provide with me the ...
2
votes
2
answers
228
views
When Lua throws an error and displays a traceback, can I jump to the file shown in the traceback?
Sometimes Lua code running inside Neovim throws an exception. When this happens, a traceback is displayed in :messages. Is it possible to extract the file path and line number from these tracebacks ...
0
votes
2
answers
167
views
Why yanking into system clipboard ("+) overwrites default nvim clipboard?
yy yanks a line into a default Neovim clipboard, let's call it "
<leader>yy yanks a line into a system clipboard - "+
... but for some reason " clipboard is also overwritten by &...
0
votes
0
answers
81
views
How to properly map <C-u> and <C-d> to have similar definitions (respecting 'scroll') while ignoring wrapped lines with Lua in Neovim?
Using Neovim (currently on v0.11.2 with kickstart.nvim) I personally use line wrapping most of the time when editing text, and I navigate between distant lines, with the help of 'relativenumber', ...
3
votes
2
answers
2k
views
Correct way to utilize on_attach in the new vim.lsp.config setup in Neovim v0.11
I am looking at trying to utilize the new vim.lsp.config features both in core Neovim v0.11 as well as the latest updates to nvim-lspconfig. I am curious what the proper/intended way of setting up my ...
1
vote
1
answer
48
views
Difference between Neovim command line options -l and -ll
I am using Neovim 0.11.0 on Windows and on Linux.
I want to use Neovim as a lua interpreter. Furthermore I want to write lua scripts like nodejs scripts, i.e. I want to schedule things on the event ...
1
vote
2
answers
81
views
Test in lua config if a Python package is installed
How can I test in a lua Neovim config, whether a specific Python package is installed or not?
Context: I'm using python-lsp-server.
Some projects use ruff for linting (via the python-lsp-ruff plugin) ...
1
vote
1
answer
196
views
LazyVim: set keybinding for quotes in vimtex
This question flows from LaTeX plugin for editing in nvim where the question is what was recommended when we want to write "word" and then the environment would automatically convert it to ...
0
votes
1
answer
142
views
sharper divisions between splits in lualine
How can I visually sharpen the dividing line between splits in lualine? Vertical splits (which sit side by side) are clearly divided by a thin, high-contrast line, but horizontal splits (one on top of ...
0
votes
0
answers
104
views
Switching dianostic severity in neovim (using lsp and lsp-config)
I want to have some commands that switch between different diagnostics severities.
vim.api.nvim_create_user_command("DiagWarn", function()
vim.diagnostic.config({ severity = { min = vim....
0
votes
1
answer
45
views
Automatically folding regions of tikzpicture in tex files in init.lua
Trying to automatically fold blocks in my tex file that look like
\begin{center}
\begin{tikzpicture}[scale=0.2]
\tikzstyle{every node}+=[inner sep=0pt]
\draw [black] (23.5,-26) circle (3);
\draw [...
0
votes
1
answer
145
views
Nvim Lua plugins that use lua/pluginName instead of just a lua folder cannot call setup function
Hello I am new to both Neovim and Lua, I am trying to set up a configuration using the Lazy.nvim package manager and cannot get either the nanozuki/tabby.nvim or tris203/hawtkeys plugins working. Lazy ...
0
votes
0
answers
129
views
How to apply ':silent' to a lua print function
Because nvim's lua engine has no builtin debugger (a big drawback compared with vimscript IMO), I'm looking for an easy (and hopefully idiomatic) way to add debug print statements to lua plugins. To ...
1
vote
1
answer
198
views
How can I start in Insert mode on first empty line from mutt?
I am trying to get mutt to open Neovim in Insert mode and have my cursor at the first empty line (basically after the headers).
I tried to modify the following :
NeoVim - Go into insert mode when ...
1
vote
1
answer
248
views
map save keys in insert mode and continue in insert mode in lua (nvim); also disable key sequence in command mode
I am new to lua/nvim and would like to set a keybinding that will do two things:
1a map <C-s> or <C-x><C-s> to <Esc>-:w-Insert and then continue in insert mode.
1b Not save ...