mattn / mattn/efm-langserver

Registering methods through scripts/plugins

Open
#313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.6k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Hello. Congrats for this awesome project.

Recently I was thinking about doing very specific things using an LSP; Such as word suggestions; Citations suggestions and other features which are not necessarily error checks or obvious fixes.

I know there are specific smalls LSPs which do that. But i would like to have some LSP which could be extended/customizable, such as efm-langserver.

The problem with efm-langserver is it can only register commands for the internal implementation of existing method. You cannot add methods or have new definitions. I cannot post some data besides code to the server, like a prompt, use that to make a request to some server like an inference server, do more processing and send diagnostics back to client.

That is limited, sometimes i want a result which goes beyond getting structured stdout from tool and showing it, like processing and doing something. Sometimes a tool which does what i want does not exist, if this tool manages to process, it would still need to send data back to efm-langserver somehow. There is also the problem emf does not expose variables variables with data which came from the lsp client request payload, only for format-command from what i can see, even though there are also other LSP methods with a lot of fields on the request payload, like completion, hover etc.

So i do not know if you plan to implement that, but there are those challenges.

Last resort would be writting an LSP server.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing efm-langserver's existing script/plugin registration and the handling of LSP request payloads. Compare the current format-command variable support with completion and hover, then clarify the desired extension and data-flow contract before implementation. Done would require an agreed design and tests for registering custom methods and returning processed results.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend-api-design, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.