liquidev / lintplus

An improved linting plugin for the lite text editor.
59 stars 7 forks source link

.config/lite-xl/plugins/lintplus/liteipc.lua:89: attempt to use a closed file at /usr/share/lite-xl/core/init.lua:1365 #18

Closed KikyTokamuro closed 2 years ago

KikyTokamuro commented 2 years ago

Error when initializing linterplus. Tell me, maybe I'm doing something wrong.

Version: Lite XL 2.0.5-luajit

init.lua:

local lintplus = require "plugins.lintplus"
lintplus.setup.lint_on_doc_load()
lintplus.setup.lint_on_doc_save()

config.plugins.lintplus = true
config.plugins.lintplus_php = true

Folder structure:

.config/lite-xl/plugins/
       lintplus/
       lintplus_php.lua
liquidev commented 2 years ago

That's weird. I'm not sure what's happening there, the file shouldn't be closed prematurely like that.

liquidev commented 2 years ago

I'm aware that this is quite the hassle to do (and shouldn't be needed anymore because Lite XL has a subprocess library), but you might want to try building liteipc and enabling asynchronous mode. It's more tested as that's what I used to daily drive.

Unfortunately I might not be able to provide much more support, as I don't use Lite XL anymore.

liquidev commented 2 years ago

I just merged a Pull Request that removes the old IPC library in favor of using Lite XL's provided process API. Please try pulling latest commits from master and see if it works now.

KikyTokamuro commented 2 years ago

I just merged a Pull Request that removes the old IPC library in favor of using Lite XL's provided process API. Please try pulling latest commits from master and see if it works now.

Now, when saving, it gives the following error:

[Fri Feb 18 13:17:44 2022] lint+/php: index.php: linter exited with signal -110 : Connection timed out at .config/lite-xl/plugins/lintplus/init.lua:229

jgmdev commented 2 years ago

Can't reproduce, but make sure you are using latest changes from this repo and the cli version of PHP is the one been exported in your PATH

~ php -v
PHP 8.1.5 (cli) (built: Apr 14 2022 00:36:46) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.5, Copyright (c), by Zend Technologies

Closing this since it should work now unless you have something not properly setup.