fix
This commit is contained in:
parent
5d7b301bc4
commit
762b6e2541
2
init.lua
2
init.lua
|
@ -28,7 +28,7 @@ require("plugins.terminal")
|
||||||
-- 错误列表
|
-- 错误列表
|
||||||
require("plugins.trouble")
|
require("plugins.trouble")
|
||||||
-- 代码大纲
|
-- 代码大纲
|
||||||
require('plugins.aerial')
|
require("plugins.aerial")
|
||||||
-- LSP管理
|
-- LSP管理
|
||||||
require("plugins.mason")
|
require("plugins.mason")
|
||||||
require("lsp.init")
|
require("lsp.init")
|
||||||
|
|
|
@ -15,6 +15,7 @@ map("n", "<leader>t", ":NvimTreeToggle<CR>", noreopt)
|
||||||
-- 文件页切换
|
-- 文件页切换
|
||||||
map("n", "<leader>ll", ":BufferLineCyclePrev<CR>", noreopt)
|
map("n", "<leader>ll", ":BufferLineCyclePrev<CR>", noreopt)
|
||||||
map("n", "<leader>rr", ":BufferLineCycleNext<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>ff", "<Cmd>Telescope find_files<CR>", noreopt)
|
||||||
map("n", "<leader>fg", "<Cmd>Telescope live_grep<CR>", noreopt)
|
map("n", "<leader>fg", "<Cmd>Telescope live_grep<CR>", noreopt)
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
vim.cmd[[colorscheme tokyonight]]
|
vim.o.background = "dark" -- or "light" for light mode
|
||||||
|
vim.cmd([[colorscheme gruvbox]])
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
require('aerial').setup({
|
require("aerial").setup({
|
||||||
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
|
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
-- Jump forwards/backwards with '{' and '}'
|
-- Jump forwards/backwards with '{' and '}'
|
||||||
vim.keymap.set('n', '{', '<cmd>AerialPrev<CR>', {buffer = bufnr})
|
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
|
||||||
vim.keymap.set('n', '}', '<cmd>AerialNext<CR>', {buffer = bufnr})
|
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- You probably also want to set a keymap to toggle aerial
|
-- 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>")
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
require("bufferline").setup{
|
require("bufferline").setup({
|
||||||
options = {
|
options = {
|
||||||
-- 使用 nvim 内置lsp
|
-- 使用 nvim 内置lsp
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
always_show_bufferline = false,
|
always_show_bufferline = false,
|
||||||
-- 左侧让出 nvim-tree 的位置
|
-- 左侧让出 nvim-tree 的位置
|
||||||
offsets = {{
|
offsets = {
|
||||||
filetype = "NvimTree",
|
{
|
||||||
text = "File Explorer",
|
filetype = "NvimTree",
|
||||||
highlight = "Directory",
|
text = "File Explorer",
|
||||||
text_align = "left"
|
highlight = "Directory",
|
||||||
}}
|
text_align = "left",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.listchars:append "space:⋅"
|
vim.opt.listchars:append("space:⋅")
|
||||||
vim.opt.listchars:append "eol:↴"
|
vim.opt.listchars:append("eol:↴")
|
||||||
|
|
||||||
require("indent_blankline").setup {
|
require("indent_blankline").setup({
|
||||||
show_current_context = true,
|
show_current_context = true,
|
||||||
show_current_context_start = true,
|
show_current_context_start = true,
|
||||||
show_end_of_line = true,
|
show_end_of_line = true,
|
||||||
space_char_blankline = " ",
|
space_char_blankline = " ",
|
||||||
}
|
})
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
require('lualine').setup({
|
require("lualine").setup({
|
||||||
options = { theme = 'tokyonight' }
|
options = {
|
||||||
|
theme = "gruvbox",
|
||||||
|
component_separators = { left = "|", right = "|" },
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,6 +9,6 @@ require("mason").setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
require("mason-lspconfig").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,
|
automatic_installation = true,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
return require("packer").startup(function(use)
|
return require("packer").startup(function(use)
|
||||||
use({ "wbthomason/packer.nvim" })
|
use({ "wbthomason/packer.nvim" })
|
||||||
-- 主题
|
-- 主题
|
||||||
use({ "folke/tokyonight.nvim" })
|
use({ "ellisonleao/gruvbox.nvim" })
|
||||||
-- 文件树
|
-- 文件树
|
||||||
use({
|
use({
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
@ -108,5 +108,7 @@ return require("packer").startup(function(use)
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
requires = "nvim-tree/nvim-web-devicons",
|
requires = "nvim-tree/nvim-web-devicons",
|
||||||
})
|
})
|
||||||
|
-- 上下高亮跳动
|
||||||
|
use({ "danilamihailov/beacon.nvim" })
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue