-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvim.lua
More file actions
110 lines (101 loc) · 2.19 KB
/
Copy pathvim.lua
File metadata and controls
110 lines (101 loc) · 2.19 KB
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
107
108
109
110
require'gitsigns'.setup()
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup({
sort_by = "case_sensitive",
hijack_cursor = true,
update_focused_file = {
update_root = true,
},
view = {
signcolumn = "auto",
},
renderer = {
group_empty = true,
icons = {
show = {
file = false,
folder = false,
},
glyphs = {
bookmark = "🔖",
folder = {
arrow_closed = "⏵",
arrow_open = "⏷",
},
symlink = "",
git = {
unstaged = "✗",
staged = "✓",
unmerged = "⌥",
renamed = "➜",
untracked = "☆",
deleted = "⊖",
ignored = "◌",
},
},
},
},
filters = {
dotfiles = true,
},
})
require('pretty-fold').setup({
sections = {
left = {
'content',
},
right = {
}
},
fill_char = ' ',
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "qf",
callback = function()
vim.opt_local.colorcolumn = ''
end,
})
vim.diagnostic.config({
-- Use the default configuration
virtual_lines = true,
-- Alternatively, customize specific options
virtual_lines = {
-- Only show virtual line diagnostics for the current cursor line
current_line = true,
},
})
require'nvim-treesitter'.setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
},
folding = {
enable = true,
},
}
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method('textDocument/completion') then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
vim.api.nvim_create_autocmd("CompleteDone", {
pattern = "*.go",
callback = function(args)
require'lv'.importing()
end,
})
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function(args)
require'lv'.importing()
vim.lsp.buf.format { async = true }
end,
})
end
end,
})
vim.lsp.enable('gopls')
vim.lsp.enable('rust_analyzer')