diff --git a/docs/docs/contributing-started.mdx b/docs/docs/contributing-started.mdx index 998145f8..bc18e3f2 100644 --- a/docs/docs/contributing-started.mdx +++ b/docs/docs/contributing-started.mdx @@ -65,8 +65,8 @@ Make sure to remove this before submitting a PR as there's [a check][pr-go-mod] ## Get the source code -The source is hosted on [Github][omp]. When you want to contribute, create a [fork][gh-fork] so you can make changes in your repository -and create pull request in the official Oh my Posh repository. +The source is hosted on [Github][omp]. When you want to contribute, create a [fork][gh-fork] so you can make changes in +your repository and create pull request in the official Oh my Posh repository. Clone your fork of Oh my Posh locally, replace `` with your Github username. @@ -108,6 +108,21 @@ your path to add your own Oh my Posh binary to and immediately see the changes a go build -o $GOPATH/bin/oh-my-posh ``` +## Get an editor + +A default config(.vscode folder) for [Visual Studio Code](https://code.visualstudio.com) is available in the repo: + +- golangci-lint is configured as the default linter. +- Recommended extensions available for a smooth bootstrap. + + ![recommended extensions](recommended_extensions.png "Recommended extensions" ) +- Default run and debug configurations available. + +Once the extensions are installed: + +- Debug can be started by hitting F5. +- All tests can be run using the Test explorer. + ## Up Next With everything set up, you're ready to start making changes and create your first [PR][gh-pr]! diff --git a/docs/docs/recommended_extensions.png b/docs/docs/recommended_extensions.png new file mode 100644 index 00000000..c4b8d749 Binary files /dev/null and b/docs/docs/recommended_extensions.png differ diff --git a/src/engine.go b/src/engine.go index 8a29fdc2..667b3d07 100644 --- a/src/engine.go +++ b/src/engine.go @@ -204,8 +204,8 @@ func (e *engine) debug() { segmentTiming.stringDuration = time.Since(start) // not pretty rendering could be refactored for a better separation of concern - e.previousActiveSegment = nil e.activeSegment = segment + e.endPowerline() e.activeSegment.Background = segment.props.background e.activeSegment.Foreground = segment.props.foreground e.renderSegmentText(segmentTiming.stringValue) diff --git a/src/main.go b/src/main.go index 835e456b..efe811c5 100644 --- a/src/main.go +++ b/src/main.go @@ -154,9 +154,9 @@ func main() { if *args.Debug { engine.debug() - } else { - engine.render() + return } + engine.render() } func initShell(shell, config string) string {