feat nvim: listchars & o-plugin framework
This commit is contained in:
parent
9e351f31d0
commit
fa9018d3b5
@ -24,8 +24,11 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
-- Setup lazy.nvim
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- import your plugins
|
-- 自動載入 plugins 資料夾中的所有插件
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
|
|
||||||
|
-- 手動引入 o-plugins 資料夾中的插件
|
||||||
|
-- require("o-plugins.nvim-listchars"),
|
||||||
},
|
},
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
-- colorscheme that will be used when installing plugins.
|
-- colorscheme that will be used when installing plugins.
|
||||||
|
14
dot_config/nvim/lua/config/listchars.lua
Normal file
14
dot_config/nvim/lua/config/listchars.lua
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-- vim.opt.listchars = {
|
||||||
|
-- eol = "¬",
|
||||||
|
-- tab = "→→",
|
||||||
|
-- trail = ".",
|
||||||
|
-- extends = ">",
|
||||||
|
-- precedes = "<"
|
||||||
|
-- }
|
||||||
|
|
||||||
|
vim.opt.listchars = {
|
||||||
|
trail = "-",
|
||||||
|
eol = "↲",
|
||||||
|
tab = "» ",
|
||||||
|
space = "·",
|
||||||
|
}
|
@ -19,12 +19,7 @@ vim.opt.expandtab = true -- 使用空格代替tab
|
|||||||
vim.opt.termguicolors = true -- 支持真彩色
|
vim.opt.termguicolors = true -- 支持真彩色
|
||||||
vim.opt.colorcolumn = "80,120" -- 顯示編輯器建議寬度
|
vim.opt.colorcolumn = "80,120" -- 顯示編輯器建議寬度
|
||||||
vim.opt.scrolloff = 3 -- 捲動時保留 n 行彈性
|
vim.opt.scrolloff = 3 -- 捲動時保留 n 行彈性
|
||||||
vim.opt.listchars = {
|
require("config.listchars") -- 顯示行尾符號
|
||||||
eol = "¬",
|
|
||||||
tab = "→→",
|
|
||||||
trail = ".",
|
|
||||||
extends = ">",
|
|
||||||
precedes = "<" }
|
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
|
|
||||||
-- 整行移動的快速鍵
|
-- 整行移動的快速鍵
|
||||||
|
20
dot_config/nvim/lua/o-plugins/nvim-listchars.lua
Normal file
20
dot_config/nvim/lua/o-plugins/nvim-listchars.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"fraso-dev/nvim-listchars",
|
||||||
|
opts = true,
|
||||||
|
event = "BufEnter",
|
||||||
|
config = function()
|
||||||
|
require("nvim-listchars").setup({
|
||||||
|
save_state = true, -- If enabled, save toggled state in a cache file. Will overwrite current `vim.opt.list` value.
|
||||||
|
listchars = { -- `listchars` to be displayed. See available options by running `:help listchars`
|
||||||
|
tab = "> ",
|
||||||
|
trail = "-",
|
||||||
|
nbsp = "+",
|
||||||
|
},
|
||||||
|
notifications = true, -- Enable or disable listchars notifications
|
||||||
|
exclude_filetypes = {}, -- List of filetypes where `listchars` is disabled
|
||||||
|
lighten_step = 5, -- Amount to add/remove from base color
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user