microsoft / microsoft/TypeScript-Sublime-Plugin
Separate TS completion from Sublime completion
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 236
- Avg merge
- 21d 13h
- Merged PRs (30d)
- 1
Description
I've been using Sublime/TextMate for many years, and am very accustomed to the way tab completion works in those editors. It will fuzzy search the symbol you're typing against every other symbol in the current document, and cycle through them when you hit <tab>.
For instance, consider that I have some symbol somewhere in the current document: arbitraryFunctionName. Here are some situations where I expect tab completion to work, but it doesn't:
importing
import afn<tab>
import arbitraryFunctionName from './afn<tab>
Commenting
/* This is some documentation for afn<tab>
Creating new objects
const something = {
afn<tab>
In each of these cases, I'd expect hitting <tab> to replace afn with arbitraryFunctionName; however, when Sublime's syntax is set to TypeScript, it merely inserts spaces.
Is there a way to separate tab completion from TypeScript completion? Perhaps <tab> could work the same way Sublime does in other languages, but <return> could select the given option in TypeScript's suggestions menu, and <esc> could reject them. Or, perhaps TypeScript takes over <tab> and <esc> could adapt Sublime's default tab behavior. (<esc> is the key that TextMate used for this style of completion.)
Is there a way to differentiate between completion powered by TypeScript's language services and Sublime's default algorithm? If not, can there be?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Sublime's Tab key handling connects to TypeScript language-service completion and how Return and Escape are currently handled. Compare the requested behavior for imports, comments, and object properties against the existing completion flow. Done means the two completion behaviors are separated with clearly defined Tab, Return, and Escape results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100