Skip to content

Commit

Permalink
add more docs about Starlark tips
Browse files Browse the repository at this point in the history
  • Loading branch information
leeederek committed Dec 4, 2023
1 parent 8a2ced3 commit e93bab9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
17 changes: 16 additions & 1 deletion docs/docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,26 @@ Kurtosis service names implements [RFC-1035](https://datatracker.ietf.org/doc/ht

Failure to adhere to the above standards will result in errors when running Kurtosis.

Writing and reading Starlark
----------------------------

If you're using Visual Studio Code, you may find our [Kurtosis VS Code Extension][vscode-plugin] helpful when writing Starlark.

If you're using Vim, you can add the following to your `.vimrc` to get Starlark syntax highlighting:

```
" Add syntax highlighting for Starlark files
autocmd FileType *.star setlocal filetype=python
```

or if you use Neovim:
```
autocmd BufNewFile,BufRead *.star set filetype=python
```

<!---------------------------------------- ONLY LINKS BELOW HERE!!! ----------------------------------->
[package-parameterization]: ./advanced-concepts/packages.md#parameterization

[vscode-plugin]: https://marketplace.visualstudio.com/items?itemName=Kurtosis.kurtosis-extension
[service-config-starlark-reference]: ./api-reference/starlark-reference/service-config.md
[port-spec-starlark-reference]: ./api-reference/starlark-reference/port-spec.md
[ready-condition-starlark-reference]: ./api-reference/starlark-reference/ready-condition.md
Expand Down
23 changes: 22 additions & 1 deletion docs/docs/get-started/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,25 @@ kurtosis run github.com/kurtosis-tech/basic-service-package \

![service-c-partying.png](/img/home/service-c-k8s.png)

</details>
</details>

Writing and reading Starlark
----------------------------
The Starlark programming language is used to manipulate the contents of environments spun up with Kurtosis. Read more about Starlark and why we chose to use it [here](../advanced-concepts/why-kurtosis-starlark.md).

If you're using Visual Studio Code to write and edit Starlark in Kurtosis packages, you may find our [Kurtosis VS Code Extension][vscode-plugin] helpful when writing Starlark.

If you're using Vim, you can add the following to your `.vimrc` to get Starlark syntax highlighting:

```
" Add syntax highlighting for Starlark files
autocmd FileType *.star setlocal filetype=python
```

or if you use Neovim:
```
autocmd BufNewFile,BufRead *.star set filetype=python
```

<!--------------- ONLY LINKS BELOW THIS POINT ---------------------->
[vscode-plugin]: https://marketplace.visualstudio.com/items?itemName=Kurtosis.kurtosis-extension

0 comments on commit e93bab9

Please sign in to comment.