Compare commits

..

No commits in common. "dea12712ff2b75cfa7b1f9e7077d36677623ada8" and "fb8ce6d2c774ed2406d14dc37b17edaaa678f37f" have entirely different histories.

2 changed files with 30 additions and 37 deletions

View File

@ -1,34 +1,31 @@
return { return {
{ {
"Freed-Wu/ime.nvim", "pysan3/fcitx5.nvim",
}, cond = function()
-- { return vim.fn.executable("fcitx5-remote") == 1
-- "pysan3/fcitx5.nvim", end,
-- cond = function() event = { "ModeChanged" }, -- 在模式改變時載入插件
-- return vim.fn.executable("fcitx5-remote") == 1 config = function()
-- end, require("fcitx5").setup() -- 初始化插件
-- event = { "ModeChanged" }, -- 在模式改變時載入插件
-- config = function() -- 以下是手動指定規則
-- require("fcitx5").setup() -- 初始化插件 -- local en = "keyboard-us"
-- -- local tw = "chewing"
-- -- 以下是手動指定規則
-- -- local en = "keyboard-us" -- require("fcitx5").setup({
-- -- local tw = "chewing" -- imname = {
-- -- norm = en,
-- -- require("fcitx5").setup({ -- ins = tw,
-- -- imname = { -- cmd = en,
-- -- norm = en,
-- -- ins = tw,
-- -- cmd = en,
-- -- },
-- -- remember_prior = false,
-- -- })
--
-- -- -- If you are using `jk` to escape, map 全角のjk.
-- -- vim.cmd([[
-- -- inoremap <silent> <Esc>
-- -- tnoremap <silent> <Esc>
-- -- ]])
-- end,
-- }, -- },
-- remember_prior = false,
-- })
-- -- If you are using `jk` to escape, map 全角のjk.
-- vim.cmd([[
-- inoremap <silent> <Esc>
-- tnoremap <silent> <Esc>
-- ]])
end,
},
} }

View File

@ -1,9 +1,7 @@
local servers = require("lsp.config.lsp_servers").lsp_servers local servers = require("lsp.config.lsp_servers").lsp_servers
local lspconfig = require("lspconfig")
-- Neovim 版本要在 0.10 以上才啟用 local lspconfig = require("lspconfig")
local is_nvim_010 = vim.fn.has("nvim-0.10") == 1 local capabilities = require("cmp_nvim_lsp").default_capabilities()
local capabilities = is_nvim_010 and require("cmp_nvim_lsp").default_capabilities() or nil
local on_attach = function(_, bufnr) local on_attach = function(_, bufnr)
local map = function(mode, lhs, rhs) local map = function(mode, lhs, rhs)
@ -20,9 +18,7 @@ end
for _, name in ipairs(servers) do for _, name in ipairs(servers) do
local ok, config = pcall(require, "lsp.servers." .. name) local ok, config = pcall(require, "lsp.servers." .. name)
if not ok then config = {} end if not ok then config = {} end
if capabilities then
config.capabilities = capabilities config.capabilities = capabilities
end
config.on_attach = on_attach config.on_attach = on_attach
lspconfig[name].setup(config) lspconfig[name].setup(config)
end end