diff --git a/README.md b/README.md index 4143734..a970be1 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,13 @@ git clone ssh://git@git.zeekling.cn:222/linux/nvim-config.git ~/.config/nvim |---- |---- |----| | \bp | 跳转到上一个buffer | Buffer | | \bp | 跳转到下一个buffer | Buffer | -| \ds | 在左边显示目录数 | Dir | -| \dc | 关闭左边的目录树 | Dir | -| \mks | 预览Markdown | Markdown | -| \mkc | 关闭预览Markdown | Markdown | +| \dt | 在左边显示或者关闭目录数 | Dir | +| \mkp | 预览Markdown | Markdown | +| \ff | 格式化代码 | Format | +| \fsf | 在当前目录下面查找文件。支持模糊匹配 | Search | +| \fsg | 在当前目录下的文件查找字符串 | S earch | +| \fsb | 在打开的buffer中查找字符串 | Search | +| \ls | 显示Lazy概览页面 | Lazy | ## 帮助 diff --git a/lua/basic.lua b/lua/basic.lua index 2e1de69..44ffaf7 100644 --- a/lua/basic.lua +++ b/lua/basic.lua @@ -2,5 +2,8 @@ vim.g.mapleader = " " vim.o.background = "light" vim.cmd("set ignorecase") - - +vim.cmd("set tabstop=4") +vim.cmd("set cursorline") +vim.cmd("set softtabstop=4") +vim.cmd("set shiftwidth=4") +vim.cmd("set shiftround") diff --git a/lua/plugins/auto-complete.lua b/lua/plugins/auto-complete.lua index 67935b1..c9c153d 100644 --- a/lua/plugins/auto-complete.lua +++ b/lua/plugins/auto-complete.lua @@ -7,6 +7,8 @@ return { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip", + "neovim/nvim-lspconfig", + "hrsh7th/cmp-cmdline" }, config = function() local cmp = require("cmp") @@ -33,9 +35,6 @@ return { }) end, }, - { - "neovim/nvim-lspconfig", - }, { "nvim-treesitter/nvim-treesitter", config = function() @@ -60,6 +59,9 @@ return { "vim", "xml", "tcl", + "yaml", + "ini", + "comment", }, }) end, diff --git a/lua/plugins/help.lua b/lua/plugins/help.lua index dfd10ae..cb67ab6 100644 --- a/lua/plugins/help.lua +++ b/lua/plugins/help.lua @@ -17,18 +17,21 @@ return { }, d = { name = "dirTree", - s = { "NvimTreeToggle", "show dir tree on left" }, - c = { "NvimTreeClose", "hidden dir tree on left" }, + t = { "NvimTreeToggle", "show or hidden dir tree on left" }, }, f = { - name = "Search,Format", + name = "Search,Format Code", s = { name = "Search", - f = { "Telescope find_files", "Search file by name" }, - g = { "Telescope live_grep", "Grep in files" }, - b = { "Telescope buffers", "Grep in buffer" }, + f = { "Telescope find_files", "Search files" }, + g = { "Telescope live_grep", "Find string in files" }, + b = { "Telescope buffers", "Find string in buffer" }, }, - f = { "Format", "Code Format" }, + f = { "Format", "Format Code" }, + }, + g = { + name = "Git", + b = {"Gitsigns blame", "git blame"} }, l = { name = "Lazy", @@ -40,8 +43,7 @@ return { name = "Markdown", k = { name = "Markdown", - s = { "MarkdownPreview", "MarkdownPreview" }, - c = { "MarkdownPreviewStop", "MarkdownPreviewStop" }, + p = { "MarkdownPreview", "MarkdownPreview" }, }, }, s = { @@ -61,8 +63,8 @@ return { m = { "JavaTestRunCurrentMethod", "Run current Method" }, v = { "JavaTestViewLastReport", "View Last Report" }, }, - m = {"JavaRunnerRunMain", "Run main Method"}, - p = {"JavaProfile", "Run Java Profile"}, + m = { "JavaRunnerRunMain", "Run main Method" }, + p = { "JavaProfile", "Run Java Profile" }, }, v = { name = "version", diff --git a/lua/plugins/plugin-base.lua b/lua/plugins/plugin-base.lua index 03b7da2..21c22eb 100644 --- a/lua/plugins/plugin-base.lua +++ b/lua/plugins/plugin-base.lua @@ -117,7 +117,9 @@ return { { "nvim-lualine/lualine.nvim", config = function() - require("lualine").setup() + require("lualine").setup({ + theme = "vscode", + }) end, }, { @@ -138,7 +140,7 @@ return { tag = "v3.*", config = function() vim.g.termguicolors = true - require("bufferline").setup() + require("bufferline").setup({}) end, }, { diff --git a/lua/plugins/plugin-git.lua b/lua/plugins/plugin-git.lua index 321413a..fc280c7 100644 --- a/lua/plugins/plugin-git.lua +++ b/lua/plugins/plugin-git.lua @@ -2,4 +2,13 @@ return { { "tpope/vim-fugitive", }, + { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup({}) + end, + }, + { + "sindrets/diffview.nvim", + }, } diff --git a/lua/plugins/themes.lua b/lua/plugins/themes.lua index 14effeb..4620143 100644 --- a/lua/plugins/themes.lua +++ b/lua/plugins/themes.lua @@ -1,12 +1,12 @@ return { - { - "projekt0n/github-nvim-theme", - }, { "Mofiqul/vscode.nvim", - lazy = false, config = function() - require("vscode").setup({}) + require("vscode").setup({ + disable_nvimtree_bg = true, + italic_comments = true, + underline_links = true, + }) vim.cmd("colorscheme vscode") end, },