-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight and surround a word with angled brackets in languages typescript
and tsx
#8636
Comments
This comment contains the source links, but it is already a language-dependent feature. You can open a markdown file right now and press |
@Moshyfawn that’s a great feature! I noticed it worked in |
Hi @jlarmstrongiv. I dug into this. This appears to be controlled by the
Currently this setting controls two behaviors:
This means if we enable the behavior we're looking for (great!) we also get autoclosing I'll leave this open as an enhancement request. In the future we may to support enabling the second behavior without the first, but at the moment that's where we're at. You can see this behavior by building from source with the following diff: diff --git a/crates/languages/src/typescript/config.toml b/crates/languages/src/typescript/config.toml
index ca115622c..2fdc007ec 100644
--- a/crates/languages/src/typescript/config.toml
+++ b/crates/languages/src/typescript/config.toml
@@ -7,7 +7,7 @@ brackets = [
{ start = "{", end = "}", close = true, newline = true },
{ start = "[", end = "]", close = true, newline = true },
{ start = "(", end = ")", close = true, newline = true },
- { start = "<", end = ">", close = false, newline = true, not_in = ["string", "comment"] },
+ { start = "<", end = ">", close = true, newline = true, not_in = ["string", "comment"] },
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
{ start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] }, |
@notpeter is this behavior still the case or has it been updated now? For example, in the markdown config we have some set to false: brackets = [
{ start = "{", end = "}", close = true, newline = true },
{ start = "[", end = "]", close = true, newline = true },
{ start = "(", end = ")", close = true, newline = true },
{ start = "<", end = ">", close = true, newline = true },
{ start = "\"", end = "\"", close = false, newline = false },
{ start = "'", end = "'", close = false, newline = false },
{ start = "`", end = "`", close = false, newline = false },
] But when I try highlight and surround every one of these characters I always get the surround behavior. I can't actually find any PRs that change this though... Version:
|
Check for existing issues
Describe the feature
I would like to highlight a word and press
<
to surround it with angled brackets, similar to how you can highlight a word and surround it with braces by pressing{
.TypeScript makes heavy use of
Type<Generic>
, so having that autocomplete would be niceThese settings are defined in:
And may be a relatively simple change
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: