lite-xl / lite-xl-lsp

LSP Plugin for Lite XL editor
MIT License
160 stars 21 forks source link

Improve `languageId` selection #113

Closed Guldoman closed 6 months ago

Guldoman commented 7 months ago

[WIP]

The language config entry can now be either a string which will be used in every case, or an array.

In the array case, it's expected that each entry is a table with id and pattern properties. The id represents the languageId to be used in the case the pattern matches with the file path. Each entry is tested in order, and the first match is used. If no match is found, the extension is used as languageId.

TODO:

PerilousBooklet commented 7 months ago

Status

PerilousBooklet commented 7 months ago

The check means that the LSP server still works. And some of those "errors" are probably not related to this PR. I need to verify.

Guldoman commented 7 months ago

Yeah, you can remove the ones that are just the server using stderr as a logging output.

Guldoman commented 7 months ago

@PerilousBooklet could you test with the latest changes?

PerilousBooklet commented 7 months ago

Right away.