22,978 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
18
views
Error while configuring jdtls on neovim 0.12 without using any plugin
I am trying to run jdtls lsp on the latest nvim 0.12 with minimal setup without using any plugin for my nvim version:
NVIM v0.12.0-dev-5299967
Build type: Debug
LuaJIT 2.1.1764270282
However, when i ...
3
votes
1
answer
31
views
Object and entity colliding multiple times regardless of disabling cantouch property
I am creating a game about fighting other people in arenas, and when 2 people are in the arena, anyone that tries to enter becomes a spectator, for some reason, the part you touch to enter the arena ...
Best practices
0
votes
7
replies
104
views
In lua, is there a way to "force" an argument to its multiple values
Let tableA = {"a","b","c"}.
print( table.unpack(tableA) ) will print : a b c - the multiples values of table.unpack(tableA) are displayed,
print( table.unpack(tableA) , &...
2
votes
0
answers
54
views
Neovim LuaSnip configuration problem, Lua snippets work correctly but JSON doesn't
I have an NvChad configuration for NeoVim, and I was trying to configure a LuaSnip plugin, but for some reason my Lua snippets are working correctly, but the json ones do not, and I want to figure out ...
4
votes
1
answer
103
views
How to evaluate arithmetic expression in pseudo‐SQL style (Lua 5.1)
In love2D I have a string that represents a mathematical expression, for example:
local expr1 = "[p35] div [p36]"
local expr2 = "((([p35]*100) div [p36]) mod 100)"
local params = {...
Advice
0
votes
3
replies
77
views
String manipulation: extract words under brackets
I'm not yet very familiar with the patterns in Lua's string.gsub function.
If I have a string like this:
Fishing Lure(+100 Fishing Skill)(1 hour)
and I want extract only the string "1 hour"...
-4
votes
2
answers
111
views
Question regarding using : and [] together, Lua
Take the following block of code
function pickrand()
local v = math.random(1,3)
if v==1 then return ‘px' elseif v==2 then return ‘py' elseif v==3 then return 'pb' end
end
prin = {
x = ...
Best practices
0
votes
0
replies
43
views
Lua: install via rockspec a github project, no realease, no version
I'd like to install with rockspec lua-ext but I'm not sure what is the cleanest way to do it via rockspec:
it has no release and luarocks install --local https://github.com/thenumbernine/lua-ext does ...
1
vote
1
answer
61
views
How can I use `chansend()` to update a terminal buffer asynchronously in Neovim?
I have a callback/generator which produces output, possibly after a delay. I'd like to send these outputs to the terminal buffer as they're produced. Here's a mockup:
local term_buf = vim.api....
3
votes
0
answers
66
views
Run multiple test files from master file
I am building a test suite for my Lua application with Busted. I am organizing tests into different files that I would like to run in a given sequence, e.g. low-level unit tests first, up to ...
3
votes
1
answer
75
views
Explicit formatting of Format date/time regardless of operating system setting
As an an example:
print(os.date("%b"))
This prints "Oct" when running on a computer having date time settings set to English.
When using other language it prints "okt" (...
5
votes
2
answers
102
views
Is the condition "and true or false" redundant in Lua?
Inside a wiktionary module pages there is a function is_title() defined as:
function export.is_title(val)
if not (val and type(val) == "table") then
return false
end
...
1
vote
0
answers
47
views
Fluent Bit v4.1.1 – ${tag[1]} variable not set when dynamically naming OpenSearch index
Issue:
I’m using Fluent Bit v4.1.1 to send Docker container logs to OpenSearch.
I want to dynamically extract the project name (e.g., test-project) from the log file path /logs/test-project/... using ...
0
votes
0
answers
80
views
Running bash script with Lua and Tup causes file permission issues
I am running a legacy C++ build env with Tup, Lua5.4 on Debian13. When I run tup, under any user (also root) there are strange file permission issues. When I debug and do and "ls -l" the ...
1
vote
0
answers
72
views
How to rotate a model?
I have a code for rotating the turret model, but the mesh rotates, but the turret model also has a gun, but it either freezes regardless of the mesh rotation or simply does not rotate
local Players = ...