Comments (12)
Yeah, but it needs at least a check to see if the plugin is fully disabled (config.plugins.trimwhitespace = false
).
from lite-xl-lsp.
For the record, this does also happen with the default pylsp
config.
from lite-xl-lsp.
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.
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.
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.
Try replacing this line
Line 1926 in 9f7ff82
with just
trimTrailingWhitespace = true
.from lite-xl-lsp.
That fixes it! Thanks.
from lite-xl-lsp.
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.
I'm not even sure what that does 😅 so I think I'd leave it up to you.
from lite-xl-lsp.
But if it is just whether whitespace should be trimmed, it should probably follow the plugin.
from lite-xl-lsp.
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.
config.plugins.trimwhitespace.enabled
does seem to work, that is probably what was intended there.
from lite-xl-lsp.
Related Issues (20)
- No feedback when definition doesn't exist. HOT 2
- Rendering issues for inline diagnostics HOT 7
- Julia support HOT 3
- [Bug] Error windows cover right click context menu with no way to make the context menu visible again.
- [Bug] Autocomplete insertions randomly happen twice
- [Bug] Autocomplete insertions don't work for multiple cursors
- [BUG] Cannot see LSP Tooltip because warning/error tooltip covers it.
- [BUG] LSP Sees completely different input than what's being shown in the editor. HOT 1
- check is always failing HOT 8
- Applying autocomplete can lead to extra chars
- feature: labelDetails support
- [Bug] High CPU usage when moving mouse around HOT 9
- [Bug] High CPU usage after closing file, with "stop_unneeded_servers" set to "true" HOT 9
- [Error] Attempted to index a nil value (field 'proc') HOT 22
- [Bug] Wrong line number gets sent to the LSP server, resulting in errors HOT 16
- Click to Goto Definition? HOT 2
- Autocomplete entries need to be truncated HOT 1
- allow overriding PATH HOT 3
- [Request] Easier configuring LSP server after initialization HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lite-xl-lsp.