04-03-2024, 10:11 PM | #1 |
Mr. Developer
Posts: 24
Karma: 10
Join Date: Feb 2024
Device: Kindle Voyage
|
Complete Guide on Setting up VSCode for Lua and KOReader
Hi there, I am here with another issue.
I am currently working on a plugin for KOReader for which I require to clone KOReader into my Linux computer (specifically ubuntu on VM). For that, I require to install lua and some other cool features like hyperlinking (clicking on the path inside the require function takes me to that code file in that path) and auto suggestions (like suggestions of the code imported from another directory within koreader), etc (much like setting up a javascript framework like next.js). My current IDE is VSCode. Hope so you guys can understand and help. I have been using next.js for a very long time and it would be very great if I could set up a similar development experience for lua as well. PS: I currently have lua installed in my computer and VSCode running but I have to work without any suggestions. There were not enough tutorials available on YouTube for ubuntu as well. Last edited by Maimun Ahmed; 04-03-2024 at 10:16 PM. |
04-04-2024, 07:39 AM | #2 |
cosiñeiro
Posts: 1,331
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Not very familiar with vscode, but it seems all you need is a client that talks LSP, such as https://github.com/LuaLS/lua-language-server and all the "go to definition" et al functions should work out of the box with any competent editor.
Also, you'll want editorconfig because the coding style differs from most lua codebases (ie: identation at 4 spaces) |
Advert | |
|
04-08-2024, 02:40 PM | #3 |
Wizard
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
I think if you open a Lua file VS Code will prompt you to install a variety of Lua support extensions, after which basic linting, go to and code completion should just work.
You'll still have to follow some of the steps in https://github.com/koreader/koreader...-and-derivates though (provided you want to compile and not just edit) |
04-15-2024, 08:48 AM | #4 |
Groupie
Posts: 195
Karma: 1074916
Join Date: Jan 2021
Device: Likebook Ares
|
There are several extensions.
To debug you can use the Local Lua Debugger. It works really good. |
Tags |
developement, koreader, lua, vscode |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to freelance on Upwork: Complete guide | UpworkGuide | Self-Promotions by Authors and Publishers | 0 | 07-04-2019 07:46 AM |
Hacks Complete Idiot's guide to Kindle3 | Aires | Amazon Kindle | 2 | 02-25-2011 09:26 PM |
Get-the-complete-android-guide-ebook-for-only-99 | Eddy R | enTourage Archive | 1 | 11-30-2010 05:58 PM |
Complete Hitchhiker's Guide Series $10 or less | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 46 | 10-01-2010 12:10 PM |
Kindle Formatting: The Complete Guide | wallcraft | Amazon Kindle | 39 | 11-30-2009 07:47 PM |