Skip to content

Version v0.1 #1

@olegklimov

Description

@olegklimov

Following https://github.com/smallcloudai/refact-vs-classic/ , we need a first version of a plugin for Sublime Text that starts refact-lsp server, has completion, status bar, settings, and that's about it.

Completion should behave generally like in VS Code, more details about multiline and single line completion are here in a VS Classic issue and here is some more.

Clarification: this has nothing to do with completions that go inside a popup. Here we are only interested in inline completions (multiline or single line), also known as "grey text" or "ghost text".

Refact-LSP is an executable file that gets built here, download one for your platform, run it with --help to see what kind of options it accepts.

The relevant LSP part is textDocument/didOpen, textDocument/didChange, textDocument/didClose, workspace/didDeleteFiles -- to inform the LSP server about the source files open or changed. This is used for context, for a good completion for file1 probably it needs a context from file2. That's why refact-lsp needs those calls to happen.

The completion itself is a LSP call refact/getCompletions, but there's an effort to switch to a more standard 3.18.

Status bar like in this VS issue needs an idle state, rotating icon when it asks for a new completion, and an error state that shows text error in a tooltip.

Settings can be similar to VS Code settings, those are mainly go directly to refact-lsp command line. One that doesn't is "pause", it should be accessible via a context menu in the status bar or a hotkey -- an ability to pause completions if they get annoying in some cases.

This bounty supersedes the previous attempt over here that got stalled.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions