Anyone interested in a VSCode plugin?


(George Fraser) #1

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?


(fabio) #2

I don’t use VSCode, but if it helps you get started, I’ve documented a LookML grammar here: https://github.com/fabio-looker/node-lookml-parser/blob/master/parse/lookml.peg

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


(Scott Vickers) #3

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.


(George Fraser) #4

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.


(Thomas Brittain) #5

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.