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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
return {
{
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
},
{
"lewis6991/hover.nvim",
keys = {
{
"K",
function()
require("hover").hover({})
end,
desc = "Hover",
},
{
"gK",
function()
require("hover").hover_select({})
end,
desc = "Hover Select",
},
{
"gh",
function()
require("hover").hover({})
end,
desc = "[H]over",
},
},
opts = {
init = function()
require("hover.providers.lsp")
require("hover.providers.man")
require("hover.providers.dap")
-- require("hover.providers.gh")
require("hover.providers.dictionary")
end,
},
},
{
"neovim/nvim-lspconfig",
version = false,
dependencies = {
{ "j-hui/fidget.nvim", opts = {} },
"saghen/blink.cmp",
{ "williamboman/mason.nvim", opts = {} },
{
"williamboman/mason-lspconfig.nvim",
opts = {
ensure_installed = {},
automatic_installation = false,
handlers = {
function(server_name)
vim.lsp.enable(server_name)
end,
},
},
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
opts = {
ensure_installed = {
-- "nginx-language-server", -- needs python <= 3.12
-- "just-lsp", -- "Platform unsupported"
"actionlint",
"autotools-language-server",
"bash-language-server",
"clangd",
"codelldb",
"codespell",
"css-lsp",
"dockerfile-language-server",
"fortls",
"gh",
"gh-actions-language-server",
"groovy-language-server",
"hadolint",
"html-lsp",
"jq",
"jsonlint",
"lua-language-server",
"markdownlint",
"mdformat",
"neocmakelsp",
"nginx-config-formatter",
"npm-groovy-lint",
"prettier",
"ruff",
"rust-analyzer",
"shellcheck",
-- "shellharden",
"shfmt",
"stylelint",
"stylua",
"systemd-language-server",
"systemdlint",
"typescript-language-server",
"typos",
"yamllint",
"yq",
},
},
},
},
config = function()
vim.lsp.enable("just")
vim.lsp.enable("tblgen_lsp_server")
end,
},
{
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>f",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "[F]ormat buffer",
},
},
config = function()
require("conform").setup({
formatters_by_ft = {
awk = { "gawk" },
bash = { "shfmt" },
cmake = { "cmake_format" },
css = { "prettier", "stylelint" },
groovy = { "npm-groovy-lint" },
html = { "prettier" },
javascript = { "prettier" },
typecript = { "prettier" },
jenkins = { "npm-groovy-lint" },
json = { "jq", "jsonlint" },
jsonc = { "prettier" },
just = { "just" },
markdown = { "mdformat" },
nginx = { "nginxfmt" },
lua = { "stylua" },
python = { "ruff_format", "ruff_fix", "ruff_organize_imports" },
rust = { "rustfmt" },
sh = { "shfmt", "shellcheck", "shellharden" },
yaml = { "yamllint" },
zsh = { "shfmt", "shellcheck", "shellharden" },
},
default_format_opts = {
lsp_format = "fallback",
},
formatters = {
shfmt = {
prepend_args = { "-i", "2" },
},
},
})
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
},
{
"mrcjkb/rustaceanvim",
ft = "rust",
},
{
"mfussenegger/nvim-lint",
event = { "BufReadPre", "BufNewFile" },
config = function()
local lint = require("lint")
lint.linters_by_ft = {
css = { "stylelint" },
dockerfile = { "hadolint" },
groovy = { "npm-groovy-lint" },
jenkins = { "npm-groovy-lint" },
json = { "jsonlint" },
markdown = { "markdownlint" },
makefile = { "checkmake" },
systemd = { "systemdlint" },
yaml = { "yamllint", "yq" },
ghaction = { "actionlint" },
zsh = { "zsh" },
["*"] = { "codespell", "typos" },
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd({ "BufReadPost", "BufWritePost" }, {
group = lint_augroup,
callback = function()
if vim.opt_local.modifiable:get() then
lint.try_lint()
end
end,
})
end,
},
{ "j-hui/fidget.nvim", opts = {} },
{
"rachartier/tiny-inline-diagnostic.nvim",
event = "VeryLazy",
priority = 1000,
opts = {
options = {
show_source = {
if_many = true,
},
-- Set the arrow icon to the same color as the first diagnostic severity
set_arrow_to_diag_color = true,
-- Configuration for multiline diagnostics
-- Can be a boolean or a table with detailed options
multilines = {
-- Enable multiline diagnostic messages
enabled = true,
},
-- Display all diagnostic messages on the cursor line, not just those under cursor
show_all_diags_on_cursorline = true,
-- Enable diagnostics in Select mode (e.g., when auto-completing with Blink)
enable_on_select = true,
-- Configuration for breaking long messages into separate lines
break_line = {
-- Enable breaking messages after a specific length
enabled = true,
},
-- Filter diagnostics by severity levels
-- Available severities: vim.diagnostic.severity.ERROR, WARN, INFO, HINT
severity = {
vim.diagnostic.severity.ERROR,
vim.diagnostic.severity.WARN,
vim.diagnostic.severity.INFO,
vim.diagnostic.severity.HINT,
},
},
},
},
}
|