Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .busted
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
lua = "nlua",
},
default = {
helper = "./spec/minimal_init.lua",
verbose = true,
},
tests = {
Expand Down
59 changes: 54 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,67 @@ on:
- main

jobs:
documentation:
name: Documentation
check_documentation_branch:
name: Check For A Documentation Branch
runs-on: ubuntu-latest
outputs:
exists: ${{ steps.check_branch.outputs.exists }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- uses: rhysd/action-setup-vim@v1
- name: Check If A Valid Documentation Branch Exists
id: check_branch
run: |
if git ls-remote --exit-code origin refs/heads/gh-pages; then
echo "The branch exists"
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "The branch does not exist"
echo "exists=false" >> $GITHUB_OUTPUT
fi

html_documentation:
needs: check_documentation_branch
if: needs.check_documentation_branch.outputs.exists == 'true'
name: HTML Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install emmylua_doc_cli From crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: emmylua_doc_cli

- name: Generate Mkdocs Files With emmylua_doc_cli
run: emmylua_doc_cli --input lua/ --output markdown/generated --mixin markdown/manual

- name: Deploy To GitHub Pages
uses: mhausenblas/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: markdown/generated/mkdocs.yml

vim_documentation:
name: Vim Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: stable

- name: Create API Documentation
run: |
nvim --version
make api-documentation

- name: Create User Documentation
uses: kdheepak/panvimdoc@main
with:
Expand All @@ -31,7 +80,7 @@ jobs:
nvim -c 'helptags doc' -c 'quit'

- name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: "docs(vimdoc): Auto-generate user / API documentation + vimtags"
commit_user_name: "github-actions[bot]"
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/llscheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ jobs:
name: llscheck

steps:
- uses: actions/checkout@master
- name: Checkout
uses: actions/checkout@master

- uses: rhysd/action-setup-vim@v1
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
# NOTE: We need Neovim installed in order to expose the $VIMRUNTIME
# environment variable
with:
neovim: true
version: stable

- uses: leafo/gh-actions-lua@v10
- name: Install A Lua Interpreter
uses: leafo/gh-actions-lua@v11
with:
# Neovim is compiled with LuaJIT so we might as well match. But it
# doesn't look like we can match it exactly.
Expand All @@ -40,30 +43,27 @@ jobs:
tool_versions: |
lua-language-server latest

- uses: leafo/gh-actions-luarocks@v4
- name: Install llscheck
run: |
luarocks install llscheck
luarocks install nlua

- name: Clone dependencies - busted
uses: actions/checkout@v4
with:
repository: "LuaCATS/busted"
path: ".dependencies/busted"
- name: Install luarocks
# TODO: Replace with https://github.com/luarocks/gh-actions-luarocks after v6+
uses: ColinKennedy/[email protected]

- name: Clone dependencies - luassert
uses: actions/checkout@v4
with:
repository: "LuaCATS/luassert"
path: ".dependencies/luassert"
- name: Print Versions
run: |
luarocks --version
lua-language-server --version

- name: Clone dependencies - luavit-meta
uses: actions/checkout@v4
with:
repository: "Bilal2453/luvit-meta"
path: ".dependencies/luvit-meta"
- name: Install llscheck
run: |
luarocks --version
luarocks install llscheck --verbose

- name: test
- name: Test
run: |
VIMRUNTIME=`nlua -e 'io.write(os.getenv("VIMRUNTIME"))'` llscheck --configpath .github/workflows/.luarc.json .
# We use SSH in the `Makefile` but GitHub actions don't allow that. So
# we force git to clone using HTTP instead.
#
export GIT_CONFIG=~/.gitconfig
git config url."https://github.com/".insteadOf [email protected]:

# Now do the llscheck (and any git clones, as needed)
make llscheck CONFIGURATION=.github/workflows/.luarc.json
68 changes: 51 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,69 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
neovim: [v0.10.0, stable, nightly]
neovim: [v0.10.0, v0.11.0, stable, nightly]
luaVersion: ["luajit-openresty"]
include:
- os: "windows-latest"
toolchain: "msvc"
luaVersion: "5.1"
neovim: "v0.10.0"
- os: "windows-latest"
toolchain: "msvc"
luaVersion: "5.1"
neovim: "stable"
- os: "windows-latest"
toolchain: "msvc"
luaVersion: "5.1"
neovim: "nightly"

runs-on: ${{ matrix.os }}
name: "OS: ${{ matrix.os }} - Neovim: ${{ matrix.neovim }}"
name: "OS: ${{ matrix.os }} - Neovim: ${{ matrix.neovim }} - Lua: ${{ matrix.luaVersion }}"

steps:
- uses: actions/checkout@master
- name: Checkout
uses: actions/checkout@master

- uses: leafo/gh-actions-lua@v10
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
# Neovim is compiled with LuaJIT so we might as well match. But it
# doesn't look like we can match it exactly.
#
# Reference:
# https://github.com/leafo/gh-actions-lua/issues/49#issuecomment-2295071198
#
luaVersion: "luajit-openresty"
neovim: true
version: ${{ matrix.neovim }}

- uses: leafo/gh-actions-luarocks@v4
- name: Setup MSVC
# the 'luarocks/gh-actions-lua' step requires msvc to build PUC-Rio Lua
# versions on Windows (LuaJIT will be build using MinGW/gcc).
if: ${{ matrix.toolchain == 'msvc' }}
uses: ilammy/msvc-dev-cmd@v1

- uses: rhysd/action-setup-vim@v1
- name: Install Lua
uses: luarocks/gh-actions-lua@v11
with:
neovim: true
version: ${{ matrix.neovim }}
luaVersion: "${{ matrix.luaVersion }}"

- name: Install LuaRocks
# TODO: Replace with https://github.com/luarocks/gh-actions-luarocks after v6+
uses: ColinKennedy/[email protected]

- name: Print Versions
run: |
luarocks --version

# We need this hack until a better solution is available.
#
# Reference: https://github.com/nvim-neorocks/luarocks-tag-release/issues/435
#
- name: Expand The Template Rockspec
uses: ColinKennedy/[email protected]
with:
input: template.rockspec
output: cursor-text-objects-scm-1.rockspec
delete_input_after: true

- name: build
- name: Build Test Dependencies
run: |
luarocks test cursor-text-objects-scm-1.rockspec --prepare

- name: test
- name: Test
run: |
luarocks test --test-type busted
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@ else
IGNORE_EXISTING = 2> /dev/null || true
endif

clone_git_dependencies:
CONFIGURATION = .luarc.json

download-dependencies:
git clone [email protected]:LuaCATS/busted.git .dependencies/busted $(IGNORE_EXISTING)
git clone [email protected]:LuaCATS/luassert.git .dependencies/luassert $(IGNORE_EXISTING)
git clone [email protected]:Bilal2453/luvit-meta.git .dependencies/luvit-meta $(IGNORE_EXISTING)

api_documentation:
api-documentation:
nvim -u scripts/make_api_documentation/minimal_init.lua -l scripts/make_api_documentation/main.lua

llscheck: clone_git_dependencies
VIMRUNTIME=`nlua -e 'io.write(os.getenv("VIMRUNTIME"))'` llscheck --configpath .luarc.json .
llscheck: download-dependencies
VIMRUNTIME="`nvim --clean --headless --cmd 'lua io.write(os.getenv("VIMRUNTIME"))' --cmd 'quit'`" llscheck --configpath $(CONFIGURATION) .


luacheck:
luacheck lua plugin scripts spec

stylua:
stylua lua plugin scripts spec

test: clone_git_dependencies
test: download-dependencies
busted --helper spec/minimal_init.lua .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Give your right-pinky a workout and install `cursor-text-objects.nvim` today!
{ desc = "Run from your current cursor to the end of the text-object." }
)
end,
version = "v1.*",
version = "v2.*",
}
```

Expand Down
32 changes: 0 additions & 32 deletions cursor-text-objects-scm-1.rockspec

This file was deleted.

11 changes: 8 additions & 3 deletions doc/news.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
*cursor-text-objects-news.txt*

Notable changes since CursorTextObjects 1.0
Notable changes since CursorTextObjects 2.0


===============================================================================
NEW FEATURES *cursor-text-objects-new-features*

- Added default `<Plug>` mappings
- n/a


===============================================================================
BREAKING CHANGES *cursor-text-objects-new-breaking*

n/a
The git history was squashed so lazy.nvim will load the plugin properly.

The original plugin history is retained in a backup branch called `v1_backup`
and all `v1.*` tagged commits are still accessible.

See: https://github.com/ColinKennedy/cursor-text-objects.nvim/issues/10


vim:tw=78:ts=8:noet:ft=help:norl:
Loading
Loading