microsoft / microsoft/language-server-protocol

Add "Smart break line" feature to LSP

Open
#1,586 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request new request
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

Visual Studio (not Code) has a great feature called "Smart break line" for C#. When you have code like this:

void M($$)

... pressing Shift + Enter turns it into this:

void M()
{
    $$
}

($$ represents cursor position)
Such feature can come in handy in a large variety of languages, so I think it should be added to LSP.

Possible use cases:
C++:

void main($$)
void main()
{
    $$
}

Python:

def main($$)
def main():
    $$

Html case 1:

<div$$>
<div>
    $$
</div>

Html case 2:

<div id="someId$$">
<div id="someId">
    $$
</div>

SQl (postgres dialect):

CREATE TABLE "MyTable$$"
CREATE TABLE "MyTable"
(
    $$
)

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

The issue names no repository files, tests, or entry points. Start by identifying where this LSP feature would be specified, then compare the C++, Python, HTML, and PostgreSQL examples; done would require an agreed protocol change that supports the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, html, python, sql
Domain
api, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.