Comments (5)
I guess you’ve used expandAbbreviation
command as tab key handler? You should use abbreviation tracker instead as described in README, it contains all the required logic to handle Tab key.
The reason to expand abbreviation if range > 0 is to allow user to select specific text and expand it as abbreviation (in case if abbreviation extraction doesn’t work as expected)
from codemirror6-plugin.
Hm, I currently have both, which may be part of the problem. I think I had the Tab keymap from the previous version and added abbreviationTracker when that was available.
To clarify: If you use abbreviationTracker
, you do not need a separate keymap for expandAbbreviation
?
from codemirror6-plugin.
Okay, I did get this working with just abbreviationTracker
. However, I had to set this extension to Prec.high
in order for the Tab keymap to run ahead of the indentWithTab
keymap
Prec.high( abbreviationTracker( ... ) )
If you're using some of the CodeMirror default extension lists, you may need that extra Precedence bump.
from codemirror6-plugin.
To clarify: If you use abbreviationTracker, you do not need a separate keymap for expandAbbreviation?
No, expandAbbreviation
action should be used in case you want to expand abbreviation in some unsupported syntax like Markdown or Go (why not?). In supported syntaxes, if you want to expand by Tab, you should use abbreviation tracker since Tab key is very tricky to handle. Tracker contains all the logic to make it as smooth as possible
from codemirror6-plugin.
Tricky. I think my current setup of mapping languages to certain syntaxes is sufficient for the languages we'll support. Thanks for clarifying.
from codemirror6-plugin.
Related Issues (17)
- Conditional Enabling HOT 2
- Make CSS autocomplete option position configurable/dynamic to better handle conflicts with built-in autocomplete HOT 3
- CSS autocomplete extension is not context aware HOT 1
- Populating Custom Snippets HOT 2
- How to Activate on Sass, Scss, LESS, etc. HOT 14
- Emmet does not use correct syntax highlighting HOT 5
- Set Prec to highest for Tab/Esc key Commands and export Commands
- When used in nextJS setup, it works on dev but when you build it does not work. HOT 2
- HTML should not suggest invalid tags HOT 3
- Snippet Previews
- Mount Preview to ShadowDOM root HOT 1
- Module doesn't export anything HOT 1
- console.log
- mobile support HOT 1
- Untranspiled code HOT 5
- preview rendering inside strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codemirror6-plugin.