配置目录树快捷键
This commit is contained in:
parent
a0085913ad
commit
e6e5791ba2
1
init.lua
1
init.lua
|
@ -1,3 +1,4 @@
|
|||
require('basic')
|
||||
require('plugins')
|
||||
require('plugins-config')
|
||||
require('keybindings')
|
||||
|
|
|
@ -11,8 +11,8 @@ vim.wo.signcolumn = "yes"
|
|||
-- 右侧参考线,超过表示代码太长了,考虑换行
|
||||
vim.wo.colorcolumn = "120"
|
||||
-- 缩进2个空格等于一个Tab
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.autoindent = true
|
||||
-- 新行对齐当前行
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local opt = {noremap = true, silent = true}
|
||||
|
||||
-- 开启目录树
|
||||
map('n', '<leader>o', ':NvimTreeOpen<CR>', opt)
|
||||
-- 关闭目录树
|
||||
map('n', '<leader>c', ':NvimTreeClose<CR>', opt)
|
|
@ -3,6 +3,10 @@ require('symbols-outline').setup()
|
|||
require('feline').setup()
|
||||
require('bufferline').setup()
|
||||
require('go').setup()
|
||||
require('impatient')
|
||||
require("toggleterm").setup()
|
||||
require('gitsigns').setup()
|
||||
require('telescope').setup()
|
||||
|
||||
vim.o.background = "dark" -- or "light" for light mode
|
||||
vim.cmd([[colorscheme gruvbox]])
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return require('packer').startup(function()
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
-- nvim-tree
|
||||
-- 文件树
|
||||
use {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
requires = {
|
||||
|
@ -9,7 +9,7 @@ return require('packer').startup(function()
|
|||
},
|
||||
tag = 'nightly' -- optional, updated every week. (see issue #1193)
|
||||
}
|
||||
-- greeter
|
||||
-- 欢迎页
|
||||
use {
|
||||
'goolord/alpha-nvim',
|
||||
requires = { 'nvim-tree/nvim-web-devicons' },
|
||||
|
@ -17,28 +17,66 @@ return require('packer').startup(function()
|
|||
require'alpha'.setup(require'alpha.themes.startify'.config)
|
||||
end
|
||||
}
|
||||
-- theme
|
||||
-- 主题
|
||||
use { "ellisonleao/gruvbox.nvim" }
|
||||
-- symbols outline
|
||||
-- 代码缩略图
|
||||
use 'simrat39/symbols-outline.nvim'
|
||||
-- status tabbar
|
||||
-- 状态栏
|
||||
use 'feline-nvim/feline.nvim'
|
||||
-- bufferline
|
||||
-- bufferline 标题栏
|
||||
use {'akinsho/bufferline.nvim', tag = "v3.*", requires = 'nvim-tree/nvim-web-devicons'}
|
||||
-- golang ide
|
||||
use 'ray-x/go.nvim'
|
||||
use 'ray-x/guihua.lua' -- recommended if need floating window support
|
||||
use 'neovim/nvim-lspconfig'
|
||||
use 'nvim-treesitter/nvim-treesitter'
|
||||
-- project manager
|
||||
-- 当前工作目录
|
||||
use {
|
||||
"ahmedkhalf/project.nvim",
|
||||
config = function()
|
||||
"ahmedkhalf/project.nvim",
|
||||
config = function()
|
||||
require("project_nvim").setup {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
}
|
||||
-- 空白缩进
|
||||
use "lukas-reineke/indent-blankline.nvim"
|
||||
-- 改善启动时间
|
||||
use 'lewis6991/impatient.nvim'
|
||||
-- 终端管理
|
||||
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
|
||||
require("toggleterm").setup()
|
||||
end}
|
||||
-- TODO管理
|
||||
use {
|
||||
"folke/todo-comments.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("todo-comments").setup {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
end
|
||||
}
|
||||
-- git 管理
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
}
|
||||
-- 注释管理
|
||||
use {
|
||||
'numToStr/Comment.nvim',
|
||||
config = function()
|
||||
require('Comment').setup()
|
||||
end
|
||||
}
|
||||
-- coc 代码提示
|
||||
use {'neoclide/coc.nvim', branch = 'release'}
|
||||
-- 搜索
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.1',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue