Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2024, 09:11 PM   #1
Maimun Ahmed
Mr. Developer
Maimun Ahmed began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Feb 2024
Device: Kindle Voyage
Question 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 09:16 PM.
Maimun Ahmed is offline   Reply With Quote
Old 04-04-2024, 06:39 AM   #2
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,289
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)
pazos is offline   Reply With Quote
Advert
Old 04-08-2024, 01:40 PM   #3
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,633
Karma: 724945
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)
Frenzie is offline   Reply With Quote
Old 04-15-2024, 07:48 AM   #4
jospalau
Groupie
jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.jospalau ought to be getting tired of karma fortunes by now.
 
Posts: 181
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.
jospalau is offline   Reply With Quote
Reply

Tags
developement, koreader, lua, vscode

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 06:46 AM
Hacks Complete Idiot's guide to Kindle3 Aires Amazon Kindle 2 02-25-2011 08:26 PM
Get-the-complete-android-guide-ebook-for-only-99 Eddy R enTourage Archive 1 11-30-2010 04:58 PM
Complete Hitchhiker's Guide Series $10 or less koland Deals and Resources (No Self-Promotion or Affiliate Links) 46 10-01-2010 11:10 AM
Kindle Formatting: The Complete Guide wallcraft Amazon Kindle 39 11-30-2009 06:47 PM


All times are GMT -4. The time now is 01:20 PM.


MobileRead.com is a privately owned, operated and funded community.