error fixes

This commit is contained in:
sankalp committed 2024-01-12 10:40:16 +05:45
1 parent a2483dc586
commit b99ff7cd6b
24 files changed
+112 -175

No files matched your search

@@ -1,17 +0,0 @@
return {
{
"stevearc/conform.nvim",
opts = function(_, opts)
opts.formatters_by_ft.python = opts.formatters_by_ft.python or {}
table.insert(opts.formatters_by_ft.python, "ruff_format")
return opts
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "ruff-lsp" })
end,
},
}
@@ -1,8 +0,0 @@
return {
"stevearc/conform.nvim",
opts = function(_, opts)
opts.formatters_by_ft.rust = opts.formatters_by_ft.rust or {}
table.insert(opts.formatters_by_ft.rust, "rustfmt")
return opts
end,
}
@@ -9,8 +9,6 @@ return {
{
"stevearc/conform.nvim",
opts = function(_, opts)
--- Extend the conform plugin config and add given formatters
---@param tbl table<string, conform.FormatterUnit[]> Table of filetype to formatters mappings
local function add_formatters(tbl)
for ft, formatters in pairs(tbl) do
if opts.formatters_by_ft[ft] == nil then
@@ -1,31 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "sqlfmt" })
end,
},
{
"stevearc/conform.nvim",
opts = function(_, opts)
--- Extend the conform plugin config and add given formatters
---@param tbl table<string, conform.FormatterUnit[]> Table of filetype to formatters mappings
local function add_formatters(tbl)
for ft, formatters in pairs(tbl) do
if opts.formatters_by_ft[ft] == nil then
opts.formatters_by_ft[ft] = formatters
else
vim.list_extend(opts.formatters_by_ft[ft], formatters)
end
end
end
add_formatters({
["sql"] = { "sqlfmt" },
["plsql"] = { "sqlfmt" },
["mysql"] = { "sqlfmt" },
})
end,
},
}
+9 -1
View File
@@ -19,7 +19,15 @@ return {
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "bash-language-server" })
vim.list_extend(opts.ensure_installed, { "bash-language-server", "shellcheck" })
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
opts.linters_by_ft.bash = opts.linters_by_ft.bash or {}
table.insert(opts.linters_by_ft.bash, "shellcheck")
return opts
end,
},
{
@@ -1,5 +1,12 @@
return {
{ import = "lazyvim.plugins.extras.lang.go" },
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "golangcil-lint" })
end,
},
{
"ray-x/go.nvim",
dependencies = {
@@ -10,7 +17,31 @@ return {
opts = {},
event = { "LazyFile" },
ft = { "go", "gomod" },
build = ':lua require("go.install").update_all_sync()',
build = function()
require("go.install").update_all_sync()
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
local function add_linters(tbl)
for ft, linters in pairs(tbl) do
if opts.linters_by_ft[ft] == nil then
opts.linters_by_ft[ft] = linters
else
vim.list_extend(opts.linters_by_ft[ft], linters)
end
end
end
add_linters({
["go"] = { "golangcilint" },
["gomod"] = { "golangcilint" },
["gowork"] = { "golangcilint" },
})
return opts
end,
},
{
"luckasRanarison/nvim-devdocs",
@@ -1,5 +1,13 @@
return {
{ import = "lazyvim.plugins.extras.lang.python" },
{
"stevearc/conform.nvim",
opts = function(_, opts)
opts.formatters_by_ft.python = opts.formatters_by_ft.python or {}
table.insert(opts.formatters_by_ft.python, "ruff_format")
return opts
end,
},
{
"luckasRanarison/nvim-devdocs",
optional = true,
@@ -67,6 +67,9 @@ return {
opts = function(_, opts)
opts.formatters_by_ft.toml = opts.formatters_by_ft.toml or {}
table.insert(opts.formatters_by_ft.toml, "taplo")
opts.formatters_by_ft.rust = opts.formatters_by_ft.rust or {}
table.insert(opts.formatters_by_ft.rust, "rustfmt")
return opts
end,
},
+43 -1
View File
@@ -73,7 +73,7 @@ return {
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "sqlls" })
vim.list_extend(opts.ensure_installed, { "sqlls", "sqlfmt", "sqlfluff" })
end,
},
{
@@ -84,6 +84,48 @@ return {
},
},
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
local function add_linters(tbl)
for ft, linters in pairs(tbl) do
if opts.linters_by_ft[ft] == nil then
opts.linters_by_ft[ft] = linters
else
vim.list_extend(opts.linters_by_ft[ft], linters)
end
end
end
add_linters({
["sql"] = { "sqlfluff" },
["plsql"] = { "sqlfluff" },
["mysql"] = { "sqlfluff" },
})
return opts
end,
},
{
"stevearc/conform.nvim",
opts = function(_, opts)
local function add_formatters(tbl)
for ft, formatters in pairs(tbl) do
if opts.formatters_by_ft[ft] == nil then
opts.formatters_by_ft[ft] = formatters
else
vim.list_extend(opts.formatters_by_ft[ft], formatters)
end
end
end
add_formatters({
["sql"] = { "sqlfmt" },
["plsql"] = { "sqlfmt" },
["mysql"] = { "sqlfmt" },
})
end,
},
{
"luckasRanarison/nvim-devdocs",
optional = true,
@@ -1,31 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "golangcil-lint" })
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
local function add_linters(tbl)
for ft, linters in pairs(tbl) do
if opts.linters_by_ft[ft] == nil then
opts.linters_by_ft[ft] = linters
else
vim.list_extend(opts.linters_by_ft[ft], linters)
end
end
end
add_linters({
["go"] = { "golangcilint" },
["gomod"] = { "golangcilint" },
["gowork"] = { "golangcilint" },
})
return opts
end,
},
}
@@ -1,17 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "shellcheck" })
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
opts.linters_by_ft.bash = opts.linters_by_ft.bash or {}
table.insert(opts.linters_by_ft.bash, "shellcheck")
return opts
end,
},
}
@@ -1,31 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "sqlfluff" })
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
local function add_linters(tbl)
for ft, linters in pairs(tbl) do
if opts.linters_by_ft[ft] == nil then
opts.linters_by_ft[ft] = linters
else
vim.list_extend(opts.linters_by_ft[ft], linters)
end
end
end
add_linters({
["sql"] = { "sqlfluff" },
["plsql"] = { "sqlfluff" },
["mysql"] = { "sqlfluff" },
})
return opts
end,
},
}