Skip to content

Commit

Permalink
feat: add support for neovim v0.9 (#60)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Mike <[email protected]>
  • Loading branch information
jackielii and mikesmithgh authored Nov 24, 2023
1 parent 5a17f3f commit 30fffc0
Show file tree
Hide file tree
Showing 12 changed files with 439 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/vimdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
vimdoc: kitty-scrollback.nvim
pandoc: "tmp_vimdoc_workdir/README.md"
version: "NVIM v0.10+"
version: "NVIM v0.9+"
toc: true
demojify: true
dedupsubheadings: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Navigate your Kitty scrollback buffer to quickly search, copy, and execute comma

<!-- panvimdoc-ignore-start -->

[![neovim: v0.10+](https://img.shields.io/static/v1?style=flat-square&label=neovim&message=v0.10%2b&logo=neovim&labelColor=282828&logoColor=8faa80&color=414b32)](https://neovim.io/)
[![neovim: v0.9+](https://img.shields.io/static/v1?style=flat-square&label=neovim&message=v0.9%2b&logo=neovim&labelColor=282828&logoColor=8faa80&color=414b32)](https://neovim.io/)
[![kitty v0.29+](https://img.shields.io/badge/v0.29%2B-352217?style=flat-square&logo=data%3Aimage%2Fjpeg%3Bbase64%2C%2F9j%2F4AAQSkZJRgABAQAAAQABAAD%2F4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAA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ZDT2bP%2Bzk%2FrKLYctI3vjvWO81mAUAAAAAAAAAAAAAAAAAAAB6vobJirjvWZiMkzvz8YX9IekIxxOLBaJvPW0eDxwDr1AAI68%2BgA%2BmwXx2xVnFMTXblsu%2BWAfVIfLAPqVM18dMVpyzEV257vmQCevIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH%2F9k%3D&label=kitty&labelColor=282828)](https://sw.kovidgoyal.net/kitty/)
[![semantic-release: angular](https://img.shields.io/static/v1?style=flat-square&label=semantic-release&message=angular&logo=semantic-release&labelColor=282828&logoColor=d8869b&color=8f3f71)](https://github.com/semantic-release/semantic-release)

Expand Down Expand Up @@ -187,7 +187,7 @@ Navigate your Kitty scrollback buffer to quickly search, copy, and execute comma

## 📚 Prerequisites

- Neovim [v0.10+](https://github.com/neovim/neovim/releases)
- Neovim [v0.9+](https://github.com/neovim/neovim/releases)
- Kitty [v0.29+](https://github.com/kovidgoyal/kitty/releases)

## 🏃 Quickstart
Expand Down
4 changes: 2 additions & 2 deletions doc/kitty-scrollback.nvim.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*kitty-scrollback.nvim.txt* For NVIM v0.10+ Last change: 2023 November 23
*kitty-scrollback.nvim.txt* For NVIM v0.9+ Last change: 2023 November 24

==============================================================================
Table of Contents *kitty-scrollback.nvim-table-of-contents*
Expand Down Expand Up @@ -162,7 +162,7 @@ EXAMPLE USE CASES *kitty-scrollback.nvim-example-use-cases*

PREREQUISITES *kitty-scrollback.nvim-prerequisites*

- Neovim v0.10+ <https://github.com/neovim/neovim/releases>
- Neovim v0.9+ <https://github.com/neovim/neovim/releases>
- Kitty v0.29+ <https://github.com/kovidgoyal/kitty/releases>


Expand Down
7 changes: 6 additions & 1 deletion lua/kitty-scrollback/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ end
M.checkhealth = function()
local kitty_scrollback_kitten =
vim.api.nvim_get_runtime_file('python/kitty_scrollback_nvim.py', false)[1]
if vim.fn.has('nvim-0.10') > 0 then
-- NOTE(#58): nvim v0.9 support
-- setup backports for v0.9 because checkhealth can be called outside of standard setup flow
if vim.fn.has('nvim-0.10') <= 0 then
require('kitty-scrollback.backport').setup()
end
if vim.fn.has('nvim-0.9') > 0 then
vim
.system({
'kitty',
Expand Down
10 changes: 10 additions & 0 deletions lua/kitty-scrollback/backport/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Backported functionality from v0.10 to v0.9

## Files
- runtime/lua/vim/_system.lua
- runtime/lua/vim/version.lua

## Backport sha256s
- backport-sha.json contains the file and sha256 checksums at the time of copy
- TODO: add a cron to have a nightly check if these files changes in Neovim

Loading

0 comments on commit 30fffc0

Please sign in to comment.