Better HN
topnewbestaskshowjobs
Log inSign up

Yakei

6 karma · joined Sep 4, 2022 (4y ago) · 3 submissions

Submissions

comment 4y ago · link · parent

hello, lapce contributor here. This is definitely not an expected behavior. Would you mind opening an issue about it?

comment 4y ago · link · parent

> I worry about the plugin system though. It is using WASI for plugins, so people can use any programming language they want. That seems like it could lead to a horribly fragmented ecosystem. It also means plugins are limited to accessing only the system resources exposed by the WASI runtime, which may make sense for security in, say, a web browser, but for an extensible editor it just feels like an unnecessary obstacle.

Contributor here, mainly on the plugin system. The main reason for using wasi is to have a single runtime to run any plugins on any os. As you mentioned, plugin makers can write their plugins on their favourite languages ( although as of right now no library or wrapper has been done for other languages ), and the end user doesn't have to care. As for the sandboxing part, the only real sandboxing done as of right now is allowing the plugin to only access its own folder.

One of the main features of this release is the new plugin system, which we call PSP. It's designed as a superset of LSP, and extended to the scope of an editor. As PSP is the mandatory way to interact with Lapce for plugins, you could run any kind of binary instead of WASI and it would still work (in fact, there have been talks about allowing user to run binaries as an alternative for WASI based plugins)

comment 4y ago · link · parent

Lapce does not support only three languages. It uses LSP, which means any language with an LSP server should work out of the box. Some work has been done regarding that on this release ( mainly making sure we respect the specification more), leading to making the Julia LSP works. Other LSP already tried and working are : C/CPP, Rust, Go, Python, and if I recall correctly JavaScript too. The only matter to take care of is to write a plugin to start the LSP server, which can be done in around 30 lines of Rust :)