Add a way to tell Code to count specific characters as part of the word (preferably per language) when double clicking them
- 主要语言
- Vala
- 星标
- 521
- 派生
- 118
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 14
描述
## Prerequisites
- [x] I have searched open and closed issues for duplicates.
---
Ruby and Crystal allow `!` and `?` as part of variables and methods, so you can have a method like `File.exists? "~/abc"`. It would be useful if you could tell Code to count these characters as part of the word when double clicking them per language, so you could double click `exists?` and it would select the whole thing, rather than just `exists`.
...actually, it would probably be better to instead either use the language spec file for GtkSourceView to determine what to include in the double click select (if anything is even in the file for non-library variables and methods), or (possibly better) use language servers (#220) to determine that instead.
The latter would probably actually tell Code what you're double clicking (i.e. if what you're selecting is a variable/method/class/etc.) and so Code could use that to determine what to select (e.g. language server says what we double clicked is a method called `exists?`, so we should select the entirety of `exists?`), while the former may not even specify anything for non-library functions/methods/variables (i.e. your variables), so that's why the latter is probably better.
贡献指南
调研方向
首先检查 GtkSourceView 语言规范文件如何定义单词边界,以及 issue #220 中的 language-server 提案。确定这两条路径中的任一条是否支持按语言选择 ! 和 ? 等字符,然后将 completion 定义为双击 exists?,选择完整的方法名,同时不破坏现有语言。
由索引模型根据 Issue 内容生成。
评估
- 领域
- developer-experience, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100