Comments (10)
Scala support is in CodeMirror through this file, clike.js: https://github.com/codemirror/CodeMirror/blob/master/mode/clike/clike.js
However, when I set the mode to clike
for Scala, I don't get correct highlighting/text editing behavior (none of the correct keywords are highlighted, and default indentation is incorrect unless I put a semicolon at the end of all my lines). Going to keep investigating.
from sparkmagic.
Python taken care of through #104
from sparkmagic.
In my testing, Scala isn't working even if I set the codemirror mode to "clike" and the MIME type to text/x-scala
. For some reason CodeMirror isn't "getting" that what I type in is supposed to be Scala code and is instead applying some very simple, stupid syntax highlighting to it (i.e. only highlighting equals signs and integer literals). Can keep looking at this later.
from sparkmagic.
Hey @msftristew, any updates for this?
from sparkmagic.
Scala and Python syntax highlighting are both working great. I haven't tested out SQL but it should be easy (@alope107's solution should be fine here)
from sparkmagic.
There's an issue. See ipython/ipython#7548
It looks like only cell magics trigger magics syntax highlighting. I don't think that syntax-highlighted line magics are supported. This means that our SQL and Hive commands need to be %%sql and %%hive in order for syntax highlighting to kick in -- %sql and %hive won't work.
from sparkmagic.
Let's go with that for now and we'll investigate line magics in parallel.
from sparkmagic.
Arguably all of the "magics" in our Spark kernel are cell magics, not line magics. So it breaks with convention less if we move to a model where %%sql
, %%hive
, %%config
, etc. are the "normal" way to call things.
from sparkmagic.
Still need to do this :(
from sparkmagic.
So, I have a branch going (kerneljs) which is supposed to fix SQL syntax highlighting. As it stands, on my Windows machine, SQL syntax highlighting works for the first cell but fails with an error message in the console for the rest.
I think this PR to jupyter/notebook (which hasn't made it into an official release yet) is supposed to fix this issue? Maybe? I don't know.
from sparkmagic.
Related Issues (20)
- Sparkmagic Kerberos authentication issue HOT 1
- Plotly scala HOT 5
- Publish sparkmagic Docker images regularly HOT 1
- Run Tests Nightly to Catch Upstream Dependency Issues Earlier
- [BUG] Sparkmagic errors out using iPython 7.33.0 HOT 1
- pip deprecation warning when installing hdijupyterutils and autovizwidget HOT 1
- [QST] How to automatically load sparkmagic.magics when open a new ipython kernel tab HOT 1
- Document extending SparkMagic HOT 2
- how to pass python variable to %%sql cell ?
- [BUG] Default Docker container got broken HOT 4
- Support >= Pandas 2.0.0 HOT 6
- [BUG] error when first client connects HOT 1
- Jupyterlab 4.0.2 python 3.10 HOT 1
- [BUG] Cannot build Dockerfile.jupyter HOT 3
- [BUG] SparkMagic pyspark kernel magic(%%sql) hangs when running with Papermill. HOT 17
- Use variables in %%configure HOT 4
- [BUG] %%send-to-spark fails for dataframes with '\n' or ' characters HOT 2
- [BUG] launcher issue using jupyterlab 3.6.3 / sparkmagic 0.21.0 HOT 4
- Support notebook >= 7 HOT 1
- Does sparkmagic support dual scala/python spark session? 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 sparkmagic.