diff --git a/init.vim b/init.vim index 3aa15fd..af19e37 100644 --- a/init.vim +++ b/init.vim @@ -1,23 +1,24 @@ " 基础设置 lua require('basic') -" 插件列表 +" Packer插件管理 lua require('plugins') " 快捷键映射 lua require('keybindings') -lua require('which-key-config') " 皮肤设置 " https://github.com/ellisonleao/gruvbox.nvim set background=dark " or light if you want light mode colorscheme gruvbox + " 插件配置 -lua require('nvim-treesitter-config') -lua require('telescope-config') -lua require('nvim-autopairs-config') -lua require('nvim-tree-config') -lua require('bufferline-config') -lua require('surround-config') -lua require('comment-config') -lua require('nvim-colorizer-config') +lua require('plugin-config/which-key') +lua require('plugin-config/nvim-treesitter') +lua require('plugin-config/telescope') +lua require('plugin-config/nvim-autopairs') +lua require('plugin-config/nvim-tree') +lua require('plugin-config/bufferline') +lua require('plugin-config/surround') +lua require('plugin-config/comment') +lua require('plugin-config/nvim-colorizer') " lsp lua require('lsp/nvim-cmp-config') diff --git a/lua/basic.lua b/lua/basic.lua index da99413..ce2b9ca 100644 --- a/lua/basic.lua +++ b/lua/basic.lua @@ -9,7 +9,7 @@ vim.wo.number = true vim.wo.relativenumber = true -- 高亮所在行 vim.wo.cursorline = true --- 显示指示列 +-- 显示左侧图标指示列 vim.wo.signcolumn = "yes" -- 右侧参考线 vim.wo.colorcolumn = "80" @@ -21,13 +21,13 @@ vim.o.shiftround = true -- >> << 时长度 vim.o.shiftwidth = 2 vim.bo.shiftwidth = 2 --- 新行对齐当前行,适合空格替代tab +-- 新行对齐当前行,空格替代tab vim.o.expandtab = true vim.bo.expandtab = true vim.o.autoindent = true vim.bo.autoindent = true vim.o.smartindent = true --- 搜索大小写不敏感,除非包含大小写 +-- 搜索大小写不敏感,除非包含大写 vim.o.ignorecase = true vim.o.smartcase = true -- 搜索不要高亮 @@ -61,7 +61,8 @@ vim.o.timeoutlen = 100 -- split window 从下边和右边出现 vim.o.splitbelow = true vim.o.splitright = true - +-- 自动补全不自动选中 +vim.g.completeopt = "menu,menuone,noselect,noinsert" --------------------------------------------- vim.o.background = "dark" vim.o.termguicolors = true diff --git a/lua/lsp/nvim-cmp-config.lua b/lua/lsp/nvim-cmp-config.lua index 0fe5c11..4330f66 100644 --- a/lua/lsp/nvim-cmp-config.lua +++ b/lua/lsp/nvim-cmp-config.lua @@ -1,5 +1,4 @@ -- https://gitub.com/hrsh7th/nvim-cmph -vim.g.completeopt = "menu,menuone,noselect,noinsert" -- copy from wiki -- https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings#vim-vsnip diff --git a/lua/bufferline-config.lua b/lua/plugin-config/bufferline.lua similarity index 100% rename from lua/bufferline-config.lua rename to lua/plugin-config/bufferline.lua diff --git a/lua/comment-config.lua b/lua/plugin-config/comment.lua similarity index 100% rename from lua/comment-config.lua rename to lua/plugin-config/comment.lua diff --git a/lua/nvim-autopairs-config.lua b/lua/plugin-config/nvim-autopairs.lua similarity index 100% rename from lua/nvim-autopairs-config.lua rename to lua/plugin-config/nvim-autopairs.lua diff --git a/lua/nvim-colorizer-config.lua b/lua/plugin-config/nvim-colorizer.lua similarity index 100% rename from lua/nvim-colorizer-config.lua rename to lua/plugin-config/nvim-colorizer.lua diff --git a/lua/nvim-tree-config.lua b/lua/plugin-config/nvim-tree.lua similarity index 100% rename from lua/nvim-tree-config.lua rename to lua/plugin-config/nvim-tree.lua diff --git a/lua/nvim-treesitter-config.lua b/lua/plugin-config/nvim-treesitter.lua similarity index 100% rename from lua/nvim-treesitter-config.lua rename to lua/plugin-config/nvim-treesitter.lua diff --git a/lua/surround-config.lua b/lua/plugin-config/surround.lua similarity index 100% rename from lua/surround-config.lua rename to lua/plugin-config/surround.lua diff --git a/lua/telescope-config.lua b/lua/plugin-config/telescope.lua similarity index 100% rename from lua/telescope-config.lua rename to lua/plugin-config/telescope.lua diff --git a/lua/which-key-config.lua b/lua/plugin-config/which-key.lua similarity index 100% rename from lua/which-key-config.lua rename to lua/plugin-config/which-key.lua