-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnvim_plugins.lua
More file actions
143 lines (142 loc) · 4.48 KB
/
nvim_plugins.lua
File metadata and controls
143 lines (142 loc) · 4.48 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):
match("%s") == nil
end
return {
{
"rebelot/kanagawa.nvim",
priority = 100,
opts = {
dimInactive = true,
},
config = function(_, opts)
require('kanagawa').setup(opts)
vim.cmd("colorscheme kanagawa")
end,
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
sections = {
lualine_b = { 'branch', 'diff' },
lualine_c = { { 'filename', newfile_status = true, path = 1 } },
lualine_x = { 'diagnostics' },
},
inactive_sections = {
lualine_c = { { 'filename', newfile_status = true, path = 1 } },
lualine_x = { 'diagnostics', 'location' },
},
},
},
{
"akinsho/bufferline.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
options = {
mode = "tabs",
numbers = function(opts)
return string.format("%s", opts.raise(opts.ordinal))
end,
show_buffer_close_icons = false,
show_close_icon = false,
hover = { enable = false },
diagnostics = "nvim_lsp",
diagnostics_indicator = function(_, level)
local icon = ""
icon = level:match("warning") and "" or icon
icon = level:match("error") and "" or icon
return icon
end,
},
},
},
{
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
},
{
"neovim/nvim-lspconfig",
dependencies = { "saghen/blink.cmp" },
},
{
"j-hui/fidget.nvim",
config = true,
},
{
"VonHeikemen/ts-enable.nvim",
opts = {
auto_init = true,
auto_install = true,
highlights = true,
},
},
{
"lewis6991/gitsigns.nvim",
opts = {
current_line_blame_opts = {
virt_text_pos = "right_align",
},
current_line_blame_formatter = "<abbrev_sha>, <author_time:%Y-%m-%d> - <summary>",
},
},
{
"saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" },
version = "*",
opts = {
completion = {
list = { selection = { preselect = false, auto_insert = true } },
documentation = { auto_show = true },
},
keymap = {
preset = "enter",
["<Tab>"] = {
function(cmp)
if cmp.is_menu_visible() then
return require("blink.cmp").select_next()
elseif cmp.snippet_active() then
return cmp.snippet_forward()
elseif has_words_before() then
return cmp.show()
end
end,
"fallback",
},
["<S-Tab>"] = {
function(cmp)
if cmp.is_menu_visible() then
return require("blink.cmp").select_prev()
elseif cmp.snippet_active() then
return cmp.snippet_backward()
end
end,
"fallback",
},
},
signature = {
enabled = true,
window = { border = "rounded" },
},
sources = {
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
providers = {
path = { opts = { show_hidden_files_by_default = true } },
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
},
},
},
opts_extend = { "sources.default" },
},
}