orbitalquark / textadept-lsp

Language server protocol client module for Textadept.
MIT License
28 stars 9 forks source link

Module not loading (module 'lsp.dkjson' not found:) #16

Open sailingbonbini opened 6 months ago

sailingbonbini commented 6 months ago

After installing textadept-lsp in a fresh version of TextAdept and requiring it in my init.lua, the editor fails to load the required "lsp.dkjson" module. I couldn't find anything in textadept-lsp's documentation about how to install this module so it's loaded when textadept-lsp loads.

Steps to reproduce:

mkdir ~/.textadept/modules
mkdir ~/.textadept/modules/lsp
git clone https://github.com/orbitalquark/textadept-lsp
cd textadept-lsp
cp *.lua ~/.textadept/modules/lsp
/Applications/Textadept.app/Contents/MacOS/textadept-curses

The launch of textadept-curses ends up printing the following error in a temporary buffer:

/Users/tom/.textadept/modules/lsp/init.lua:3: module 'lsp.dkjson' not found:
   2    no field package.preload['lsp.dkjson']
   3    no file '/Users/tom/.textadept/modules/lsp/dkjson.lua'
   4    no file '/Users/tom/.textadept/modules/lsp/dkjson/init.lua'
   5    no file '/Applications/Textadept.app/Contents/Resources/modules/lsp/dkjson.lua'
   6    no file '/Applications/Textadept.app/Contents/Resources/modules/lsp/dkjson/init.lua'
   7    no file '/Applications/Textadept.app/Contents/Resources/core/lsp/dkjson.lua'
   8    no file '/usr/share/lua/5.4/lsp/dkjson.lua'
   9    no file '/usr/share/lua/5.4/lsp/dkjson/init.lua'
  10    no file '/usr/lib/lua/5.4/lsp/dkjson.lua'
  11    no file '/usr/lib/lua/5.4/lsp/dkjson/init.lua'
  12    no file ''
  13    no file '/Users/tom/.textadept/modules/lsp/dkjson.so'
  14    no file '/Applications/Textadept.app/Contents/Resources/modules/lsp/dkjson.so'
orbitalquark commented 6 months ago

If you download a release zip from the Textadept project or from https://github.com/orbitalquark/textadept-lsp/releases/tag/latest, it will have everything you need. If you are downloading a source archive from this project, you'll need to run CMake to fetch all the dependencies: https://github.com/orbitalquark/textadept-lsp/blob/5561287b22a720bb56f975fe2704effc0e71a114/.github/workflows/release.yml#L16-L18