Skip to content

Feature request: automatic matching pairs #672

@docwhat

Description

@docwhat

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions