-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
106 lines (78 loc) · 2.26 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- 使用相对行号
vim.wo.number = true
vim.wo.relativenumber = true
-- 显示左侧图标指示列
vim.wo.signcolumn = "yes"
-- 缩进2个空格等于一个Tab
vim.o.tabstop = 4
vim.bo.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftround = true
-- >> << 时移动长度
vim.o.shiftwidth = 4
vim.bo.shiftwidth = 4
-- 空格替代tab
vim.o.expandtab = true
vim.bo.expandtab = true
-- 搜索大小写不敏感,除非包含大写
vim.o.ignorecase = true
vim.o.smartcase = true
-- 搜索不要高亮
vim.o.hlsearch = false
-- 边输入边搜索
-- vim.o.incsearch = true
-- 命令行高为2,提供足够的显示空间
vim.o.cmdheight = 2
-- 补全增强
vim.o.wildmenu = true
-- 使用增强状态栏插件后不再需要 vim 的模式提示
vim.o.showmode = false
-- 复制到系统的clipboard
vim.g.clipboard = {
name = "WslClipboard",
copy = {
["+"] = "/mnt/c/Windows/System32/clip.exe",
["*"] = "/mnt/c/Windows/System32/clip.exe"
},
-- 粘贴暂时没啥用
paste = {
["+"] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
["*"] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))'
},
cache_enable = 0,
}
-- Packer 插件管理
require("plugins")
-- keys
require("keybindings")
require("colorscheme")
-- fold 折叠
require("fold")
-- 插件配置
require("plugin-config.nvim-tree")
require("plugin-config.lualine")
require("plugin-config.bufferline")
require("plugin-config.telescope")
require("plugin-config.nvim-treesitter")
require("plugin-config.null-ls")
require("plugin-config.nvim-autopairs")
require("plugin-config.nvim-ts-autotag")
require("plugin-config.luapad")
-- LSP
require("lsp.setup")
require("lsp.cmp")
-- 快速注释
require('Comment').setup({
-- 快速注释的增强插件: tsx
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
})
-- symbol in right 当前文件的索引
-- A tree like view for symbols in Neovim using the Language Server Protocol. Supports all your favourite languages.
require("symbols-outline").setup()
require("nvim-surround").setup({
keymaps = {
visual = "s",
},
})