Anyone interested in a VSCode plugin?

  • 19 October 2018
  • 15 replies

Userlevel 2

I sometimes edit LookML in VSCode, because I find it’s easier to jump around amongst multiple files, search-and-replace, and generally crush code. Of course there’s no syntax highlighting, autocomplete, or any of the other code-editor niceties to be found in Looker’s built-in editor.

I’ve written a couple of VSCode plugins over the years (yes I have weird hobbies) and I’ve thought about writing a VSCode plugin for looker, which would provide syntax coloring, error squigglies and autocomplete in LookML. But I’m not sure it would have any users other than me.

Does anyone else wish there was a “LookML mode” for VSCode?

15 replies

Userlevel 7

I don’t use VSCode, but if it helps you get started, I’ve documented a LookML grammar here:

(The grammar itself is towards the bottom of the file after a bunch of JS… I’ve got to split that up eventually…)

Userlevel 2

We’ve talked about this around the office and having Peek and Jump to Definition would be a game changer as far as the current lookml editing experience is concerned. How would the workflow work though? Currently saving the file in Looker means we can make use of it right away in explores and building dashboards. If you are doing local dev would you have to save, commit, and push to your dev branch and then switch over to looker? Those added steps might eat up any time saving benefits of working in vscode.

Userlevel 2

It’s possible to display tables in VSCode as in the SQL plugin, though this certainly wouldn’t be a feature in v1 of a looker plugin.

When I edit lookml in vscode I usually just copy paste the text back to looker if I want to run something. It sounds silly but I only do this when I want to do some complicated editing and it’s that much faster to do it in a real editor.

I’d definitely be game to participate. I’ve hacked on an R extension.

Regarding the table viewer, I piggy backed on the ExcelViewer extension to display data tables. ExcelViewer is a bit beefy, but it got the job done.

Great idea George. I’d be interested in a VS Code plugin as well. Let me know how it goes!

I would be interested about this as well.

Userlevel 4

I’ve started a base for this project. Not much more than a “Hello World” right now, but I think I’ve basic syntax highlighting done.

I’m a SQL monkey not a TypeScript monkey, so development might be slow.


Userlevel 7
Badge +1

Thanks a lot for this @Ladvien ! Can I install it manually though?

Userlevel 4

It’s pretty early in development and unpublished, however, if you’ve interest in following the development (or contributing!?) you can clone the repo. Then, run npm i in the cloned directory. After installing, open the project in vscode and run it. The extension is activated upon opening a LookML file.

Userlevel 7
Badge +1

Ahh I was thinking more about .vsix file (I don’t use NPM) but that’s all right, no worries… I would love to contribute but unfortunately TypeScript is not my language : (

Userlevel 1

I’d be interested in a VSCode plugin too for syntax highlighting just for ease of changing configs and migrating files around.

But honestly the Looker IDE does a pretty good job already, and probably a tiny minority of Looker users ever export LookML to an external text editor. So it’s probably not worth it until LookML has a higher market share and becomes an industry standard.

Also it’ll probably become a pain to maintain parity with new features unless someone who actually works for Looker is a contributor and is paid to do it.

Userlevel 3

This is a great idea. I heard a couple people at JOIN 2019 conference mention that they would really like to have a VS Code Extension for LookML.

also interested in this!

Is this still alive??? I would very much like it.

Userlevel 7
Badge +1

The project’s README indicates that it’s not functional right now, and notes that “if any regex-TextMate-VSCode masters would like to help define the grammar” it would be much appreciated 😉