microsoft / microsoft/language-server-protocol

Feature request: automatic matching pairs

Open
#672 6 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

Most languages have a common set of matching pairs that can be filled in by the editor automatically (e.g., ( & ), " & ") but most languages have additional matching pairs and some even have quirks.

This seems like something well suited to language servers.

Some examples:

# Ruby
# Example pair: "if" "end" on different lines
if thing_is_true
  do_something
end
" viml (AKA VimScript)
" comments are double quotes.
" but in other cases are pairs.
" another example: "function" "endfunction" on different lines
function thing(value)
  echon "string" a:value
endif
// Javascript
// example: "{" "}" on different lines (surrounding blocks)
(value) -> {
  // expect a newline here
}
# Python doesn't have many end markers
if thing
  something()

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

Issue 672 names no files, tests, or entry points. Start by clarifying the proposed protocol capability and how language-specific matching pairs would be represented; done would require an agreed, implementable specification.

Written by the indexing model from the issue text.

Assessment

Domain
api, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.