Comments (8)
You actually should be able to do most of this by using the syntax highlighting. You should be able to add a scope to a given character range and then have the theme set certain properties based on that. Unfortunately wavy underlines aren't part of the supported options, I don't think, mostly because they're not built in to Cocoa.
I added some of this experimentally to vico-ensime
a while back: https://github.com/Shadowfiend/vico-ensime.vicobundle/blob/master/ensime-status-commands.nu . I chose the scope severity.(warning|error)
, I believe. I did have to edit the theme file directly; it would probably be ideal if there were a default set for those theme settings.
Notably, spellcheck underlines have switched to dashed underlines instead of wavy, so that may be a possibility.
from vico.
I've tagged this feature, which I'll use to track a built-in way of doing this highlighting.
If you have access to this information, it'd be handy if you could see what if any scopes TextMate uses for these, if TextMate has this ability.
from vico.
Oh wow - that's awesome. I'm not set on wavy underlines - dotted probably look even better IMHO. So then I just need the ability (some kind of hook) to be able to reevaluate the syntax on every keystroke I believe (with some kind of delay + debounce). If your vico-ensime
plugin already does this then I can just copy it and begin writing the javascript highlighter.
IIRC: There are some textmate themes with error colors - so we could use those - but would there be a way to just use the "misspelling dotted underline" IMHO it looks the best! Can we simply mark a region as "incorrectly spelled"?
from vico.
I'm tempted to leave it up to the theme rather than forcing a setting on the user, though I'm open to suggestions.
I still need to look into exposing the dotted underline style, however.
from vico.
Yeah - I always wished it was themeable in Macvim.
What do I have to do to get the script to be reevaluated continually (after some elapsed time of non-typing?) Where's the place I can start looking?
from vico.
The Vico API docs are actually still reasonably up-to-date. caretDidMove
is the event that is current exposed that is perhaps best suited to this, though it'd be nice to expose an event for the actual text changing (say, when you leave insert mode). Right now it will be a bit noisy, since it'll be all caret movement, not just that caused by typing.
For the part where you wait a certain amount of time, you can use NSTimer
to schedule a selector invocation after a certain interval, and use invalidate
on the timer to stop it if the user takes action in the meantime.
from vico.
I started playing with this and it looks like some of the example scripts are outdated.
Do you know why ((document fileURL) path)
no longer works? What's the new way to get the path of a document?
from vico.
I think you want ((current-document) fileURL)
.
from vico.
Related Issues (20)
- Autocomplete doesn't correct camel casing mid-word. HOT 1
- Snippets ruin autocomplete selection. HOT 1
- Ability to theme Flat. HOT 8
- Fast Full Screen Mode. HOT 2
- Entering a command in fullscreen mode then moving to another space makes the vico space inaccessible HOT 1
- Tab to complete interferes with snippet expansion. HOT 2
- Project Bookmarks HOT 4
- Store "File Explorer" and "Symbol List" size and state per "project" HOT 3
- Crashes when creating new file from file explorer HOT 3
- Retina images for tabs and symbols. HOT 1
- python through :setfiletype HOT 3
- EXC_BAD_ACCESS / KERN_INVALID_ADDRESS at 0x0000000100001180 HOT 1
- Enter causes app to crash at specific line in ruby HOT 4
- File browser icons are broken when compiling on Yosemite. HOT 1
- R (replace mode) not supported HOT 1
- Problems compiling `swiftly-forward` branch. HOT 4
- Can't load Bundles in Preferences
- Backup .dmg, help docs & APIs from the way back machine. HOT 6
- Revive Vico Editor HOT 3
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 vico.