Compare commits
No commits in common. "d58ab508eb181ff6ca0f97ed19dc62af4c5329b0" and "646be7e30107e34021ce93cc0d0673fd51a1c50e" have entirely different histories.
d58ab508eb
...
646be7e301
@ -1,6 +1,3 @@
|
|||||||
[main]
|
[main]
|
||||||
font=MesloLGS NF:size=10, Noto Color Emoji:size=10,Source Code Pro:size=10,monofur:size=10,
|
font=MesloLGS NF:size=10, Noto Color Emoji:size=10,Source Code Pro:size=10,monofur:size=10,
|
||||||
initial-window-size-chars=220x60
|
initial-window-size-chars=220x60
|
||||||
|
|
||||||
[key-bindings]
|
|
||||||
fullscreen=F11
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"Zeioth/hot-reload.nvim",
|
|
||||||
dependencies = "nvim-lua/plenary.nvim",
|
|
||||||
event = "BufEnter",
|
|
||||||
opts = {}
|
|
||||||
}
|
|
||||||
}
|
|
@ -475,8 +475,8 @@ return {
|
|||||||
|
|
||||||
-- 自行加入的
|
-- 自行加入的
|
||||||
source_selector = {
|
source_selector = {
|
||||||
winbar = true,
|
winbar = false,
|
||||||
statusline = true
|
statusline = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
@ -502,17 +502,6 @@ return {
|
|||||||
|
|
||||||
require("neo-tree").setup(opts)
|
require("neo-tree").setup(opts)
|
||||||
|
|
||||||
-- 打Patch:暫時解決winbar與nui.nvim 不完全兼容錯誤
|
|
||||||
-- [Neo-tree ERROR] debounce neo-tree-follow error: ~/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:261: Invalid 'window': Expected Lua number
|
|
||||||
local Tree = require("nui.tree")
|
|
||||||
local old_set_win = Tree.set_win
|
|
||||||
Tree.set_win = function(self, window)
|
|
||||||
if type(window) ~= "number" or not vim.api.nvim_win_is_valid(window) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return old_set_win(self, window)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<leader>e", "<Cmd>Neotree reveal<CR>")
|
-- vim.keymap.set("n", "<leader>e", "<Cmd>Neotree reveal<CR>")
|
||||||
|
|
||||||
-- 自動命令:啟動時自動顯示 Neo-tree
|
-- 自動命令:啟動時自動顯示 Neo-tree
|
||||||
|
@ -1,243 +1,171 @@
|
|||||||
-- if true then return {} end -- 先停用
|
-- if true then return {} end -- 先停用
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
'dstein64/nvim-scrollview',
|
||||||
'dstein64/nvim-scrollview',
|
config = function()
|
||||||
opts = {
|
require('scrollview').setup({
|
||||||
current_only = true,
|
current_only = true,
|
||||||
-- base = 'buffer',
|
-- base = 'buffer',
|
||||||
-- column = 80, -- 註解掉這行,讓它自己決定位置
|
-- column = 80, -- 註解掉這行,讓它自己決定位置
|
||||||
-- excluded_filetypes = { 'neo-tree', 'help' },
|
-- excluded_filetypes = { 'neo-tree', 'help' },
|
||||||
signs_on_startup = { 'all' },
|
signs_on_startup = { 'all' },
|
||||||
diagnostics_severities = { vim.diagnostic.severity.ERROR },
|
diagnostics_severities = { vim.diagnostic.severity.ERROR },
|
||||||
},
|
})
|
||||||
config = function(_, opts)
|
end,
|
||||||
require('scrollview').setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- {
|
|
||||||
-- 'wfxr/minimap.vim',
|
|
||||||
-- config = function()
|
|
||||||
-- vim.g.minimap_width = 10
|
|
||||||
-- vim.g.minimap_auto_start = 1
|
|
||||||
-- vim.g.minimap_auto_start_win_enter = 1
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
-- {
|
|
||||||
-- 'gorbit99/codewindow.nvim',
|
|
||||||
-- config = function()
|
|
||||||
-- local codewindow = require('codewindow')
|
|
||||||
-- codewindow.setup()
|
|
||||||
-- codewindow.apply_default_keybinds()
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
---@module "neominimap.config.meta"
|
|
||||||
{
|
|
||||||
"Isrothy/neominimap.nvim",
|
|
||||||
version = "v3.x.x",
|
|
||||||
lazy = false, -- NOTE: NO NEED to Lazy load
|
|
||||||
-- Optional. You can alse set your own keybindings
|
|
||||||
keys = {
|
|
||||||
-- Global Minimap Controls
|
|
||||||
{ "<leader>nm", "<cmd>Neominimap Toggle<cr>", desc = "Toggle global minimap" },
|
|
||||||
{ "<leader>no", "<cmd>Neominimap Enable<cr>", desc = "Enable global minimap" },
|
|
||||||
{ "<leader>nc", "<cmd>Neominimap Disable<cr>", desc = "Disable global minimap" },
|
|
||||||
{ "<leader>nr", "<cmd>Neominimap Refresh<cr>", desc = "Refresh global minimap" },
|
|
||||||
|
|
||||||
-- Window-Specific Minimap Controls
|
|
||||||
{ "<leader>nwt", "<cmd>Neominimap WinToggle<cr>", desc = "Toggle minimap for current window" },
|
|
||||||
{ "<leader>nwr", "<cmd>Neominimap WinRefresh<cr>", desc = "Refresh minimap for current window" },
|
|
||||||
{ "<leader>nwo", "<cmd>Neominimap WinEnable<cr>", desc = "Enable minimap for current window" },
|
|
||||||
{ "<leader>nwc", "<cmd>Neominimap WinDisable<cr>", desc = "Disable minimap for current window" },
|
|
||||||
|
|
||||||
-- Tab-Specific Minimap Controls
|
|
||||||
{ "<leader>ntt", "<cmd>Neominimap TabToggle<cr>", desc = "Toggle minimap for current tab" },
|
|
||||||
{ "<leader>ntr", "<cmd>Neominimap TabRefresh<cr>", desc = "Refresh minimap for current tab" },
|
|
||||||
{ "<leader>nto", "<cmd>Neominimap TabEnable<cr>", desc = "Enable minimap for current tab" },
|
|
||||||
{ "<leader>ntc", "<cmd>Neominimap TabDisable<cr>", desc = "Disable minimap for current tab" },
|
|
||||||
|
|
||||||
-- Buffer-Specific Minimap Controls
|
|
||||||
{ "<leader>nbt", "<cmd>Neominimap BufToggle<cr>", desc = "Toggle minimap for current buffer" },
|
|
||||||
{ "<leader>nbr", "<cmd>Neominimap BufRefresh<cr>", desc = "Refresh minimap for current buffer" },
|
|
||||||
{ "<leader>nbo", "<cmd>Neominimap BufEnable<cr>", desc = "Enable minimap for current buffer" },
|
|
||||||
{ "<leader>nbc", "<cmd>Neominimap BufDisable<cr>", desc = "Disable minimap for current buffer" },
|
|
||||||
|
|
||||||
---Focus Controls
|
|
||||||
{ "<leader>nf", "<cmd>Neominimap Focus<cr>", desc = "Focus on minimap" },
|
|
||||||
{ "<leader>nu", "<cmd>Neominimap Unfocus<cr>", desc = "Unfocus minimap" },
|
|
||||||
{ "<leader>ns", "<cmd>Neominimap ToggleFocus<cr>", desc = "Switch focus on minimap" },
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
-- The following options are recommended when layout == "float"
|
|
||||||
vim.opt.wrap = false
|
|
||||||
vim.opt.sidescrolloff = 36 -- Set a large value
|
|
||||||
|
|
||||||
--- Put your configuration here
|
|
||||||
---@type Neominimap.UserConfig
|
|
||||||
vim.g.neominimap = {
|
|
||||||
auto_enable = true,
|
|
||||||
|
|
||||||
click = {
|
|
||||||
-- Enable mouse click on the minimap
|
|
||||||
enabled = true, ---@type boolean
|
|
||||||
-- Automatically switch focus to the minimap when clicked
|
|
||||||
auto_switch_focus = true, ---@type boolean
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
-- { "petertriho/nvim-scrollbar",
|
|
||||||
-- cond = true,
|
|
||||||
-- config = function()
|
|
||||||
-- require("scrollbar").setup({
|
|
||||||
-- show = true,
|
|
||||||
-- show_in_active_only = false,
|
|
||||||
-- set_highlights = true,
|
|
||||||
-- folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this
|
|
||||||
-- max_lines = false, -- disables if no. of lines in buffer exceeds this
|
|
||||||
-- hide_if_all_visible = false, -- Hides everything if all lines are visible
|
|
||||||
-- throttle_ms = 100,
|
|
||||||
-- handle = {
|
|
||||||
-- text = " ",
|
|
||||||
-- blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30.
|
|
||||||
-- color = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "CursorColumn",
|
|
||||||
-- hide_if_all_visible = true, -- Hides handle if all lines are visible
|
|
||||||
-- },
|
|
||||||
-- marks = {
|
|
||||||
-- Cursor = {
|
|
||||||
-- text = "•",
|
|
||||||
-- priority = 0,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "Normal",
|
|
||||||
-- },
|
|
||||||
-- Search = {
|
|
||||||
-- text = { "-", "=" },
|
|
||||||
-- priority = 1,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "Search",
|
|
||||||
-- },
|
|
||||||
-- Error = {
|
|
||||||
-- text = { "-", "=" },
|
|
||||||
-- priority = 2,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "DiagnosticVirtualTextError",
|
|
||||||
-- },
|
|
||||||
-- Warn = {
|
|
||||||
-- text = { "-", "=" },
|
|
||||||
-- priority = 3,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "DiagnosticVirtualTextWarn",
|
|
||||||
-- },
|
|
||||||
-- Info = {
|
|
||||||
-- text = { "-", "=" },
|
|
||||||
-- priority = 4,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "DiagnosticVirtualTextInfo",
|
|
||||||
-- },
|
|
||||||
-- Hint = {
|
|
||||||
-- text = { "-", "=" },
|
|
||||||
-- priority = 5,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "DiagnosticVirtualTextHint",
|
|
||||||
-- },
|
|
||||||
-- Misc = {
|
|
||||||
-- text = { "-", "=" },
|
|
||||||
-- priority = 6,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "Normal",
|
|
||||||
-- },
|
|
||||||
-- GitAdd = {
|
|
||||||
-- text = "┆",
|
|
||||||
-- priority = 7,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "GitSignsAdd",
|
|
||||||
-- },
|
|
||||||
-- GitChange = {
|
|
||||||
-- text = "┆",
|
|
||||||
-- priority = 7,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "GitSignsChange",
|
|
||||||
-- },
|
|
||||||
-- GitDelete = {
|
|
||||||
-- text = "▁",
|
|
||||||
-- priority = 7,
|
|
||||||
-- gui = nil,
|
|
||||||
-- color = nil,
|
|
||||||
-- cterm = nil,
|
|
||||||
-- color_nr = nil, -- cterm
|
|
||||||
-- highlight = "GitSignsDelete",
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- excluded_buftypes = {
|
|
||||||
-- "terminal",
|
|
||||||
-- },
|
|
||||||
-- excluded_filetypes = {
|
|
||||||
-- "dropbar_menu",
|
|
||||||
-- "dropbar_menu_fzf",
|
|
||||||
-- "DressingInput",
|
|
||||||
-- "cmp_docs",
|
|
||||||
-- "cmp_menu",
|
|
||||||
-- "noice",
|
|
||||||
-- "prompt",
|
|
||||||
-- "TelescopePrompt",
|
|
||||||
-- },
|
|
||||||
-- autocmd = {
|
|
||||||
-- render = {
|
|
||||||
-- "BufWinEnter",
|
|
||||||
-- "TabEnter",
|
|
||||||
-- "TermEnter",
|
|
||||||
-- "WinEnter",
|
|
||||||
-- "CmdwinLeave",
|
|
||||||
-- "TextChanged",
|
|
||||||
-- "VimResized",
|
|
||||||
-- "WinScrolled",
|
|
||||||
-- },
|
|
||||||
-- clear = {
|
|
||||||
-- "BufWinLeave",
|
|
||||||
-- "TabLeave",
|
|
||||||
-- "TermLeave",
|
|
||||||
-- "WinLeave",
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- handlers = {
|
|
||||||
-- cursor = true,
|
|
||||||
-- diagnostic = true,
|
|
||||||
-- gitsigns = false, -- Requires gitsigns
|
|
||||||
-- handle = true,
|
|
||||||
-- search = false, -- Requires hlslens
|
|
||||||
-- ale = false, -- Requires ALE
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
-- },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- return {
|
||||||
|
-- { "petertriho/nvim-scrollbar",
|
||||||
|
-- cond = true,
|
||||||
|
-- config = function()
|
||||||
|
-- require("scrollbar").setup({
|
||||||
|
-- show = true,
|
||||||
|
-- show_in_active_only = false,
|
||||||
|
-- set_highlights = true,
|
||||||
|
-- folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this
|
||||||
|
-- max_lines = false, -- disables if no. of lines in buffer exceeds this
|
||||||
|
-- hide_if_all_visible = false, -- Hides everything if all lines are visible
|
||||||
|
-- throttle_ms = 100,
|
||||||
|
-- handle = {
|
||||||
|
-- text = " ",
|
||||||
|
-- blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30.
|
||||||
|
-- color = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "CursorColumn",
|
||||||
|
-- hide_if_all_visible = true, -- Hides handle if all lines are visible
|
||||||
|
-- },
|
||||||
|
-- marks = {
|
||||||
|
-- Cursor = {
|
||||||
|
-- text = "•",
|
||||||
|
-- priority = 0,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "Normal",
|
||||||
|
-- },
|
||||||
|
-- Search = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 1,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "Search",
|
||||||
|
-- },
|
||||||
|
-- Error = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 2,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextError",
|
||||||
|
-- },
|
||||||
|
-- Warn = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 3,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextWarn",
|
||||||
|
-- },
|
||||||
|
-- Info = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 4,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextInfo",
|
||||||
|
-- },
|
||||||
|
-- Hint = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 5,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextHint",
|
||||||
|
-- },
|
||||||
|
-- Misc = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 6,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "Normal",
|
||||||
|
-- },
|
||||||
|
-- GitAdd = {
|
||||||
|
-- text = "┆",
|
||||||
|
-- priority = 7,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "GitSignsAdd",
|
||||||
|
-- },
|
||||||
|
-- GitChange = {
|
||||||
|
-- text = "┆",
|
||||||
|
-- priority = 7,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "GitSignsChange",
|
||||||
|
-- },
|
||||||
|
-- GitDelete = {
|
||||||
|
-- text = "▁",
|
||||||
|
-- priority = 7,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "GitSignsDelete",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- excluded_buftypes = {
|
||||||
|
-- "terminal",
|
||||||
|
-- },
|
||||||
|
-- excluded_filetypes = {
|
||||||
|
-- "dropbar_menu",
|
||||||
|
-- "dropbar_menu_fzf",
|
||||||
|
-- "DressingInput",
|
||||||
|
-- "cmp_docs",
|
||||||
|
-- "cmp_menu",
|
||||||
|
-- "noice",
|
||||||
|
-- "prompt",
|
||||||
|
-- "TelescopePrompt",
|
||||||
|
-- },
|
||||||
|
-- autocmd = {
|
||||||
|
-- render = {
|
||||||
|
-- "BufWinEnter",
|
||||||
|
-- "TabEnter",
|
||||||
|
-- "TermEnter",
|
||||||
|
-- "WinEnter",
|
||||||
|
-- "CmdwinLeave",
|
||||||
|
-- "TextChanged",
|
||||||
|
-- "VimResized",
|
||||||
|
-- "WinScrolled",
|
||||||
|
-- },
|
||||||
|
-- clear = {
|
||||||
|
-- "BufWinLeave",
|
||||||
|
-- "TabLeave",
|
||||||
|
-- "TermLeave",
|
||||||
|
-- "WinLeave",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- handlers = {
|
||||||
|
-- cursor = true,
|
||||||
|
-- diagnostic = true,
|
||||||
|
-- gitsigns = false, -- Requires gitsigns
|
||||||
|
-- handle = true,
|
||||||
|
-- search = false, -- Requires hlslens
|
||||||
|
-- ale = false, -- Requires ALE
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
@ -2,15 +2,3 @@ vim.g.lsp_position_encoding = 'utf-16'
|
|||||||
require("lsp.config.mason")
|
require("lsp.config.mason")
|
||||||
require("lsp.config.lspconfig")
|
require("lsp.config.lspconfig")
|
||||||
require("lsp.config.cmp")
|
require("lsp.config.cmp")
|
||||||
|
|
||||||
-- 處理nvim一直都會跳警告:
|
|
||||||
-- position_encoding param is required in vim.lsp.util.make_position_params. Defaulting to position encoding of the first client.
|
|
||||||
-- 目前無法處理,需要等待大多數來自 plugin 尚未更新以配合 Neovim 0.10+的套件修正,先手動抑制
|
|
||||||
-- 臨時抑制這類 LSP 訊息
|
|
||||||
vim.notify = function(msg, log_level, _)
|
|
||||||
if msg:match("position_encoding param is required") then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
vim.api.nvim_notify(msg, log_level, {})
|
|
||||||
end
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user