Skip to content

Add type definition for sumneko lua ls#175

Merged
flamendless merged 2 commits intoflamendless:masterfrom
ka-shifuka:master
Feb 5, 2026
Merged

Add type definition for sumneko lua ls#175
flamendless merged 2 commits intoflamendless:masterfrom
ka-shifuka:master

Conversation

@ka-shifuka
Copy link
Contributor

just fixing typo and add little bit of type in Slab.lua and init.lua

@flamendless
Copy link
Owner

Thanks for this! I'll checkout the branch and test it for now.

@flamendless
Copy link
Owner

@ka-shifuka I'm not a heavy user of Lua LSP so I might be wrong but it seems that to make it properly work with an editor, we need some .luarc.json file in the project, is that right? If so, can you add that as well?

@ka-shifuka
Copy link
Contributor Author

I think no because the SlabDefinition.lua is in the project inside the slab folder, so we dont need to using .luarc.json.

Screenshot_20260205-181404

@flamendless
Copy link
Owner

flamendless commented Feb 5, 2026

Hmm it doesn't work out of the box for me. May I see your editor config for the lua lsp? This is what my neovim shows

image

@ka-shifuka
Copy link
Contributor Author

ka-shifuka commented Feb 5, 2026

Screenshot_20260205-183701

This is my config for sumneko kua (lua-language-server) i use coc-nvim with external lua-language-server bin so the executable for the lsp is not from coc-nvim with :CocInstall command but i just download it with apt install lua-language-server. is that inside Slab itself? in SlabTest.lua in that case you sould put ---@type Slab above local Slab = require(SLAB_PATH .."Slab") because lua lsp dont know the exact path of the Slab because in this case SLAB_PATH is uknown to the lsp.

@flamendless
Copy link
Owner

Hmmm I see the issue now. When in SlabTest.lua, it does not work but when in main.lua it works.

I'll merge this, thank you!

@flamendless flamendless merged commit da67777 into flamendless:master Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants