Skip to content

Commit

Permalink
rebase and retry
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestrew committed Apr 5, 2024
1 parent 1764214 commit 1691f1d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 48 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: date +%F > todays-date

- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.rev }}

- name: Restore from todays cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-deps-${{ matrix.version }}-${{ hashFiles('todays-date') }}
restore-keys: |
${{ runner.os }}-deps-${{ matrix.version }}-
- name: Install ripgrep
- name: Prepare
run: |
${{ matrix.manager }} update
${{ matrix.manager }} upgrade
${{ matrix.manager }} install ${{ matrix.packages }}
rg --version
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
git clone --depth 1 https://github.com/nvim-tree/nvim-web-devicons ~/.local/share/nvim/site/pack/vendor/start/nvim-web-devicons
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
- name: Run tests
run: |
nvim --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v3
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
build/
doc/tags
deps/

.luacheckcache
31 changes: 2 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
.PHONY: test lint docgen clean
.PHONY: test lint docgen

DEPS_DIR := deps
PLENARY_DIR := $(DEPS_DIR)/plenary.nvim
DEVICONS_DIR := $(DEPS_DIR)/nvim-web-devicions

define git_clone_or_pull
@mkdir -p $(dir $1)
@if [ ! -d "$1" ]; then \
git clone --depth 1 $2 $1; \
else \
git -C "$1" pull; \
fi
endef

$(DEPS_DIR):
@mkdir -p $@

plenary: | $(DEPS_DIR)
$(call git_clone_or_pull,$(PLENARY_DIR),https://github.com/nvim-lua/plenary.nvim)

test-deps: plenary | $(DEPS_DIR)
$(call git_clone_or_pull,$(DEVICONS_DIR),https://github.com/nvim-tree/nvim-web-devicons)

test: plenary
test:
nvim --headless --noplugin -u scripts/minimal_init.vim -c "PlenaryBustedDirectory lua/tests/automated/ { minimal_init = './scripts/minimal_init.vim' }"

lint:
luacheck lua/telescope

# pinned tree-sitter-lua commit no longer works on nightly (0.10)
docgen:
nvim --headless --noplugin -u scripts/minimal_init.vim -c "luafile ./scripts/gendocs.lua" -c 'qa'

clean:
@rm -rf $(DEPS_DIR)

2 changes: 1 addition & 1 deletion lua/telescope/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ end
--- this function outside of telescope might yield to undefined behavior and will
--- not be addressed by us
---@param opts table: The opts the users passed into the picker. Might contains a path_display key
---@param path string?: The path that should be formatted
---@param path string|nil: The path that should be formatted
---@return string: The transformed path ready to be displayed
utils.transform_path = function(opts, path)
if path == nil then
Expand Down
6 changes: 2 additions & 4 deletions scripts/minimal_init.vim
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
set rtp+=.
set rtp+=deps/plenary.nvim/
set rtp+=deps/tree-sitter-lua/
set rtp+=deps/nvim-web-devicons/
set rtp+=../plenary.nvim/
set rtp+=../tree-sitter-lua/

runtime! plugin/plenary.vim
runtime! plugin/telescope.lua
" runtime! plugin/ts_lua.vim

let g:telescope_test_delay = 100

0 comments on commit 1691f1d

Please sign in to comment.