GithubHelp home page GithubHelp logo

Comments (12)

Guldoman avatar Guldoman commented on August 13, 2024 1

Yeah, but it needs at least a check to see if the plugin is fully disabled (config.plugins.trimwhitespace = false).

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024

For the record, this does also happen with the default pylsp config.

from lite-xl-lsp.

Guldoman avatar Guldoman commented on August 13, 2024

invalid table: mixed or invalid key types

Oh this is interesting. Could you get a log with verbose = true in the server config?

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024
Sat Jan 27 18:14:02 2024 [INFO] [LSP/pylsp]: Adding request textDocument/formatting
 at /var/home/kramo/.config/lite-xl/plugins/lsp/init.lua:761
Sat Jan 27 18:14:02 2024 [ERROR] /var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:87: invalid table: mixed or invalid key types at /var/home/kramo/.local/share/lite-xl/core/init.lua:1227

stack traceback:
[C]: in function 'error'
/var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:87: in function </var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:73>
(...tail calls...)
/var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:111: in function </var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:73>
(...tail calls...)
/var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:111: in function </var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:73>
(...tail calls...)
/var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:111: in function </var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:73>
(...tail calls...)
/var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:111: in function </var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:73>
(...tail calls...)
/var/home/kramo/.config/lite-xl/plugins/lsp/json.lua:163: in function 'plugins.lsp.json.encode'
/var/home/kramo/.config/lite-xl/plugins/lsp/server.lua:648: in function 'plugins.lsp.server.process_requests'
/var/home/kramo/.config/lite-xl/plugins/lsp/init.lua:2073: in function </var/home/kramo/.config/lite-xl/plugins/lsp/init.lua:2048>
[C]: in function 'xpcall'
/var/home/kramo/.local/share/lite-xl/core/init.lua:1226: in function 'core.try'
(...tail calls...)

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024

Oh wait, I totally just posted the same logs. Yeah, it doesn't seem to give me anything else even if verbose is set to true.

from lite-xl-lsp.

Guldoman avatar Guldoman commented on August 13, 2024

Try replacing this line

trimTrailingWhitespace = config.plugins.trimwhitespace or true,

with just trimTrailingWhitespace = true.

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024

That fixes it! Thanks.

from lite-xl-lsp.

Guldoman avatar Guldoman commented on August 13, 2024

If you want to, feel free to PR that. Otherwise I'll PR it when I can.

Do you think this should be configurable?

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024

I'm not even sure what that does 😅 so I think I'd leave it up to you.

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024

But if it is just whether whitespace should be trimmed, it should probably follow the plugin.

from lite-xl-lsp.

Guldoman avatar Guldoman commented on August 13, 2024

I think I'd leave it up to you.

Sure, no worries.

But if it is just whether whitespace should be trimmed, it should probably follow the plugin.

Yeah, basically that.
I guess I'll make it do that then, and maybe allow for an override (for example I don't use that plugin, but I would like for whitespace trimming on format).

from lite-xl-lsp.

kra-mo avatar kra-mo commented on August 13, 2024

config.plugins.trimwhitespace.enabled does seem to work, that is probably what was intended there.

from lite-xl-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.