From 9d7300f426157efa9b69c07259fecc6ad869ccf1 Mon Sep 17 00:00:00 2001 From: "smith.hu" Date: Fri, 22 Sep 2023 14:07:53 +0800 Subject: [PATCH] [chang] my setting --- lua/config/options.lua | 54 +++++++++++++++++++++++++++++++++++++++- lua/plugins/neo-tree.lua | 1 + 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 3ea1454..2bcd6bf 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,3 +1,55 @@ -- Options are automatically loaded before lazy.nvim startup -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua --- Add any additional options here +-- Add any additional options hereby + +local opt = vim.opt + +opt.autowrite = false -- Enable auto write +opt.clipboard = "unnamedplus" -- Sync with system clipboard +opt.completeopt = "menu,menuone,noselect" +opt.conceallevel = 3 -- Hide * markup for bold and italic +opt.confirm = true -- Confirm to save changes before exiting modified buffer +opt.cursorline = true -- Enable highlighting of the current line +opt.expandtab = true -- Use spaces instead of tabs +opt.formatoptions = "jcroqlnt" -- tcqj +opt.grepformat = "%f:%l:%c:%m" +opt.grepprg = "rg --vimgrep" +opt.ignorecase = true -- Ignore case +opt.inccommand = "nosplit" -- preview incremental substitute +opt.laststatus = 0 +opt.list = true -- Show some invisible characters (tabs... +opt.mouse = "a" -- Enable mouse mode +opt.number = true -- Print line number +opt.pumblend = 10 -- Popup blend +opt.pumheight = 10 -- Maximum number of entries in a popup +opt.relativenumber = true -- Relative line numbers +opt.scrolloff = 4 -- Lines of context +opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } +opt.shiftround = true -- Round indent +opt.shiftwidth = 2 -- Size of an indent +opt.shortmess:append({ W = true, I = true, c = true }) +opt.showmode = false -- Dont show mode since we have a statusline +opt.sidescrolloff = 8 -- Columns of context +opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time +opt.smartcase = true -- Don't ignore case with capitals +opt.smartindent = true -- Insert indents automatically +opt.spelllang = { "en" } +opt.splitbelow = true -- Put new windows below current +opt.splitright = true -- Put new windows right of current +opt.tabstop = 2 -- Number of spaces tabs count for +opt.termguicolors = true -- True color support +opt.timeoutlen = 300 +opt.undofile = true +opt.undolevels = 10000 +opt.updatetime = 200 -- Save swap file and trigger CursorHold +opt.wildmode = "longest:full,full" -- Command-line completion mode +opt.winminwidth = 5 -- Minimum window width +opt.wrap = false -- Disable line wrap + +if vim.fn.has("nvim-0.9.0") == 1 then + opt.splitkeep = "screen" + opt.shortmess:append({ C = true }) +end + +-- Fix markdown indentation settings +vim.g.markdown_recommended_style = 0 diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 0508ac5..91f01c4 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -9,6 +9,7 @@ return { hide_gitignored = true, hide_by_name = { ".git", + "build", -- '.DS_Store', -- 'thumbs.db', },