Questions tagged [vimscript-lua]

Lua programming interface to Vim. DO NOT use for questions with Lua examples or about syntax highlighting in Lua.

Filter by
Sorted by
Tagged with
0
votes
0answers
56 views

Autoloaded vs lua functions: which is faster/more efficient?

I'm creating a neovim plugin written in Lua, and I have to react to the BufAdd and BufUnload events with a function call. I have 3 options: write the function in Lua (like the rest of the plugin) and ...
0
votes
0answers
22 views

Cannot search for pairs with searchpairpos()

I am trying to search for the location of the start and the end of a pair with searchpairpos(). Given an example like this: *hel[]lo* And my code like this: local start_match = vim.api....
0
votes
2answers
277 views

How to modify only the background colour of a colourscheme in neovim using lua

I am slowly switching my neovim configurations to Lua. I am currently using the colour scheme https://github.com/nightsense/snow. It sets the background colour to a light-grey, while I want it to be a ...
0
votes
1answer
414 views

How to get the filetype in lua in nvim

How to get the current file type in lua with neovim? I tried following but all of them returns nil. print(vim.g.filetype) print(vim.b.filetype) print(vim.w.filetype) print(vim.t.filetype) print(vim.v....
1
vote
1answer
1k views

Most efficient way to call a Vim script function with lua (Neovim)

What is the most efficient way to call a Neovim function using Lua. I am able to call the sign_define Vim script function using the nvim_command procedure. I struggle with calling it with the ...
2
votes
1answer
959 views

Neovim Lua integration

I'm trying to understand how can I use Lua to extend Neovim, following a baby steps approach. Something like: -- ~/.config/nvim/lua/test.lua local api = vim.api local firstmodule = {} function ...
0
votes
0answers
387 views

Adding directories to Lua’s search path

I’m trying to run Fennel scripts in Vim 8.1 using the fennel-nvim plugin. (Fennel is a language that basically lets you write Lua with LISP syntax; you can use it from any Lua-supporting application ...
3
votes
2answers
2k views

How to use Lua in Vim?

I'm using MacVim snapshot 134 (on Mac OS X 10.9.5), which has support for Lua: $ vim --version | grep lua +dialog_con_gui +lua/dyn +rightleft +writebackup I've got Lua installed and ...
5
votes
1answer
2k views

Is it possible to write .nvimrc for NeoVim in Lua?

Is it possible to write .nvimrc for NeoVim in Lua? Is it planned for the future?