editor: Improve JSDoc extend comment on newline to follow convention (#30800)
Follow up for https://github.com/zed-industries/zed/pull/30768 This PR makes JSDoc auto comment on new line lot better by: - Inserting delimiters regardless of whether previous delimiters have trailing spaces or not - When on start tag, auto-indenting both prefix and end tag upon new line This makes it correct as per convention out of the box. No need to manually adjust spaces on every new line. https://github.com/user-attachments/assets/81b8e05a-fe8a-4459-9e90-c8a3d70a51a2 Release Notes: - Improved JSDoc auto-commenting on newline which now correctly indents as per convention.
This commit is contained in:
parent
cc3a28a8e8
commit
18d39e3f81
6 changed files with 264 additions and 139 deletions
|
@ -20,8 +20,7 @@ tab_size = 2
|
|||
scope_opt_in_language_servers = ["tailwindcss-language-server", "emmet-language-server"]
|
||||
prettier_parser_name = "babel"
|
||||
debuggers = ["JavaScript"]
|
||||
documentation_comment_prefix = "*"
|
||||
documentation_block = ["/**", "*/"]
|
||||
documentation = { start = "/**", end = "*/", prefix = "* ", tab_size = 1 }
|
||||
|
||||
[jsx_tag_auto_close]
|
||||
open_tag_node_name = "jsx_opening_element"
|
||||
|
|
|
@ -18,8 +18,7 @@ scope_opt_in_language_servers = ["tailwindcss-language-server", "emmet-language-
|
|||
prettier_parser_name = "typescript"
|
||||
tab_size = 2
|
||||
debuggers = ["JavaScript"]
|
||||
documentation_comment_prefix = "*"
|
||||
documentation_block = ["/**", "*/"]
|
||||
documentation = { start = "/**", end = "*/", prefix = "* ", tab_size = 1 }
|
||||
|
||||
[jsx_tag_auto_close]
|
||||
open_tag_node_name = "jsx_opening_element"
|
||||
|
|
|
@ -18,8 +18,7 @@ word_characters = ["#", "$"]
|
|||
prettier_parser_name = "typescript"
|
||||
tab_size = 2
|
||||
debuggers = ["JavaScript"]
|
||||
documentation_comment_prefix = "*"
|
||||
documentation_block = ["/**", "*/"]
|
||||
documentation = { start = "/**", end = "*/", prefix = "* ", tab_size = 1 }
|
||||
|
||||
[overrides.string]
|
||||
completion_query_characters = ["."]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue