- Add init.lua entry point - Add lua/ modules: options, keymaps, autocmds, usercmds, pack, treesitter, lsp - Add .gitignore - Add nvim-pack-lock.json for plugin version locking Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
47 lines
1.0 KiB
Lua
47 lines
1.0 KiB
Lua
vim.g.netrw_banner = 0
|
|
|
|
vim.opt.nu = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.cursorline = true
|
|
vim.opt.cursorlineopt = "both"
|
|
vim.opt.autoread = true
|
|
|
|
vim.opt.tabstop = 4
|
|
vim.opt.softtabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.expandtab = true
|
|
|
|
vim.opt.smartindent = true
|
|
vim.opt.inccommand = "split"
|
|
|
|
vim.opt.splitbelow = true
|
|
vim.opt.splitright = true
|
|
|
|
vim.opt.ignorecase = true
|
|
vim.opt.smartcase = true
|
|
vim.opt.laststatus = 3
|
|
|
|
vim.opt.swapfile = false
|
|
vim.opt.backup = false
|
|
vim.opt.undodir = vim.fn.stdpath("data") .. "/undodir"
|
|
vim.opt.undofile = true
|
|
|
|
vim.opt.completeopt = "menuone,noselect,fuzzy,nosort"
|
|
vim.opt.shortmess:append("c")
|
|
vim.opt.clipboard:append("unnamedplus")
|
|
vim.opt.isfname:append("@-@")
|
|
vim.opt.guicursor = ""
|
|
vim.opt.scrolloff = 8
|
|
|
|
vim.opt.colorcolumn = "0"
|
|
vim.opt.signcolumn = "yes"
|
|
|
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
desc = "Highlight when yanking (copying) text",
|
|
callback = function()
|
|
vim.hl.on_yank()
|
|
end,
|
|
})
|
|
|
|
vim.opt.foldlevel = 99 -- 打开文件时默认展开所有折叠
|