The trailing newline character in line comments is not properly scoped
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- typescript
- 領域
- tooling
研究方向
首先定位為行註解設定作用域的 TypeScript TextMate 語法規則,然後將其對結束換行字元的處理與回報的 Sublime Text 行為進行比較。完成的標準是將換行字元標記為行註解的一部分,同時保留對儲存庫描述中所列編輯器的支援;issue 中未確定測試檔案。
由索引模型根據 Issue 內容生成。
描述
TypeScript Sublime Package version: 3.8.2
As the syntax currently stands, the newline character that terminates a line comment is not scoped as being a part of the comment body itself. This causes various issues in Sublime Text in particular, although not being familiar with the other editors that are also using this syntax I'm not sure if there's a reason why this is the case or not.
For example, in Sublime the auto_complete_selector setting is used to control in what circumstances the autocompletion popup will automatically trigger. The general practice is to include source - comment in this setting to stop autocompletion from happening inside of a comment, since that is rarely useful. Since the newline isn't scoped, the autocomplete popup triggers constantly while entering comments.
In addition, various plugins and commands attempt to continue comments onto the next line when pressing enter, which generally requires that the end of the current comment be scoped as a comment so as to be syntax agnostic.
In order to support this for TypeScript, extra key bindings or plugin logic to try and detect that the current position is the end of a line comment are required, which arguably is information that the syntax should be providing.
As indicated above, since I'm purely a Sublime user I'm not sure if the other editors targeted by this syntax don't exhibit such issues or if there's some other reason why the newline is not currently being scoped as a comment.
- 主要語言
- TypeScript
- 星號
- 471
- 分支
- 149
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/TypeScript-TmLanguage 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
microsoft/TypeScript-TmLanguage#1071 ·
-
triste 未關閉
難度 5/5 一週以上 新手友好度 5/100
microsoft/TypeScript-TmLanguage#1078 ·
-
難度 3/5 1-2 天 新手友好度 68/100
microsoft/TypeScript-TmLanguage#1076 · 6 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 55/100
microsoft/TypeScript-TmLanguage#1074 · 2 則留言 ·
-
難度 1/5 1-3 小時 新手友好度 58/100
microsoft/TypeScript-TmLanguage#1066 · 1 則留言 ·
查看 microsoft/TypeScript-TmLanguage 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未關閉
難度 2/5 1-3 小時 新手友好度 70/100
-
Crush 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
難度 1/5 1 小時以內 新手友好度 90/100
ElementsProject/cln-application#167 · 1 則留言 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
難度 2/5 1-3 小時 新手友好度 75/100