Replies: 2 comments
-
Language-specific code like this would fit as a plugin but would not belong in the core helix codebase. Alternatively you might be able to create a language server that acts as a middle-man between the client and the python language server and performs this translation, or create a sage language server implementation by re-using parts of the python language server codebase (though that might be a lot of work). If the python language server works well enough, it could be added as the default language server for the sage language configuration for now. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer. I will appreciate any suggestion on how to get started :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I started adding language support for sagemath: #5649
Since sagemath is based on python, the python LSP should work with some minor modifications.
.sage
, we should addat the top of the file before sending the file to the LSP. For example, given the following
example.sage
:using
gd
onNumberField
should bring you to the source file where NumberField is defined (you need to install sage for this). This works perfectly with the python LSP if I add the mentioned import line at the top of the file.is equivalent to the previous one. I think that it could be possible to convert it to the python style before sending it to the python LSP.
I think that (1) will be easier to implement than (2).
Beta Was this translation helpful? Give feedback.
All reactions