orbitalquark / textadept-lsp

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

module 'lsp.dkjson' not found #6

Closed mhwombat closed 2 years ago

mhwombat commented 2 years ago

I'm running textadept 11.3 on NixOS.

  1. I copied the repo to $XDG_CONFIG_HOME/textadept/modules/lsp.
  2. I ran textadept -u $XDG_CONFIG_HOME/textadept.
  3. I got the error below.

I'm not familiar with lua, but I figured I needed to install the module dkjson. The packages available to me were lua53Packages.dkjson, lua52Packages.dkjson, lua51Packages.dkjson and luajitPackages.dkjson. I installed lua53Packages.dkjson, but I'm getting the same error. Looks like you're using lua 5.4, so maybe that's the problem. But I'm not sure I'm even on the right track, because textadept is looking for lsp.dkjson. And there's no mention in the README of any prerequisites for the lsp module.

Message buffer:

lua: /home/amy/.config/textadept/modules/lsp/init.lua:3: module 'lsp.dkjson' not found:
    no field package.preload['lsp.dkjson']
    no file '/home/amy/.config/textadept/modules/lsp/dkjson.lua'
    no file '/home/amy/.config/textadept/modules/lsp/dkjson/init.lua'
    no file '/nix/store/0i30dwn8vw8cjh9nv4469ddslgl924xn-textadept-11.3/share/textadept/modules/lsp/dkjson.lua'
    no file '/nix/store/0i30dwn8vw8cjh9nv4469ddslgl924xn-textadept-11.3/share/textadept/modules/lsp/dkjson/init.lua'
    no file '/nix/store/0i30dwn8vw8cjh9nv4469ddslgl924xn-textadept-11.3/share/textadept/core/lsp/dkjson.lua'
    no file '/usr/share/lua/5.4/lsp/dkjson.lua'
    no file '/usr/share/lua/5.4/lsp/dkjson/init.lua'
    no file '/usr/lib/lua/5.4/lsp/dkjson.lua'
    no file '/usr/lib/lua/5.4/lsp/dkjson/init.lua'
    no file ''
    no file '/home/amy/.config/textadept/modules/lsp/dkjson.so'
    no file '/nix/store/0i30dwn8vw8cjh9nv4469ddslgl924xn-textadept-11.3/share/textadept/modules/lsp/dkjson.so'
    no file '/usr/lib/lua/5.4/lsp/dkjson.so'
    no file '/usr/lib/lua/5.4/loadall.so'
    no file ''
    no file '/home/amy/.config/textadept/modules/lsp.so'
    no file '/nix/store/0i30dwn8vw8cjh9nv4469ddslgl924xn-textadept-11.3/share/textadept/modules/lsp.so'
    no file '/usr/lib/lua/5.4/lsp.so'
    no file '/usr/lib/lua/5.4/loadall.so'
    no file ''
orbitalquark commented 2 years ago

If you did not download a packaged release, then you'll need to run make deps inside the module to fetch dkjson.lua. The packaged zip is a snapshot of the latest revision plus dependencies.