Compare commits
2 Commits
e60099033b
...
d220d0ffa2
| Author | SHA1 | Date | |
|---|---|---|---|
| d220d0ffa2 | |||
| 5869fb71b8 |
@ -45,6 +45,8 @@ apt = [
|
|||||||
'eza',
|
'eza',
|
||||||
'neovim',
|
'neovim',
|
||||||
'ueberzug',
|
'ueberzug',
|
||||||
|
'ripgrep',
|
||||||
|
'tree-sitter-cli',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Debian -----------------------------------------------------------------------
|
# Debian -----------------------------------------------------------------------
|
||||||
@ -65,6 +67,8 @@ apt = [
|
|||||||
'vim',
|
'vim',
|
||||||
'git',
|
'git',
|
||||||
'gcc',
|
'gcc',
|
||||||
|
'ripgrep',
|
||||||
|
'tree-sitter-cli',
|
||||||
]
|
]
|
||||||
|
|
||||||
apt_13 = [
|
apt_13 = [
|
||||||
@ -92,12 +96,15 @@ pacman = [
|
|||||||
'cmake',
|
'cmake',
|
||||||
'zsh',
|
'zsh',
|
||||||
'lsix',
|
'lsix',
|
||||||
|
'imagemagick',
|
||||||
'ueberzugpp',
|
'ueberzugpp',
|
||||||
'eza',
|
'eza',
|
||||||
'grc',
|
'grc',
|
||||||
'zellij',
|
'zellij',
|
||||||
'ranger',
|
'ranger',
|
||||||
'neovim',
|
'neovim',
|
||||||
|
'ripgrep',
|
||||||
|
'tree-sitter',
|
||||||
]
|
]
|
||||||
pacman_nogui = [
|
pacman_nogui = [
|
||||||
'vim',
|
'vim',
|
||||||
@ -135,6 +142,7 @@ pacman = [
|
|||||||
'cmake',
|
'cmake',
|
||||||
'zsh',
|
'zsh',
|
||||||
'lsix',
|
'lsix',
|
||||||
|
'imagemagick',
|
||||||
'ueberzugpp',
|
'ueberzugpp',
|
||||||
'eza',
|
'eza',
|
||||||
'grc',
|
'grc',
|
||||||
@ -146,6 +154,10 @@ pacman = [
|
|||||||
'nodejs',
|
'nodejs',
|
||||||
'npm',
|
'npm',
|
||||||
'jdk-openjdk',
|
'jdk-openjdk',
|
||||||
|
'ripgrep',
|
||||||
|
'tree-sitter',
|
||||||
|
'tree-sitter-bash',
|
||||||
|
'tree-sitter-cli',
|
||||||
]
|
]
|
||||||
pacman_nogui = [
|
pacman_nogui = [
|
||||||
'vim',
|
'vim',
|
||||||
|
|||||||
@ -63,6 +63,7 @@ return {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"eero-lehtinen/oklch-color-picker.nvim",
|
"eero-lehtinen/oklch-color-picker.nvim",
|
||||||
|
enabled = require("tools.gui").is_graphical(),
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
version = "*",
|
version = "*",
|
||||||
keys = {
|
keys = {
|
||||||
|
|||||||
@ -2,11 +2,13 @@ return {
|
|||||||
-- 測試狀況:Linux Fcitx5 Wayland 可用 / macOS 15 不可用
|
-- 測試狀況:Linux Fcitx5 Wayland 可用 / macOS 15 不可用
|
||||||
-- {
|
-- {
|
||||||
-- "Freed-Wu/ime.nvim",
|
-- "Freed-Wu/ime.nvim",
|
||||||
|
-- enabled = require("tools.gui").is_graphical(),
|
||||||
-- },
|
-- },
|
||||||
|
|
||||||
-- 測試狀況:Linux Fcitx5 Wayland 可用 / macOS 15 可用
|
-- 測試狀況:Linux Fcitx5 Wayland 可用 / macOS 15 可用
|
||||||
{
|
{
|
||||||
"keaising/im-select.nvim",
|
"keaising/im-select.nvim",
|
||||||
|
enabled = require("tools.gui").is_graphical(),
|
||||||
config = function()
|
config = function()
|
||||||
require("im_select").setup({})
|
require("im_select").setup({})
|
||||||
end,
|
end,
|
||||||
@ -15,17 +17,18 @@ return {
|
|||||||
-- 測試狀況:Linux Fcitx5 Wayland 可用
|
-- 測試狀況:Linux Fcitx5 Wayland 可用
|
||||||
-- {
|
-- {
|
||||||
-- "pysan3/fcitx5.nvim",
|
-- "pysan3/fcitx5.nvim",
|
||||||
|
-- enabled = require("tools.gui").is_graphical(),
|
||||||
-- cond = function()
|
-- cond = function()
|
||||||
-- return vim.fn.executable("fcitx5-remote") == 1
|
-- return vim.fn.executable("fcitx5-remote") == 1
|
||||||
-- end,
|
-- end,
|
||||||
-- event = { "ModeChanged" }, -- 在模式改變時載入插件
|
-- event = { "ModeChanged" }, -- 在模式改變時載入插件
|
||||||
-- config = function()
|
-- config = function()
|
||||||
-- require("fcitx5").setup() -- 初始化插件
|
-- require("fcitx5").setup() -- 初始化插件
|
||||||
--
|
|
||||||
-- -- 以下是手動指定規則
|
-- -- 以下是手動指定規則
|
||||||
-- -- local en = "keyboard-us"
|
-- -- local en = "keyboard-us"
|
||||||
-- -- local tw = "chewing"
|
-- -- local tw = "chewing"
|
||||||
--
|
|
||||||
-- -- require("fcitx5").setup({
|
-- -- require("fcitx5").setup({
|
||||||
-- -- imname = {
|
-- -- imname = {
|
||||||
-- -- norm = en,
|
-- -- norm = en,
|
||||||
@ -34,7 +37,7 @@ return {
|
|||||||
-- -- },
|
-- -- },
|
||||||
-- -- remember_prior = false,
|
-- -- remember_prior = false,
|
||||||
-- -- })
|
-- -- })
|
||||||
--
|
|
||||||
-- -- -- If you are using `jk` to escape, map 全角のjk.
|
-- -- -- If you are using `jk` to escape, map 全角のjk.
|
||||||
-- -- vim.cmd([[
|
-- -- vim.cmd([[
|
||||||
-- -- inoremap <silent> jk <Esc>
|
-- -- inoremap <silent> jk <Esc>
|
||||||
|
|||||||
19
dot_config/nvim/exact_lua/exact_tools/gui.lua
Normal file
19
dot_config/nvim/exact_lua/exact_tools/gui.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
--- 當前終端機環境是否在圖形環境裡面(Linux / macOS)
|
||||||
|
--- @return boolean is_gui
|
||||||
|
function M.is_graphical()
|
||||||
|
local env = vim.env
|
||||||
|
local term_program = env.TERM_PROGRAM -- macOS GUI 終端機常見
|
||||||
|
local display = env.DISPLAY -- Linux X11
|
||||||
|
local wayland = env.WAYLAND_DISPLAY -- Linux Wayland
|
||||||
|
local ssh = env.SSH_CONNECTION or env.SSH_CLIENT
|
||||||
|
|
||||||
|
if ssh then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return term_program or display or wayland and true or false
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Loading…
x
Reference in New Issue
Block a user