From 7c94bcd2d77e2e54b8836ab8325460a367b79eae Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 20 Sep 2021 19:00:50 -0700 Subject: feat(lua)!: execute Lua with "nvim -l" Problem: Nvim has Lua but the "nvim" CLI can't easily be used to execute Lua scripts, especially scripts that take arguments or produce output. Solution: - support "nvim -l [args...]" for running scripts. closes #15749 - exit without +q - remove lua2dox_filter - remove Doxyfile. This wasn't used anyway, because the doxygen config is inlined in gen_vimdoc.py (`Doxyfile` variable). - use "nvim -l" in docs-gen CI job Examples: $ nvim -l scripts/lua2dox.lua --help Lua2DoX (0.2 20130128) ... $ echo "print(vim.inspect(_G.arg))" | nvim -l - --arg1 --arg2 $ echo 'print(vim.inspect(vim.api.nvim_buf_get_text(1,0,0,-1,-1,{})))' | nvim +"put ='text'" -l - TODO? -e executes Lua code -l loads a module -i enters REPL _after running the other arguments_. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2af9bc49d8..6e727448b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -205,6 +205,8 @@ jobs: env: CC: ${{ matrix.cc }} CI_OS_NAME: ${{ matrix.os }} + # TEST_FILE: test/functional/core/startup_spec.lua + # TEST_FILTER: foo steps: - uses: actions/checkout@v3 @@ -281,6 +283,8 @@ jobs: DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps CACHE_NVIM_DEPS_DIR: ${{ github.workspace }}/nvim-deps DEPS_PREFIX: ${{ github.workspace }}/nvim-deps/usr + # TEST_FILE: test/functional/core/startup_spec.lua + # TEST_FILTER: foo name: windows (MSVC_64) steps: - uses: actions/checkout@v3 -- cgit From 599e1d019aa010d4e3c56e6bad3d1c406dda5b0f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 1 Jan 2023 17:39:38 +0100 Subject: ci: use nvim -l in api-docs job --- .github/workflows/api-docs.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 8f5b8ce8e8..fa8a7dbca0 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -28,6 +28,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: + - uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: nightly - uses: actions/checkout@v3 with: # Fetch depth 0 is required if called through workflow_call. In order @@ -38,7 +42,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack luajit + sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - name: Setup git config run: | -- cgit