microsoft / microsoft/language-server-protocol

support smart indentation in LSP

Open
#1,326 9 comments 3 reactions 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

can smart indenting capability added to LSP? I know that there is a concern on perf, but if LS chooses to take that perf hit for better indentation on vertical cursor move or enter, I think LSP should allow LS to do so.

many complex indentation requires parse tree and can't be done using regex alone. so, it feels like it should be LS's decision to take the perf hit or not.

with smart cancellation, (no cancel if "enter" + key typed, but cancel previous smart indentation request if cursor moved vertically and etc), a lot of perf concern, I feel like, can be mitigated.

thank you.

ex)

method( { 1: 'apple', 
                  * align caret to "1" on "arrow down" 

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 files, tests, or entry points. Review the LSP specification and the existing nine-comment discussion first; the work is done only after the protocol shape, cancellation behavior, and performance trade-offs for smart indentation are agreed.

Written by the indexing model from the issue text.

Assessment

Domain
api, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.