Skip to content

Commit

Permalink
chore: backport version tostring function
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh committed Nov 23, 2023
1 parent b6e34c0 commit b7a5a09
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 604 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.9+"
version: "NVIM v0.10+"
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.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/)
[![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/)
[![kitty v0.29+](https://img.shields.io/badge/v0.29%2B-352217?style=flat-square&logo=data%3Aimage%2Fjpeg%3Bbase64%2C%2F9j%2F4AAQSkZJRgABAQAAAQABAAD%2F4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHV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AAAAAAAAAAAAAAAB6vobJirjvWZiMkzvz8YX9IekIxxOLBaJvPW0eDxwDr1AAI68%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.9+](https://github.com/neovim/neovim/releases)
- Neovim [v0.10+](https://github.com/neovim/neovim/releases)
- Kitty [v0.29+](https://github.com/kovidgoyal/kitty/releases)

## 🏃 Quickstart
Expand Down
2 changes: 1 addition & 1 deletion lua/kitty-scrollback/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ 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.9') > 0 then
if vim.fn.has('nvim-0.10') > 0 then
vim
.system({
'kitty',
Expand Down
6 changes: 3 additions & 3 deletions lua/kitty-scrollback/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ end

M.check_nvim_version = function(version, check_only)
if not check_only then
vim.health.start('kitty-scrollback: Neovim version 0.9+')
vim.health.start('kitty-scrollback: Neovim version 0.10+')
end
local nvim_version = 'NVIM ' .. tostring(vim.version())
if vim.fn.has(version) > 0 then
Expand Down Expand Up @@ -281,7 +281,7 @@ end

M.check = function()
if
M.check_nvim_version('nvim-0.9') -- always check first to avoid undefined calls in versions < 0.10
M.check_nvim_version('nvim-0.10') -- always check first to avoid undefined calls in versions < 0.10
and check_kitty_scrollback_nvim_version()
and check_kitty_remote_control()
and check_has_kitty_data()
Expand Down Expand Up @@ -318,7 +318,7 @@ M.advice = function()
end
return {
nvim_version = {
'Neovim version 0.9 or greater is required to work with kitty-scrollback.nvim',
'Neovim version 0.10 or greater is required to work with kitty-scrollback.nvim',
},
kitty_version = {
'Kitty version 0.29 or greater is required to work with kitty-scrollback.nvim',
Expand Down
11 changes: 1 addition & 10 deletions lua/kitty-scrollback/launch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ M.setup = function(kitty_data_str)
vim.cmd.checkhealth('kitty-scrollback')
return
end
if not ksb_health.check_nvim_version('nvim-0.9', true) then
if not ksb_health.check_nvim_version('nvim-0.10', true) then
local prompt_msg = 'kitty-scrollback.nvim: Fatal error, on version NVIM '
.. tostring(vim.version())
.. '. '
Expand All @@ -287,15 +287,6 @@ M.setup = function(kitty_data_str)
ksb_kitty_cmds.signal_term_to_kitty_child_process(true)
end
end
if not ksb_health.check_nvim_version('nvim-0.10', true) then
-- assume nvim-0.9 and vendor required nvim-0.10 dependencies
if not vim.uv then
vim.uv = vim.loop
end
if not vim.system then
vim.system = ksb_util.vendored_vim_system
end
end
if not ksb_health.check_kitty_version(true) then
local prompt_msg = 'kitty-scrollback.nvim: Fatal error, on version kitty '
.. table.concat(p.kitty_data.kitty_version, '.')
Expand Down
9 changes: 0 additions & 9 deletions lua/kitty-scrollback/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,4 @@ M.restore_and_redraw = function()
vim.cmd.redraw()
end

-- copied from _editor.lua
M.vendored_vim_system = function(cmd, o, on_exit)
if type(o) == 'function' then
on_exit = o
o = nil
end
return require('kitty-scrollback.vendor._system').run(cmd, o, on_exit)
end

return M
5 changes: 0 additions & 5 deletions lua/kitty-scrollback/vendor/.luarc.json

This file was deleted.

3 changes: 0 additions & 3 deletions lua/kitty-scrollback/vendor/README.md

This file was deleted.

Loading

0 comments on commit b7a5a09

Please sign in to comment.