Compare commits
6 Commits
0f5bf1cd91
...
afeac1bb77
Author | SHA1 | Date | |
---|---|---|---|
afeac1bb77 | |||
d313a3e650 | |||
ac1235e186 | |||
e8071d5545 | |||
d8768c6363 | |||
9240f60445 |
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
|
|
||||||
"image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" },
|
|
||||||
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
|
|
||||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "8d5b0b568517935d3c84f257f272ef004d9f5a59" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "3b308861a8d7d7bfbe9be51d52e54dcfd9fe3d38" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "50b5b06bff13a9b4eab946de7c7033649a6618a1" },
|
|
||||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
|
||||||
"sixelview.nvim": { "branch": "master", "commit": "ebfdcb42adbe69ae08dde4d25b56651103e065ab" },
|
|
||||||
"tabby.nvim": { "branch": "main", "commit": "6362aa9595428cefbb6556c05390e8444d1bcd12" }
|
|
||||||
}
|
|
@ -15,14 +15,15 @@ Yuan Neovim 備忘
|
|||||||
* move cursor: <window>(方向鍵)
|
* move cursor: <window>(方向鍵)
|
||||||
|
|
||||||
### 擴充自行設定的快速鍵
|
### 擴充自行設定的快速鍵
|
||||||
|
* `<F8>`: NeoTree: 查看已經開啟的檔案
|
||||||
* `<F9>`: NeoTree
|
* `<F9>`: NeoTree
|
||||||
* `<F10>`: git status
|
* `<F10>`: git status
|
||||||
* `<leader>fT`: 浮動NeoTree
|
* `<leader>fT`: 浮動NeoTree
|
||||||
* `<leader>fB`: 已開啟的檔案
|
* `<leader>fB`: 已開啟的檔案
|
||||||
|
|
||||||
#### 預計設定
|
#### 預計設定
|
||||||
* <F8> 看看你設定了哪些變數、函數,也可以快速跳轉
|
|
||||||
* <F6> 可以回朔到開啟檔案以來的任何歷史,還會標出修改的地方
|
* <F6> 可以回朔到開啟檔案以來的任何歷史,還會標出修改的地方
|
||||||
|
* <F7> 看看你設定了哪些變數、函數,也可以快速跳轉
|
||||||
|
|
||||||
### 編輯習慣(已經覆寫)
|
### 編輯習慣(已經覆寫)
|
||||||
* shift+方向鍵(傳統): 選取文字(傳統習慣)
|
* shift+方向鍵(傳統): 選取文字(傳統習慣)
|
@ -5,6 +5,9 @@ local map = vim.keymap.set
|
|||||||
-- Ctrl+Enter 鍵會被視為 Ctrl+M (對策: 多增加相同功能的Ctrl+Alt+Enter)
|
-- Ctrl+Enter 鍵會被視為 Ctrl+M (對策: 多增加相同功能的Ctrl+Alt+Enter)
|
||||||
-- <A-S-CR>
|
-- <A-S-CR>
|
||||||
|
|
||||||
|
-- Ctrl+s 儲存
|
||||||
|
map("n", "<C-s>", "<cmd>write<CR>", { noremap = true, silent = true, desc = "Save file" })
|
||||||
|
map("i", "<C-s>", "<Esc><cmd>write<CR>a", { noremap = true, silent = true, desc = "Save file in insert mode" })
|
||||||
|
|
||||||
-- Tab切換
|
-- Tab切換
|
||||||
-- 現在由barbar控制,先停用
|
-- 現在由barbar控制,先停用
|
@ -40,10 +40,13 @@ require("lazy").setup({
|
|||||||
-- },
|
-- },
|
||||||
-- 自動載入 plugins 資料夾中的所有插件
|
-- 自動載入 plugins 資料夾中的所有插件
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
{ import = "plugins.colorscheme.nightfox" }, -- 自訂配色
|
{ import = "plugins.themes.nightfox" }, -- 自訂配色
|
||||||
-- { import = "plugins.colorscheme.github-theme" }, -- 自訂配色
|
-- { import = "plugins.themes.github-theme" }, -- 自訂配色
|
||||||
-- { import = "plugins.colorscheme.onedark" }, -- 自訂配色
|
-- { import = "plugins.themes.onedark" }, -- 自訂配色
|
||||||
{ import = "plugins.tab.barbar" }, -- 目前只有barbar處理Buffer是最好的
|
|
||||||
|
{ import = "plugins.components.buffer.barbar" }, -- 目前只有barbar處理Buffer是最好的
|
||||||
|
{ import = "plugins.components" },
|
||||||
|
{ import = "plugins.ui" },
|
||||||
|
|
||||||
-- 手動引入 o-plugins 資料夾中的插件
|
-- 手動引入 o-plugins 資料夾中的插件
|
||||||
-- require("o-plugins.nvim-listchars"),
|
-- require("o-plugins.nvim-listchars"),
|
@ -64,6 +64,8 @@ return {
|
|||||||
end,
|
end,
|
||||||
desc = "NeoTree"
|
desc = "NeoTree"
|
||||||
},
|
},
|
||||||
|
{ "<F8>", "<cmd>Neotree toggle buffers<cr>", desc = "NeoTree Buffers" },
|
||||||
|
|
||||||
{ "<leader>e", "<Cmd>Neotree reveal<CR>" },
|
{ "<leader>e", "<Cmd>Neotree reveal<CR>" },
|
||||||
{ "<leader>ft", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
|
{ "<leader>ft", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
|
||||||
{ "<leader>fT", "<cmd>Neotree float<cr>", desc = "NeoTree Float" },
|
{ "<leader>fT", "<cmd>Neotree float<cr>", desc = "NeoTree Float" },
|
28
dot_config/nvim/exact_lua/exact_plugins/exact_ui/help.lua
Normal file
28
dot_config/nvim/exact_lua/exact_plugins/exact_ui/help.lua
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>?",
|
||||||
|
function()
|
||||||
|
require("which-key").show({ global = false })
|
||||||
|
end,
|
||||||
|
desc = "Buffer Local Keymaps (which-key)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
|
local wk = require("which-key")
|
||||||
|
-- 快捷鍵在這裡定義
|
||||||
|
wk.setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
@ -6,6 +6,24 @@ return {
|
|||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function()
|
opts = function()
|
||||||
|
|
||||||
|
-- 選擇計數格式
|
||||||
|
local function selectionCount()
|
||||||
|
local mode = vim.fn.mode()
|
||||||
|
if not mode:find("[Vv]") then return "" end -- 僅在 Visual 模式下顯示
|
||||||
|
local starts = vim.fn.line("v")
|
||||||
|
local ends = vim.fn.line(".")
|
||||||
|
local lines = math.abs(ends - starts) + 1
|
||||||
|
local chars = vim.fn.wordcount().visual_chars or 0
|
||||||
|
return string.format("📏 %dL %dC", lines, chars)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 自定義 location 格式
|
||||||
|
local function customLocation()
|
||||||
|
local location = vim.api.nvim_eval_statusline("%l:%c", {}).str -- 獲取行和列
|
||||||
|
return "📍 " .. location -- 在字首添加 emoji
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
@ -32,13 +50,13 @@ return {
|
|||||||
lualine_c = {'filename'},
|
lualine_c = {'filename'},
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
lualine_y = {'progress'},
|
lualine_y = {'progress'},
|
||||||
lualine_z = {'location'}
|
lualine_z = {{ selectionCount }, { customLocation },}
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {'filename'},
|
lualine_c = {'filename'},
|
||||||
lualine_x = {'location'},
|
lualine_x = {{ customLocation }},
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {}
|
lualine_z = {}
|
||||||
},
|
},
|
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'mvllow/modes.nvim',
|
||||||
|
tag = 'v0.2.1',
|
||||||
|
config = function()
|
||||||
|
require('modes').setup()
|
||||||
|
end
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user