This commit is contained in:
Young Xu 2023-02-15 01:11:46 +08:00
parent 5d7b301bc4
commit 762b6e2541
Signed by: xuthus5
GPG Key ID: A23CF9620CBB55F9
9 changed files with 45 additions and 36 deletions

View File

@ -28,7 +28,7 @@ require("plugins.terminal")
-- 错误列表
require("plugins.trouble")
-- 代码大纲
require('plugins.aerial')
require("plugins.aerial")
-- LSP管理
require("plugins.mason")
require("lsp.init")

View File

@ -15,6 +15,7 @@ map("n", "<leader>t", ":NvimTreeToggle<CR>", noreopt)
-- 文件页切换
map("n", "<leader>ll", ":BufferLineCyclePrev<CR>", noreopt)
map("n", "<leader>rr", ":BufferLineCycleNext<CR>", noreopt)
map("n", "<leader>pc", ":BufferLinePickClose<CR>", noreopt)
-- 模糊搜索
map("n", "<leader>ff", "<Cmd>Telescope find_files<CR>", noreopt)
map("n", "<leader>fg", "<Cmd>Telescope live_grep<CR>", noreopt)

View File

@ -1 +1,2 @@
vim.cmd[[colorscheme tokyonight]]
vim.o.background = "dark" -- or "light" for light mode
vim.cmd([[colorscheme gruvbox]])

View File

@ -1,11 +1,11 @@
require('aerial').setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
vim.keymap.set('n', '{', '<cmd>AerialPrev<CR>', {buffer = bufnr})
vim.keymap.set('n', '}', '<cmd>AerialNext<CR>', {buffer = bufnr})
end
require("aerial").setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end,
})
-- You probably also want to set a keymap to toggle aerial
vim.keymap.set('n', '<leader>a', '<cmd>AerialToggle!<CR>')
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")

View File

@ -1,14 +1,16 @@
require("bufferline").setup{
options = {
-- 使用 nvim 内置lsp
diagnostics = "nvim_lsp",
always_show_bufferline = false,
-- 左侧让出 nvim-tree 的位置
offsets = {{
filetype = "NvimTree",
text = "File Explorer",
highlight = "Directory",
text_align = "left"
}}
}
}
require("bufferline").setup({
options = {
-- 使用 nvim 内置lsp
diagnostics = "nvim_lsp",
always_show_bufferline = false,
-- 左侧让出 nvim-tree 的位置
offsets = {
{
filetype = "NvimTree",
text = "File Explorer",
highlight = "Directory",
text_align = "left",
},
},
},
})

View File

@ -1,10 +1,10 @@
vim.opt.list = true
vim.opt.listchars:append "space:⋅"
vim.opt.listchars:append "eol:↴"
vim.opt.listchars:append("space:⋅")
vim.opt.listchars:append("eol:↴")
require("indent_blankline").setup {
show_current_context = true,
show_current_context_start = true,
show_end_of_line = true,
space_char_blankline = " ",
}
require("indent_blankline").setup({
show_current_context = true,
show_current_context_start = true,
show_end_of_line = true,
space_char_blankline = " ",
})

View File

@ -1,3 +1,6 @@
require('lualine').setup({
options = { theme = 'tokyonight' }
require("lualine").setup({
options = {
theme = "gruvbox",
component_separators = { left = "|", right = "|" },
},
})

View File

@ -9,6 +9,6 @@ require("mason").setup({
})
require("mason-lspconfig").setup({
ensure_installed = { "rust_analyzer", "gopls", "golangci_lint_ls" },
ensure_installed = { "lua_ls", "rust_analyzer", "gopls", "golangci_lint_ls" },
automatic_installation = true,
})

View File

@ -1,7 +1,7 @@
return require("packer").startup(function(use)
use({ "wbthomason/packer.nvim" })
-- 主题
use({ "folke/tokyonight.nvim" })
use({ "ellisonleao/gruvbox.nvim" })
-- 文件树
use({
"nvim-tree/nvim-tree.lua",
@ -108,5 +108,7 @@ return require("packer").startup(function(use)
"folke/trouble.nvim",
requires = "nvim-tree/nvim-web-devicons",
})
-- 上下高亮跳动
use({ "danilamihailov/beacon.nvim" })
vim.opt.completeopt = { "menu", "menuone", "noselect" }
end)