更新配置

This commit is contained in:
LingZhaoHui 2024-06-22 22:38:42 +08:00
parent b38ff31656
commit dfa5521368
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC
7 changed files with 48 additions and 27 deletions

View File

@ -14,10 +14,13 @@ git clone ssh://git@git.zeekling.cn:222/linux/nvim-config.git ~/.config/nvim
|---- |---- |----| |---- |---- |----|
| \<space>bp | 跳转到上一个buffer | Buffer | | \<space>bp | 跳转到上一个buffer | Buffer |
| \<space>bp | 跳转到下一个buffer | Buffer | | \<space>bp | 跳转到下一个buffer | Buffer |
| \<space>ds | 在左边显示目录数 | Dir | | \<space>dt | 在左边显示或者关闭目录数 | Dir |
| \<space>dc | 关闭左边的目录树 | Dir | | \<space>mkp | 预览Markdown | Markdown |
| \<space>mks | 预览Markdown | Markdown | | \<space>ff | 格式化代码 | Format |
| \<space>mkc | 关闭预览Markdown | Markdown | | \<space>fsf | 在当前目录下面查找文件。支持模糊匹配 | Search |
| \<space>fsg | 在当前目录下的文件查找字符串 | S earch |
| \<space>fsb | 在打开的buffer中查找字符串 | Search |
| \<space>ls | 显示Lazy概览页面 | Lazy |
## 帮助 ## 帮助

View File

@ -2,5 +2,8 @@ vim.g.mapleader = " "
vim.o.background = "light" vim.o.background = "light"
vim.cmd("set ignorecase") 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")

View File

@ -7,6 +7,8 @@ return {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip", "saadparwaiz1/cmp_luasnip",
"neovim/nvim-lspconfig",
"hrsh7th/cmp-cmdline"
}, },
config = function() config = function()
local cmp = require("cmp") local cmp = require("cmp")
@ -33,9 +35,6 @@ return {
}) })
end, end,
}, },
{
"neovim/nvim-lspconfig",
},
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
config = function() config = function()
@ -60,6 +59,9 @@ return {
"vim", "vim",
"xml", "xml",
"tcl", "tcl",
"yaml",
"ini",
"comment",
}, },
}) })
end, end,

View File

@ -17,18 +17,21 @@ return {
}, },
d = { d = {
name = "dirTree", name = "dirTree",
s = { "<cmd>NvimTreeToggle<cr>", "show dir tree on left" }, t = { "<cmd>NvimTreeToggle<cr>", "show or hidden dir tree on left" },
c = { "<cmd>NvimTreeClose<cr>", "hidden dir tree on left" },
}, },
f = { f = {
name = "Search,Format", name = "Search,Format Code",
s = { s = {
name = "Search", name = "Search",
f = { "<cmd>Telescope find_files<cr>", "Search file by name" }, f = { "<cmd>Telescope find_files<cr>", "Search files" },
g = { "<cmd>Telescope live_grep<cr>", "Grep in files" }, g = { "<cmd>Telescope live_grep<cr>", "Find string in files" },
b = { "<cmd>Telescope buffers<cr>", "Grep in buffer" }, b = { "<cmd>Telescope buffers<cr>", "Find string in buffer" },
}, },
f = { "<cmd>Format<cr>", "Code Format" }, f = { "<cmd>Format<cr>", "Format Code" },
},
g = {
name = "Git",
b = {"<cmd>Gitsigns blame<cr>", "git blame"}
}, },
l = { l = {
name = "Lazy", name = "Lazy",
@ -40,8 +43,7 @@ return {
name = "Markdown", name = "Markdown",
k = { k = {
name = "Markdown", name = "Markdown",
s = { "<cmd>MarkdownPreview<cr>", "MarkdownPreview" }, p = { "<cmd>MarkdownPreview<cr>", "MarkdownPreview" },
c = { "<cmd>MarkdownPreviewStop<cr>", "MarkdownPreviewStop" },
}, },
}, },
s = { s = {

View File

@ -117,7 +117,9 @@ return {
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
config = function() config = function()
require("lualine").setup() require("lualine").setup({
theme = "vscode",
})
end, end,
}, },
{ {
@ -138,7 +140,7 @@ return {
tag = "v3.*", tag = "v3.*",
config = function() config = function()
vim.g.termguicolors = true vim.g.termguicolors = true
require("bufferline").setup() require("bufferline").setup({})
end, end,
}, },
{ {

View File

@ -2,4 +2,13 @@ return {
{ {
"tpope/vim-fugitive", "tpope/vim-fugitive",
}, },
{
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup({})
end,
},
{
"sindrets/diffview.nvim",
},
} }

View File

@ -1,12 +1,12 @@
return { return {
{
"projekt0n/github-nvim-theme",
},
{ {
"Mofiqul/vscode.nvim", "Mofiqul/vscode.nvim",
lazy = false,
config = function() config = function()
require("vscode").setup({}) require("vscode").setup({
disable_nvimtree_bg = true,
italic_comments = true,
underline_links = true,
})
vim.cmd("colorscheme vscode") vim.cmd("colorscheme vscode")
end, end,
}, },