Open xylix opened 10 months ago
The documentation for this is currently still in progress and not yet fully accessible to the public. I mainly make the language server for VSCode. I have sporadically tried the robotcode language-server with other editors (Eclipse, Kate, sublime), but with mixed results, as many implementations of the LSP clients are incomplete, buggy or outdated. However, I have never really had the time to deal with it.
But normally you have to set some configuration for your language server in your editor, i.e. how it should be started, for which files and which settings it should be given and so on. Did you try that?
According to the protocol definition, the clients should at least support communication via STDIN. That is why the robotcode language-server starts by default via STDIN. But there are other suggested ways such as TCP/Socket etc.
You can simply install the language server via:
pip install "robotcode[languageserver]"
with
pip install "robotcode[all]"
you can install all the tools provided by robotcode, including the runner, debugger etc.
and then you can display the help with robotcode --help
. You get the subcommands displayed and with robotcode command --help
you can display the help for a subcommand.
So for the language-server help you write
robotcode language-server --help
on https://robotcode.io/0.62/cli/reference/ you will also find a web version of the help.
Which editor would you like to use?
I've played around a bit with neovim and nvim-lspconfig and have created a working configuration file. Maybe you're interested?
I have seen CLI magic independent of VSCode with RobotCode recently. I'll check the state of documentation.
Im running latest real vim with https://github.com/natebosch/vim-lsc and robotcode just fine with default configs. Only thing needed after installation was to set two config options and default behaviour works just fine:
let g:lsc_server_commands = {'python': 'pylsp', 'robot': 'robotcode language-server'}
let g:lsc_auto_map = v:true
Is your enhancement request related to a problem? Please describe. I would like to be able to run the LSP through the CLI. This would enable easy use of the LSP for editors that don't natively use VS Code plugins like Vim with LSP support. (Or other editors that have LSP support like Emacs or Jakoune).
Describe the solution you'd like I saw the project has packages at PyPi like https://pypi.org/project/robotcode/#description, but I'd like instructions on which packages to install and how to run them from CLI. (Presumably many of the robotcode packages are needed and then you can run
robotcode language-server
with some options? Without options it seemed to open stdin/stdout mode but I couldn't get it to work with my editor.)