generated from LazyVim/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
51 lines (43 loc) · 1.27 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
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
-- vim.opt.rtp:append("/usr/share/vim/vimfiles")
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
local copy_to_unnamedplus = require("vim.ui.clipboard.osc52").copy("+")
copy_to_unnamedplus(vim.v.event.regcontents)
local copy_to_unnamed = require("vim.ui.clipboard.osc52").copy("*")
copy_to_unnamed(vim.v.event.regcontents)
end,
})
require("lsp-lens").setup({
enable = false,
sections = {
definition = function(count)
return "Def: " .. count
end,
references = function(count)
return "Ref: " .. count
end,
implements = function(count)
return "Impl: " .. count
end,
git_authors = function(latest_author, count)
return " " .. latest_author .. (count - 1 == 0 and "" or (" + " .. count - 1))
end,
},
})
require("guess-indent").setup({})
-- vim.cmd(":Copilot disable")
require("lsp_signature").setup({
bind = true, -- This is mandatory, otherwise border config won't get registered.
})
vim.diagnostic.config({
virtual_text = false,
})
local user = vim.env.USER
if user and user == "chin39" then
vim.reload_config_on_save = true
require("custom_user")
end
-- vim.cmd(":Copilot disable")