Compare commits
2 Commits
77540d4eb5
...
2f0535afce
Author | SHA1 | Date | |
---|---|---|---|
2f0535afce | |||
b44fed76cc |
@ -28,7 +28,7 @@ brews = [
|
|||||||
|
|
||||||
casks = [
|
casks = [
|
||||||
'iterm2',
|
'iterm2',
|
||||||
'neovide',
|
# 'neovide',
|
||||||
# 'alacritty',
|
# 'alacritty',
|
||||||
# 'macvim',
|
# 'macvim',
|
||||||
]
|
]
|
||||||
@ -113,7 +113,7 @@ pacman_nogui = [
|
|||||||
]
|
]
|
||||||
pacman_gui = [
|
pacman_gui = [
|
||||||
'gvim',
|
'gvim',
|
||||||
'neovide',
|
# 'neovide',
|
||||||
]
|
]
|
||||||
|
|
||||||
aur = [
|
aur = [
|
||||||
@ -167,6 +167,7 @@ pacman_nogui = [
|
|||||||
]
|
]
|
||||||
pacman_gui = [
|
pacman_gui = [
|
||||||
'gvim',
|
'gvim',
|
||||||
|
# 'neovide',
|
||||||
'foot',
|
'foot',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
-- { "psliwka/vim-smoothie" },
|
-- { "psliwka/vim-smoothie" },
|
||||||
{ "karb94/neoscroll.nvim",
|
{ "karb94/neoscroll.nvim",
|
||||||
cond = require("tools.gui").is_enable_sixel(),
|
cond = require("tools.gui").is_enable_smoothscroll(),
|
||||||
opts = {
|
opts = {
|
||||||
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
|
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
|
||||||
'<C-u>', '<C-d>',
|
'<C-u>', '<C-d>',
|
||||||
|
@ -16,6 +16,17 @@ function M.is_graphical()
|
|||||||
return term_program or display or wayland and true or false
|
return term_program or display or wayland and true or false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.is_enable_smoothscroll()
|
||||||
|
if vim.fn.has("glrnvim_gui") == 1 then
|
||||||
|
return true
|
||||||
|
-- 如果是在 GUI(如 NeoVide、Goneovim)中,則不啟用插件
|
||||||
|
elseif vim.g.neovide or vim.fn.has("goneovim") == 1 then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- 當前終端機環境是否在圖形環境裡面,並不使用專用GUI APP(NeoVide)
|
--- 當前終端機環境是否在圖形環境裡面,並不使用專用GUI APP(NeoVide)
|
||||||
--- @return boolean is_enable_sixel
|
--- @return boolean is_enable_sixel
|
||||||
function M.is_enable_sixel()
|
function M.is_enable_sixel()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user