-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7d7e188
Showing
19 changed files
with
1,161 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @sotte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Bug report | ||
about: It helps making the plugin more stable. | ||
--- | ||
|
||
## Description | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
## Steps to reproduce | ||
|
||
1. I did the command `...` | ||
2. Then I saw `...` | ||
3. Error | ||
|
||
## Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## Environment | ||
|
||
- Neovim version: [e.g. 0.8.x / 0.9.x / Nightly] | ||
- presinting.nvim version: [e.g. latest / 0.1.2 / dev] | ||
- Plugin clash: [e.g. Telescope float window / lsp diagnostic] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest anything that would make your life easier, or the plugin better. | ||
--- | ||
|
||
## Describe the problem | ||
|
||
<!-- Explain what the new feature is, or if it's for the documentation, what do you expect. --> | ||
|
||
## Describe the solution | ||
|
||
<!-- Explain what your solution would look like. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## 📃 Summary | ||
|
||
<!-- Provide some context about the pull request, it makes the review easier. --> | ||
|
||
## 📸 Preview | ||
|
||
<!-- If there's a visual impact to your change, please provide a screenshot. You can directly upload it to GitHub by dragging in this text area. --> | ||
|
||
## 📝 Checklist | ||
|
||
- [ ] I ran `make all` locally and checked for errors. | ||
- [ ] I have updated the `CHANGELOG.md` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
concurrency: | ||
group: github.head_ref | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
name: lint | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: JohnnyMorganz/stylua-action@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
args: --check . | ||
|
||
documentation: | ||
runs-on: ubuntu-latest | ||
name: documentation | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: setup neovim | ||
uses: rhysd/action-setup-vim@v1 | ||
with: | ||
neovim: true | ||
version: v0.8.3 | ||
|
||
- name: generate documentation | ||
run: make docs | ||
|
||
- name: check docs diff | ||
run: exit $(git status --porcelain doc | wc -l | tr -d " ") | ||
|
||
|
||
# tests: | ||
# TODO: enable me again once there are tests | ||
# needs: | ||
# - lint | ||
# - documentation | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 2 | ||
# strategy: | ||
# matrix: | ||
# neovim_version: ['v0.9.0', 'v0.9.1', 'nightly'] | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# | ||
# - run: date +%F > todays-date | ||
# | ||
# - name: restore cache for today's nightly. | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: _neovim | ||
# key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }} | ||
# | ||
# - name: setup neovim | ||
# uses: rhysd/action-setup-vim@v1 | ||
# with: | ||
# neovim: true | ||
# version: ${{ matrix.neovim_version }} | ||
# | ||
# - name: run tests | ||
# run: make test | ||
|
||
release: | ||
name: release | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
# needs: | ||
# - tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: simple | ||
package-name: presenting.nvim | ||
|
||
- name: tag stable versions | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email github-actions[bot]@users.noreply.github.com | ||
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" | ||
git tag -d stable || true | ||
git push origin :stable || true | ||
git tag -a stable -m "Last Stable Release" | ||
git push origin stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/deps/ | ||
/doc/tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- repo: https://github.com/JohnnyMorganz/StyLua | ||
rev: v0.19.1 | ||
hooks: | ||
- id: stylua-system | ||
- repo: local | ||
hooks: | ||
- id: generate-docs | ||
name: generate-docs | ||
entry: make docs | ||
language: system | ||
pass_filenames: false | ||
- id: update-readmes | ||
name: update-readmes | ||
entry: make update-readmes | ||
language: system | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
|
||
## [Unreleased] | ||
### Added | ||
### Changed | ||
### Fixed | ||
### Removed | ||
|
||
|
||
## [0.1.0] - 2023-12-30 | ||
|
||
### Added | ||
- Release first basic version | ||
|
||
### Changed | ||
### Fixed | ||
### Removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 <Stefan Otte> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
################################################################################ | ||
# DEFINES | ||
.DEFAULT_GOAL:=help | ||
SHELL:=/bin/bash | ||
|
||
PROJECT_NAME:=presenting.nvim | ||
COMMIT:=$(shell git rev-parse --short HEAD) | ||
|
||
################################################################################ | ||
##@ Maintenance | ||
.PHONY: all | ||
all: update-readmes lint docs pre-commit ## Runs all the targets | ||
|
||
.PHONY: docs | ||
docs: deps ## generates the docs. | ||
nvim --headless --noplugin -u ./scripts/minimal_init.lua -c "lua require('mini.doc').generate()" -c "qa!" | ||
|
||
.PHONY: lint | ||
lint: deps ## performs a lint check and fixes issue if possible, following the config in `stylua.toml`. | ||
stylua . | ||
|
||
.PHONY: update-readmes | ||
update-readmes: README.org README.adoc ## Update READMEs from README.md | ||
|
||
.PHONY: pre-commit | ||
pre-commit: ## Run pre-commit on all | ||
pre-commit run --all | ||
|
||
.PHONY: test | ||
test: deps ## Runs all tests | ||
echo "TODO: implement tests" | ||
# nvim --version | head -n 1 && echo '' | ||
# nvim --headless --noplugin -u ./scripts/minimal_init.lua \ | ||
# -c "lua require('mini.test').setup()" \ | ||
# -c "lua MiniTest.run({ execute = { reporter = MiniTest.gen_reporter.stdout({ group_depth = 1 }) } })" | ||
|
||
|
||
################################################################################ | ||
deps: ## installs `mini.nvim`, used for both the tests and documentation. | ||
@mkdir -p deps | ||
git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim | ||
|
||
README.org: README.md | ||
pandoc -f markdown -t org -o $@ $^ | ||
|
||
README.adoc: README.md | ||
pandoc -f markdown -t asciidoc -o $@ $^ | ||
|
||
################################################################################ | ||
##@ Helpers | ||
.PHONY: clean | ||
clean: ## Cleanup the project folders | ||
rm -rf deps | ||
rm -rf docs | ||
|
||
.PHONY: help | ||
help: ## Display this help | ||
@echo "Welcome to $$(tput bold)${PROJECT_NAME}$$(tput sgr0) 🥳📈🎉" | ||
@echo "" | ||
@echo "To get started:" | ||
@echo " >>> $$(tput bold)make all$$(tput sgr0)" | ||
@awk 'BEGIN {FS = ":.*##"; printf "\033[36m\033[0m"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
== `presenting.nvim` | ||
|
||
`presenting.nvim` is a neovim plugin that turns your markup files into | ||
slides (in neovim). | ||
|
||
It is rewrite of | ||
https://github.com/sotte/presenting.vim/[`presenting.vim`] in lua. It | ||
simplifies the code (and removes some features). `presenting.vim` is a | ||
clone of https://github.com/pct/present.vim[`present.vim`] which is a | ||
clone of https://github.com/sorah/presen.vim[`presen.vim`]. | ||
|
||
== Usage | ||
|
||
With `presenting.nvim` installed and configured (see section below) open | ||
a markdown/org/adoc file, then start the presentation using global | ||
`Presenting` lua object: | ||
|
||
.... | ||
:lua Presenting.toggle() | ||
.... | ||
|
||
or using the `Presenting` user command: | ||
|
||
.... | ||
:Presenting | ||
.... | ||
|
||
Then navigate the presentation with the keys: - _q_: quit presentation | ||
mode - _n_: next slide - _p_: previous slide - _f_: first slide - _l_: | ||
last slide | ||
|
||
=== Usage - I want to know more | ||
|
||
This `README` is intentionally short. For more information, see | ||
`:help presenting.nvim` and the | ||
https://github.com/sotte/presenting.nvim/doc/presenting.txt[documentation]. | ||
|
||
== Installation and Setup | ||
|
||
With `lazy.nvim`: | ||
|
||
[source,lua] | ||
---- | ||
return { | ||
"sotte/presenting.nvim", | ||
opts = { | ||
-- fill in your options here | ||
-- see :help Presenting.config | ||
}, | ||
cmd = { "Presenting" }, | ||
} | ||
---- | ||
|
||
== Tips | ||
|
||
😎 Directly start a presentation from the CLI: | ||
|
||
[source,bash] | ||
---- | ||
nvim -c Presenting README.md | ||
nvim -c Presenting README.org | ||
nvim -c Presenting README.adoc | ||
---- | ||
|
||
🔬 Zoom in with your terminal emulator to make the slides *bigger*. | ||
|
||
== DevMode | ||
|
||
There is a dev mode that unloads+reloads the plugin which is handy if | ||
you’re developing the plugin. | ||
|
||
.... | ||
PresentingDevMode | ||
.... | ||
|
||
== Demo of markup elements | ||
|
||
I use this README as a demo of the markup elements. The following | ||
sections don’t have to do anything with the plugin itself. | ||
|
||
=== Markup and Lists | ||
|
||
*bolb* and _italic_ and _italic_ and `code` and [line-through]*strike* | ||
and mark and underline | ||
|
||
* list | ||
* list | ||
** list | ||
** list | ||
|
||
=== Code block | ||
|
||
[source,python] | ||
---- | ||
def fib(n: int) -> int: | ||
if n < 2: | ||
return n | ||
return fib(n - 1) + fib(n - 2) | ||
---- |
Oops, something went wrong.