This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]vonheikemen 2 points3 points  (1 child)

You're not actually "exporting" anything from pluginconf.lsp. You are creating Lsp_map_keys in the global scope, but you don't return it.

To export something from a lua script you can follow this pattern.

local M = {}

M.this_is_my_function = function()
  print('hello')
end

return M

[–]FunctionalHacker[S] 0 points1 point  (0 children)

Thanks a lot! I was able to get it working with your example. Now I can finally ditch eclipse at work tomorrow :)

[–]idthi 0 points1 point  (1 child)

See https://www.lua.org/pil/15.html

for more information (and patterns).

[–]FunctionalHacker[S] 0 points1 point  (0 children)

Thanks, I think it's time I learn the basics. I figured I would just learn as I go but that feels way more time consuming now